Update to LLVM 16.0.1

Resolves: #2178739
This commit is contained in:
Nikita Popov 2023-04-17 16:04:14 +02:00
parent 9bfb2774ee
commit 8ffdcd4aff
18 changed files with 271 additions and 525 deletions

219
.gitignore vendored
View File

@ -1,214 +1,5 @@
/cfe-3.7.1.src.tar.xz /*.src.rpm
/clang-3.8.0-0.1.fc24.src.rpm /*.src.tar.xz
/cfe-3.8.0rc2.src.tar.xz /*.src.tar.xz.sig
/cfe-3.8.0rc3.src.tar.xz /cmake/
/cfe-3.8.0.src.tar.xz /results_clang/
/cfe-3.9.0.src.tar.xz
/cfe-3.9.1.src.tar.xz
/clang-tools-extra-3.9.1.src.tar.xz
/cfe-4.0.0.src.tar.xz
/clang-tools-extra-4.0.0.src.tar.xz
/test-suite-4.0.0.src.tar.xz
/cfe-4.0.1.src.tar.xz
/test-suite-4.0.1.src.tar.xz
/clang-tools-extra-4.0.1.src.tar.xz
/cfe-5.0.0.src.tar.xz
/test-suite-5.0.0.src.tar.xz
/clang-tools-extra-5.0.0.src.tar.xz
/clang-tools-extra-5.0.1.src.tar.xz
/cfe-5.0.1.src.tar.xz
/test-suite-5.0.1.src.tar.xz
/cfe-6.0.0rc1.src.tar.xz
/clang-tools-extra-6.0.0rc1.src.tar.xz
/test-suite-6.0.0rc1.src.tar.xz
/cfe-6.0.0rc2.src.tar.xz
/test-suite-6.0.0rc2.src.tar.xz
/clang-tools-extra-6.0.0rc2.src.tar.xz
/cfe-6.0.0.src.tar.xz
/test-suite-6.0.0.src.tar.xz
/clang-tools-extra-6.0.0.src.tar.xz
/cfe-6.0.1rc1.src.tar.xz
/clang-tools-extra-6.0.1rc1.src.tar.xz
/test-suite-6.0.1rc1.src.tar.xz
/cfe-6.0.1rc2.src.tar.xz
/clang-tools-extra-6.0.1rc2.src.tar.xz
/test-suite-6.0.1rc2.src.tar.xz
/cfe-6.0.1.src.tar.xz
/clang-tools-extra-6.0.1.src.tar.xz
/test-suite-6.0.1.src.tar.xz
/cfe-7.0.0rc1.src.tar.xz
/test-suite-7.0.0rc1.src.tar.xz
/clang-tools-extra-7.0.0rc1.src.tar.xz
/test-suite-7.0.0rc1.src.fedora.tar.gz
/test-suite-7.0.0rc1.src.fedora.tar.xz
/cfe-7.0.0rc2.src.tar.xz
/clang-tools-extra-7.0.0rc2.src.tar.xz
/test-suite-7.0.0rc2.src.fedora.tar.xz
/cfe-7.0.0rc3.src.tar.xz
/clang-tools-extra-7.0.0rc3.src.tar.xz
/test-suite-7.0.0rc3.src.fedora.tar.xz
/cfe-7.0.0.src.tar.xz
/test-suite-7.0.0.src.fedora.tar.xz
/clang-tools-extra-7.0.0.src.tar.xz
/clang-tools-extra-7.0.1.src.tar.xz
/cfe-7.0.1.src.tar.xz
/clang-tools-extra-8.0.0rc1.src.tar.xz
/cfe-8.0.0rc1.src.tar.xz
/cfe-8.0.0rc2.src.tar.xz
/clang-tools-extra-8.0.0rc2.src.tar.xz
/cfe-8.0.0rc3.src.tar.xz
/clang-tools-extra-8.0.0rc3.src.tar.xz
/cfe-8.0.0rc4.src.tar.xz
/clang-tools-extra-8.0.0rc4.src.tar.xz
/cfe-8.0.0.src.tar.xz
/clang-tools-extra-8.0.0.src.tar.xz
/cfe-9.0.0rc2.src.tar.xz
/clang-tools-extra-9.0.0rc2.src.tar.xz
/cfe-9.0.0rc3.src.tar.xz
/clang-tools-extra-9.0.0rc3.src.tar.xz
/cfe-9.0.0.src.tar.xz
/clang-tools-extra-9.0.0.src.tar.xz
/clang-9.0.1.src.tar.xz
/clang-tools-extra-9.0.1.src.tar.xz
/clang-10.0.0rc1.src.tar.xz
/clang-tools-extra-10.0.0rc1.src.tar.xz
/clang-10.0.0rc1.src.tar.xz.sig
/clang-tools-extra-10.0.0rc1.src.tar.xz.sig
/clang-10.0.0rc2.src.tar.xz
/clang-tools-extra-10.0.0rc2.src.tar.xz
/clang-tools-extra-10.0.0rc2.src.tar.xz.sig
/clang-10.0.0rc2.src.tar.xz.sig
/clang-10.0.0rc3.src.tar.xz
/clang-tools-extra-10.0.0rc3.src.tar.xz
/clang-tools-extra-10.0.0rc3.src.tar.xz.sig
/clang-10.0.0rc3.src.tar.xz.sig
/clang-10.0.0rc4.src.tar.xz
/clang-tools-extra-10.0.0rc4.src.tar.xz
/clang-tools-extra-10.0.0rc4.src.tar.xz.sig
/clang-10.0.0rc4.src.tar.xz.sig
/clang-10.0.0rc5.src.tar.xz
/clang-tools-extra-10.0.0rc5.src.tar.xz
/clang-tools-extra-10.0.0rc5.src.tar.xz.sig
/clang-10.0.0rc5.src.tar.xz.sig
/clang-10.0.0rc6.src.tar.xz
/clang-tools-extra-10.0.0rc6.src.tar.xz
/clang-tools-extra-10.0.0rc6.src.tar.xz.sig
/clang-10.0.0rc6.src.tar.xz.sig
/clang-10.0.0.src.tar.xz.sig
/clang-tools-extra-10.0.0.src.tar.xz.sig
/clang-tools-extra-10.0.0.src.tar.xz
/clang-10.0.0.src.tar.xz
/clang-11.0.0rc1.src.tar.xz
/clang-tools-extra-11.0.0rc1.src.tar.xz
/clang-tools-extra-11.0.0rc1.src.tar.xz.sig
/clang-11.0.0rc1.src.tar.xz.sig
/clang-11.0.0rc2.src.tar.xz
/clang-tools-extra-11.0.0rc2.src.tar.xz
/clang-tools-extra-11.0.0rc2.src.tar.xz.sig
/clang-11.0.0rc2.src.tar.xz.sig
/clang-11.0.0rc3.src.tar.xz
/clang-tools-extra-11.0.0rc3.src.tar.xz
/clang-tools-extra-11.0.0rc3.src.tar.xz.sig
/clang-11.0.0rc3.src.tar.xz.sig
/clang-11.0.0rc5.src.tar.xz
/clang-11.0.0rc5.src.tar.xz.sig
/clang-tools-extra-11.0.0rc5.src.tar.xz
/clang-tools-extra-11.0.0rc5.src.tar.xz.sig
/clang-11.0.0rc6.src.tar.xz
/clang-11.0.0rc6.src.tar.xz.sig
/clang-tools-extra-11.0.0rc6.src.tar.xz
/clang-tools-extra-11.0.0rc6.src.tar.xz.sig
/clang-11.0.0.src.tar.xz
/clang-11.0.0.src.tar.xz.sig
/clang-tools-extra-11.0.0.src.tar.xz
/clang-tools-extra-11.0.0.src.tar.xz.sig
/clang-11.0.1rc1.src.tar.xz
/clang-11.0.1rc1.src.tar.xz.sig
/clang-tools-extra-11.0.1rc1.src.tar.xz
/clang-tools-extra-11.0.1rc1.src.tar.xz.sig
/clang-tools-extra-11.0.1rc2.src.tar.xz
/clang-tools-extra-11.0.1rc2.src.tar.xz.sig
/clang-11.0.1rc2.src.tar.xz.sig
/clang-11.0.1rc2.src.tar.xz
/clang-11.0.1.src.tar.xz
/clang-11.0.1.src.tar.xz.sig
/clang-tools-extra-11.0.1.src.tar.xz
/clang-tools-extra-11.0.1.src.tar.xz.sig
/clang-11.1.0rc1.src.tar.xz
/clang-tools-extra-11.1.0rc1.src.tar.xz
/clang-tools-extra-11.1.0rc1.src.tar.xz.sig
/clang-11.1.0rc1.src.tar.xz.sig
/clang-11.1.0rc2.src.tar.xz
/clang-tools-extra-11.1.0rc2.src.tar.xz
/clang-tools-extra-11.1.0rc2.src.tar.xz.sig
/clang-11.1.0rc2.src.tar.xz.sig
/clang-12.0.0rc1.src.tar.xz
/clang-tools-extra-12.0.0rc1.src.tar.xz
/clang-tools-extra-12.0.0rc1.src.tar.xz.sig
/clang-12.0.0rc1.src.tar.xz.sig
/clang-12.0.0rc2.src.tar.xz
/clang-tools-extra-12.0.0rc2.src.tar.xz
/clang-tools-extra-12.0.0rc2.src.tar.xz.sig
/clang-12.0.0rc2.src.tar.xz.sig
/clang-12.0.0rc3.src.tar.xz
/clang-12.0.0rc3.src.tar.xz.sig
/clang-tools-extra-12.0.0rc3.src.tar.xz
/clang-tools-extra-12.0.0rc3.src.tar.xz.sig
/clang-12.0.0rc4.src.tar.xz
/clang-tools-extra-12.0.0rc4.src.tar.xz
/clang-tools-extra-12.0.0rc4.src.tar.xz.sig
/clang-12.0.0rc4.src.tar.xz.sig
/clang-12.0.0rc5.src.tar.xz
/clang-tools-extra-12.0.0rc5.src.tar.xz
/clang-tools-extra-12.0.0rc5.src.tar.xz.sig
/clang-12.0.0rc5.src.tar.xz.sig
/clang-12.0.0.src.tar.xz
/clang-12.0.0.src.tar.xz.sig
/clang-tools-extra-12.0.0.src.tar.xz
/clang-tools-extra-12.0.0.src.tar.xz.sig
/llvm-11.1.0rc2.src.tar.xz
/clang-12.0.1.src.tar.xz
/clang-12.0.1.src.tar.xz.sig
/clang-tools-extra-12.0.1.src.tar.xz
/clang-tools-extra-12.0.1.src.tar.xz.sig
/clang-13.0.0.src.tar.xz
/clang-13.0.0.src.tar.xz.sig
/clang-tools-extra-13.0.0.src.tar.xz
/clang-tools-extra-13.0.0.src.tar.xz.sig
/llvm-12.0.1.src.tar.xz
/clang-tools-extra-13.0.1.src.tar.xz
/clang-tools-extra-13.0.1.src.tar.xz.sig
/clang-13.0.1.src.tar.xz
/clang-13.0.1.src.tar.xz.sig
/clang-14.0.0.src.tar.xz
/clang-tools-extra-14.0.0.src.tar.xz
/clang-tools-extra-14.0.0.src.tar.xz.sig
/clang-14.0.0.src.tar.xz.sig
/llvm-13.0.1.src.tar.xz
/clang-14.0.5.src.tar.xz
/clang-14.0.5.src.tar.xz.sig
/clang-tools-extra-14.0.5.src.tar.xz
/clang-tools-extra-14.0.5.src.tar.xz.sig
/clang-14.0.6.src.tar.xz.sig
/clang-14.0.6.src.tar.xz
/clang-tools-extra-14.0.6.src.tar.xz
/clang-tools-extra-14.0.6.src.tar.xz.sig
/clang-15.0.0.src.tar.xz
/clang-15.0.0.src.tar.xz.sig
/clang-tools-extra-15.0.0.src.tar.xz
/clang-tools-extra-15.0.0.src.tar.xz.sig
/llvm-14.0.6.src.tar.xz
/llvm-14.0.6.src.tar.xz.sig
/clang-15.0.1.src.tar.xz
/clang-15.0.1.src.tar.xz.sig
/clang-tools-extra-15.0.1.src.tar.xz
/clang-tools-extra-15.0.1.src.tar.xz.sig
/clang-15.0.6.src.tar.xz
/clang-15.0.6.src.tar.xz.sig
/clang-tools-extra-15.0.6.src.tar.xz
/clang-tools-extra-15.0.6.src.tar.xz.sig
/clang-15.0.7.src.tar.xz
/clang-15.0.7.src.tar.xz.sig
/clang-tools-extra-15.0.7.src.tar.xz
/clang-tools-extra-15.0.7.src.tar.xz.sig

View File

@ -0,0 +1,30 @@
From 2a0175c88ccd8c162901ac0ade56859d2b599f38 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov@redhat.com>
Date: Mon, 17 Apr 2023 16:19:04 +0200
Subject: [PATCH] Change LLVM_COMMON_CMAKE_UTILS usage
Let LLVM_COMMON_CMAKE_UTILS store the directory where cmake modules are
available and stop assuming its directory structure.
---
clang/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index 1fff005d6525..f4b3ef4bd15a 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 3.13.4)
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
- set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
+ set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/Modules)
endif()
-include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
+include(${LLVM_COMMON_CMAKE_UTILS}/CMakePolicy.cmake
NO_POLICY_SCOPE)
# If we are not building as a part of LLVM, build Clang as an
--
2.39.2

View File

@ -0,0 +1,26 @@
From 701750a896a08d5841a7bc0d187bcddaa6c0f616 Mon Sep 17 00:00:00 2001
From: Tulio Magno Quites Machado Filho <tuliom@redhat.com>
Date: Thu, 16 Mar 2023 17:22:24 -0300
Subject: [PATCH] [PowerPC][clang] Fix triple
Some Linux distributions use ppc64le instead of powerpc.
---
clang/test/CodeGenCoroutines/pr56329.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/test/CodeGenCoroutines/pr56329.cpp b/clang/test/CodeGenCoroutines/pr56329.cpp
index 31d4849af4e7..69e0f1d337cf 100644
--- a/clang/test/CodeGenCoroutines/pr56329.cpp
+++ b/clang/test/CodeGenCoroutines/pr56329.cpp
@@ -2,7 +2,7 @@
//
// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %s -O3 -S -emit-llvm -o - | FileCheck %s
// This test is expected to fail on PowerPC.
-// XFAIL: target=powerpc{{.*}}
+// XFAIL: target={{(ppc|powerpc).*}}
#include "Inputs/coroutine.h"
--
2.39.2

View File

@ -1,7 +1,7 @@
From 1d639f1379fc052b8437284955b1cb0baf880894 Mon Sep 17 00:00:00 2001 From 581300e447602b9b7a505b0f07e8461d58d041ca Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com> From: Tom Stellard <tstellar@redhat.com>
Date: Fri, 1 Jul 2022 21:24:17 -0700 Date: Fri, 1 Jul 2022 21:24:17 -0700
Subject: clang-tools-extra: Make test dependency on LLVMHello optional Subject: [PATCH] clang-tools-extra: Make test dependency on LLVMHello optional
This fixes clang + clang-tools-extra standalone build after This fixes clang + clang-tools-extra standalone build after
36892727e4f19a60778e371d78f8fb09d8122c85. 36892727e4f19a60778e371d78f8fb09d8122c85.
@ -58,13 +58,16 @@ diff --git a/clang-tools-extra/test/lit.cfg.py b/clang-tools-extra/test/lit.cfg.
index 9b99bfd93440..3fca9f25fb48 100644 index 9b99bfd93440..3fca9f25fb48 100644
--- a/clang-tools-extra/test/lit.cfg.py --- a/clang-tools-extra/test/lit.cfg.py
+++ b/clang-tools-extra/test/lit.cfg.py +++ b/clang-tools-extra/test/lit.cfg.py
@@ -59,3 +59,6 @@ config.substitutions.append( @@ -59,6 +59,9 @@ config.substitutions.append(
# Plugins (loadable modules) # Plugins (loadable modules)
if config.has_plugins and config.llvm_plugin_ext: if config.has_plugins and config.llvm_plugin_ext:
config.available_features.add('plugins') config.available_features.add('plugins')
+ +
+if config.has_llvm_hello: +if config.has_llvm_hello:
+ config.available_features.add("llvm-hello") + config.available_features.add("llvm-hello")
# It is not realistically possible to account for all options that could
# possibly be present in system and user configuration files, so disable
diff --git a/clang-tools-extra/test/lit.site.cfg.py.in b/clang-tools-extra/test/lit.site.cfg.py.in diff --git a/clang-tools-extra/test/lit.site.cfg.py.in b/clang-tools-extra/test/lit.site.cfg.py.in
index 4eb830a1baf1..6e5559348454 100644 index 4eb830a1baf1..6e5559348454 100644
--- a/clang-tools-extra/test/lit.site.cfg.py.in --- a/clang-tools-extra/test/lit.site.cfg.py.in
@ -78,5 +81,5 @@ index 4eb830a1baf1..6e5559348454 100644
# used when we can't determine the tool dir at configuration time. # used when we can't determine the tool dir at configuration time.
config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@") config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
-- --
2.37.1 2.27.0

View File

@ -1,29 +0,0 @@
From 1d224b408bc6754bcea9e0b226d6c440f5a4f8fd Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov@redhat.com>
Date: Fri, 2 Sep 2022 16:30:15 +0200
Subject: Mark fopenmp-implicit-rpath as NoArgumentUnused
We pass this option unconditionally in LDFLAGS, make sure this
does not warn if openmp is not used, as this may break some
build systems.
---
clang/include/clang/Driver/Options.td | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 3cab37b21aaf..4452364f92da 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -4116,7 +4116,8 @@ defm openmp_implicit_rpath: BoolFOption<"openmp-implicit-rpath",
LangOpts<"OpenMP">,
DefaultTrue,
PosFlag<SetTrue, [], "Set rpath on OpenMP executables">,
- NegFlag<SetFalse>>;
+ NegFlag<SetFalse>,
+ BothFlags<[NoArgumentUnused]>>;
def r : Flag<["-"], "r">, Flags<[LinkerInput,NoArgumentUnused]>,
Group<Link_Group>;
def save_temps_EQ : Joined<["-", "--"], "save-temps=">, Flags<[CC1Option, FlangOption, NoXarchOption]>,
--
2.37.1

View File

@ -1,27 +1,28 @@
From 54806261c76384ae45de93b7b5ac2de4e74bb7ae Mon Sep 17 00:00:00 2001 From d95d3fbff661c0390072ed0bb4544d5e2aae5c9a Mon Sep 17 00:00:00 2001
From: serge-sans-paille <sguelton@redhat.com> From: serge-sans-paille <sguelton@redhat.com>
Date: Wed, 21 Sep 2022 12:21:06 +0200 Date: Thu, 25 Feb 2021 14:09:29 +0100
Subject: Make -funwind-tables the default on all archs Subject: [PATCH] Make -funwind-tables the default on all archs
--- ---
clang/lib/Driver/ToolChains/Gnu.cpp | 4 ++++ clang/lib/Driver/ToolChains/Gnu.cpp | 5 +++++
1 file changed, 4 insertions(+) 1 file changed, 5 insertions(+)
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
index 12fa2da3187e..96527ed52445 100644 index c8006f3d8412..6ed03adb7702 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp --- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2845,6 +2845,10 @@ bool Generic_GCC::IsUnwindTablesDefault(const ArgList &Args) const { @@ -2863,6 +2863,11 @@ Generic_GCC::getDefaultUnwindTableLevel(const ArgList &Args) const {
case llvm::Triple::ppc64le: case llvm::Triple::ppc64le:
case llvm::Triple::x86: case llvm::Triple::x86:
case llvm::Triple::x86_64: case llvm::Triple::x86_64:
+
+ // Enable -funwind-tables on all architectures supported by Fedora: + // Enable -funwind-tables on all architectures supported by Fedora:
+ // rhbz#1655546 + // rhbz#1655546
+ case llvm::Triple::systemz: + case llvm::Triple::systemz:
+ case llvm::Triple::arm: + case llvm::Triple::arm:
return true; return UnwindTableLevel::Asynchronous;
default: default:
return false; return UnwindTableLevel::None;
-- --
2.37.1 2.39.1

View File

@ -1,42 +0,0 @@
From ccfad825687fc45d04ddb987c476dfafb26e56d9 Mon Sep 17 00:00:00 2001
From: serge-sans-paille <sguelton@redhat.com>
Date: Thu, 25 Feb 2021 14:04:52 +0100
Subject: Reorganize gtest integration
---
clang/CMakeLists.txt | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index 13d76e7fd935..7452bafb0756 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -159,12 +159,6 @@ if(CLANG_BUILT_STANDALONE)
set(LLVM_UTILS_PROVIDED ON)
set(CLANG_TEST_DEPS FileCheck count not)
endif()
- set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
- if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
- AND NOT EXISTS ${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
- AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
- add_subdirectory(${UNITTEST_DIR} utils/unittest)
- endif()
else()
# Seek installed Lit.
find_program(LLVM_LIT
@@ -586,7 +580,11 @@ endif()
if( CLANG_INCLUDE_TESTS )
- if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include/gtest/gtest.h)
+ set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
+ if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
+ AND NOT EXISTS ${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
+ AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
+ add_subdirectory(${UNITTEST_DIR} utils/unittest)
add_subdirectory(unittests)
list(APPEND CLANG_TEST_DEPS ClangUnitTests)
list(APPEND CLANG_TEST_PARAMS
--
2.37.1

View File

@ -1,32 +0,0 @@
From 0ff89f236b9cc11662cf4f288cfd3254410d8243 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov@redhat.com>
Date: Thu, 3 Feb 2022 10:34:44 +0100
Subject: Work around gcc miscompile
This works around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104334,
which miscompiles clang on s390x and ppc64le. The issue is already
fixed on the gcc side, but including this as a temporary workaround
to get a working build.
---
clang/lib/Sema/DeclSpec.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/clang/lib/Sema/DeclSpec.cpp b/clang/lib/Sema/DeclSpec.cpp
index d4dc790c008a..77a1e6c32c6f 100644
--- a/clang/lib/Sema/DeclSpec.cpp
+++ b/clang/lib/Sema/DeclSpec.cpp
@@ -1203,8 +1203,9 @@ void DeclSpec::Finish(Sema &S, const PrintingPolicy &Policy) {
} else if (TypeSpecType == TST_double) {
// vector long double and vector long long double are never allowed.
// vector double is OK for Power7 and later, and ZVector.
- if (getTypeSpecWidth() == TypeSpecifierWidth::Long ||
- getTypeSpecWidth() == TypeSpecifierWidth::LongLong)
+ TypeSpecifierWidth TypeSpecWidth = getTypeSpecWidth();
+ if (TypeSpecWidth == TypeSpecifierWidth::Long ||
+ TypeSpecWidth == TypeSpecifierWidth::LongLong)
S.Diag(TSWRange.getBegin(),
diag::err_invalid_vector_long_double_decl_spec);
else if (!S.Context.getTargetInfo().hasFeature("vsx") &&
--
2.37.1

View File

@ -1,7 +1,7 @@
From 62728c7321a2d07f7d22dadc2b8565ad512b3da4 Mon Sep 17 00:00:00 2001 From 4ea62faaaac1aad0fe496cabe9674c809c91c49a Mon Sep 17 00:00:00 2001
From: Konrad Kleine <kkleine@redhat.com> From: Konrad Kleine <kkleine@redhat.com>
Date: Thu, 24 Mar 2022 09:44:21 +0100 Date: Mon, 13 Feb 2023 17:11:00 -0300
Subject: Produce DWARF4 by default Subject: [PATCH] Produce DWARF4 by default
Have a look at the following commit to see when the move from DWARF 4 to 5 first happened upstream: Have a look at the following commit to see when the move from DWARF 4 to 5 first happened upstream:
@ -9,18 +9,19 @@ https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8
--- ---
clang/include/clang/Driver/ToolChain.h | 2 +- clang/include/clang/Driver/ToolChain.h | 2 +-
clang/test/CodeGen/dwarf-version.c | 4 ++-- clang/test/CodeGen/dwarf-version.c | 4 ++--
clang/test/Driver/as-options.s | 4 ++--
clang/test/Driver/cl-options.c | 2 +- clang/test/Driver/cl-options.c | 2 +-
clang/test/Driver/clang-g-opts.c | 2 +- clang/test/Driver/clang-g-opts.c | 2 +-
clang/test/Driver/ve-toolchain.c | 2 +- clang/test/Driver/ve-toolchain.c | 2 +-
clang/test/Driver/ve-toolchain.cpp | 2 +- clang/test/Driver/ve-toolchain.cpp | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-) 7 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/clang/include/clang/Driver/ToolChain.h b/clang/include/clang/Driver/ToolChain.h diff --git a/clang/include/clang/Driver/ToolChain.h b/clang/include/clang/Driver/ToolChain.h
index f20ab164531b..53c86ee82936 100644 index f75f35dc9e65..a70ae2b17833 100644
--- a/clang/include/clang/Driver/ToolChain.h --- a/clang/include/clang/Driver/ToolChain.h
+++ b/clang/include/clang/Driver/ToolChain.h +++ b/clang/include/clang/Driver/ToolChain.h
@@ -535,7 +535,7 @@ public: @@ -547,7 +547,7 @@ public:
// Return the DWARF version to emit, in the absence of arguments // Return the DWARF version to emit, in the absence of arguments
// to the contrary. // to the contrary.
- virtual unsigned GetDefaultDwarfVersion() const { return 5; } - virtual unsigned GetDefaultDwarfVersion() const { return 5; }
@ -43,19 +44,41 @@ index 0a6fa4768026..96f01749d0d8 100644
// The -isysroot is used as a hack to avoid LIT messing with the SDKROOT // The -isysroot is used as a hack to avoid LIT messing with the SDKROOT
// environment variable which indirecty overrides the version in the target // environment variable which indirecty overrides the version in the target
diff --git a/clang/test/Driver/as-options.s b/clang/test/Driver/as-options.s
index 73d002c7ef7e..71d55f7fd537 100644
--- a/clang/test/Driver/as-options.s
+++ b/clang/test/Driver/as-options.s
@@ -122,7 +122,7 @@
// RUN: FileCheck --check-prefix=DEBUG %s
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -g0 -g %s -### 2>&1 | \
// RUN: FileCheck --check-prefix=DEBUG %s
-// DEBUG: "-g" "-gdwarf-5"
+// DEBUG: "-g" "-gdwarf-4"
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -g -g0 %s -### 2>&1 | \
// RUN: FileCheck --check-prefix=NODEBUG %s
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf-5 -g0 %s -### 2>&1 | \
@@ -141,7 +141,7 @@
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf-2 %s -### 2>&1 | \
// RUN: FileCheck --check-prefix=GDWARF2 %s
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf %s -### 2>&1 | \
-// RUN: FileCheck --check-prefix=GDWARF5 %s
+// RUN: FileCheck --check-prefix=GDWARF4 %s
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf-5 %s -### 2>&1 | \
// RUN: FileCheck --check-prefix=GDWARF5 %s
diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c
index a2e350a0a835..01889ba0bf9b 100644 index 1d588bdfc1b0..1ad57aedc3a4 100644
--- a/clang/test/Driver/cl-options.c --- a/clang/test/Driver/cl-options.c
+++ b/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c
@@ -570,7 +570,7 @@ @@ -575,7 +575,7 @@
// RUN: %clang_cl /Z7 -gdwarf /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s // RUN: %clang_cl /Z7 -gdwarf /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s
// Z7_gdwarf: "-gcodeview" // Z7_gdwarf: "-gcodeview"
// Z7_gdwarf: "-debug-info-kind=constructor" // Z7_gdwarf: "-debug-info-kind=constructor"
-// Z7_gdwarf: "-dwarf-version= -// Z7_gdwarf: "-dwarf-version=
+// Z7_gdwarf: "-dwarf-version=4 +// Z7_gdwarf: "-dwarf-version=4
// RUN: %clang_cl -fmsc-version=1800 -TP -### -- %s 2>&1 | FileCheck -check-prefix=CXX11 %s // RUN: %clang_cl /ZH:MD5 /c -### -- %s 2>&1 | FileCheck -check-prefix=ZH_MD5 %s
// CXX11: -std=c++11 // ZH_MD5: "-gsrc-hash=md5"
diff --git a/clang/test/Driver/clang-g-opts.c b/clang/test/Driver/clang-g-opts.c diff --git a/clang/test/Driver/clang-g-opts.c b/clang/test/Driver/clang-g-opts.c
index d982b1070cae..bb129e75769c 100644 index d982b1070cae..bb129e75769c 100644
--- a/clang/test/Driver/clang-g-opts.c --- a/clang/test/Driver/clang-g-opts.c
@ -96,5 +119,5 @@ index 5a33d5eceb61..cedf895b36dc 100644
///----------------------------------------------------------------------------- ///-----------------------------------------------------------------------------
/// Checking include-path /// Checking include-path
-- --
2.37.1 2.39.1

View File

@ -1,74 +0,0 @@
From bc9aa904bf9d24e7f39a2a866ff6b463858b6ccb Mon Sep 17 00:00:00 2001
From: serge-sans-paille <sguelton@redhat.com>
Date: Wed, 21 Sep 2022 16:08:45 +0200
Subject: [PATCH] [clang] Fix interaction between asm labels and inline
builtins
One must pick the same name as the one referenced in CodeGenFunction when
generating .inline version of an inline builtin, otherwise they are not
correctly replaced.
Differential Revision: https://reviews.llvm.org/D134362
---
clang/lib/CodeGen/CGExpr.cpp | 5 ++-
.../test/CodeGen/asm-label-inline-builtins.c | 32 +++++++++++++++++++
2 files changed, 36 insertions(+), 1 deletion(-)
create mode 100644 clang/test/CodeGen/asm-label-inline-builtins.c
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index bf3dd812b9e8..a951d53423bf 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -5046,7 +5046,10 @@ static CGCallee EmitDirectCallee(CodeGenFunction &CGF, GlobalDecl GD) {
if (auto builtinID = FD->getBuiltinID()) {
std::string NoBuiltinFD = ("no-builtin-" + FD->getName()).str();
std::string NoBuiltins = "no-builtins";
- std::string FDInlineName = (FD->getName() + ".inline").str();
+
+ auto *A = FD->getAttr<AsmLabelAttr>();
+ StringRef Ident = A ? A->getLabel() : FD->getName();
+ std::string FDInlineName = (Ident + ".inline").str();
bool IsPredefinedLibFunction =
CGF.getContext().BuiltinInfo.isPredefinedLibFunction(builtinID);
diff --git a/clang/test/CodeGen/asm-label-inline-builtins.c b/clang/test/CodeGen/asm-label-inline-builtins.c
new file mode 100644
index 000000000000..ab9afc29411d
--- /dev/null
+++ b/clang/test/CodeGen/asm-label-inline-builtins.c
@@ -0,0 +1,32 @@
+// RUN: %clang_cc1 -triple x86_64 -S -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
+//
+// Verifies that clang-generated *.inline carry the same name at call and callee
+// site, in spite of asm labels.
+
+typedef struct _IO_FILE FILE;
+extern FILE *stdout;
+extern int vprintf (const char *__restrict __format, __builtin_va_list __arg);
+extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
+ const char *__restrict __format, __builtin_va_list __ap);
+extern int __vprintf_chk (int __flag, const char *__restrict __format,
+ __builtin_va_list __ap);
+
+extern __typeof (vprintf) vprintf __asm ("__vprintfieee128");
+extern __typeof (__vfprintf_chk) __vfprintf_chk __asm ("__vfprintf_chkieee128");
+extern __typeof (__vprintf_chk) __vprintf_chk __asm ("__vprintf_chkieee128");
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+vprintf (const char *__restrict __fmt, __builtin_va_list __ap)
+{
+ return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap);
+}
+
+void test(const char *fmt, __builtin_va_list ap) {
+ vprintf(fmt, ap);
+}
+
+// CHECK-LABEL: void @test(
+// CHECK: call i32 @__vprintfieee128.inline(
+//
+// CHECK-LABEL: internal i32 @__vprintfieee128.inline(
+// CHECK: call i32 @__vfprintf_chkieee128(
--
2.37.2

53
D138472.diff Normal file
View File

@ -0,0 +1,53 @@
From 04b642c646048dd9df652eba05d45beaa13bc895 Mon Sep 17 00:00:00 2001
From: Konrad Kleine <kkleine@redhat.com>
Date: Mon, 23 Jan 2023 13:14:17 +0000
Subject: [PATCH] Rebased D138472
---
clang/CMakeLists.txt | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index 090cfa352078..f87838776c32 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -118,12 +118,11 @@ if(CLANG_BUILT_STANDALONE)
set(LLVM_UTILS_PROVIDED ON)
set(CLANG_TEST_DEPS FileCheck count not)
endif()
- set(UNITTEST_DIR ${LLVM_THIRD_PARTY_DIR}/unittest)
- if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
- AND NOT EXISTS ${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
- AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
- add_subdirectory(${UNITTEST_DIR} third-party/unittest)
- endif()
+ endif()
+
+ find_package(LLVMGTest HINTS "${LLVM_CMAKE_DIR}")
+ if (NOT TARGET llvm_gtest)
+ message(FATAL_ERROR "llvm-gtest not found. Please install llvm-gtest or disable tests with -DLLVM_INCLUDE_TESTS=OFF")
endif()
if(LLVM_LIT)
@@ -506,13 +505,11 @@ endif()
if( CLANG_INCLUDE_TESTS )
- if(EXISTS ${LLVM_THIRD_PARTY_DIR}/unittest/googletest/include/gtest/gtest.h)
- add_subdirectory(unittests)
- list(APPEND CLANG_TEST_DEPS ClangUnitTests)
- list(APPEND CLANG_TEST_PARAMS
- clang_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/test/Unit/lit.site.cfg
- )
- endif()
+ add_subdirectory(unittests)
+ list(APPEND CLANG_TEST_DEPS ClangUnitTests)
+ list(APPEND CLANG_TEST_PARAMS
+ clang_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/test/Unit/lit.site.cfg
+ )
add_subdirectory(test)
add_subdirectory(bindings/python/tests)
--
2.34.3

25
D141581.diff Normal file
View File

@ -0,0 +1,25 @@
diff --git a/clang/lib/Basic/CMakeLists.txt b/clang/lib/Basic/CMakeLists.txt
--- a/clang/lib/Basic/CMakeLists.txt
+++ b/clang/lib/Basic/CMakeLists.txt
@@ -110,7 +110,7 @@
DEPENDS
omp_gen
- RISCVTargetParserTableGen
+ LLVMTargetParser
)
target_link_libraries(clangBasic
diff --git a/clang/lib/Driver/CMakeLists.txt b/clang/lib/Driver/CMakeLists.txt
--- a/clang/lib/Driver/CMakeLists.txt
+++ b/clang/lib/Driver/CMakeLists.txt
@@ -93,7 +93,7 @@
DEPENDS
ClangDriverOptions
- RISCVTargetParserTableGen
+ LLVMTargetParser
LINK_LIBS
clangBasic

View File

@ -3,12 +3,12 @@
%global toolchain clang %global toolchain clang
%bcond_with compat_build %bcond_with compat_build
%bcond_with bundle_compat_lib %bcond_without bundle_compat_lib
%bcond_without check %bcond_without check
%global maj_ver 15 %global maj_ver 16
%global min_ver 0 %global min_ver 0
%global patch_ver 7 %global patch_ver 1
%global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver}
%if %{with compat_build} %if %{with compat_build}
@ -30,8 +30,8 @@
%endif %endif
%if %{with bundle_compat_lib} %if %{with bundle_compat_lib}
%global compat_maj_ver 14 %global compat_maj_ver 15
%global compat_ver %{compat_maj_ver}.0.6 %global compat_ver %{compat_maj_ver}.0.7
%endif %endif
@ -45,10 +45,10 @@
Name: %pkg_name Name: %pkg_name
Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}
Release: 3%{?dist} Release: 1%{?dist}
Summary: A C language family front-end for LLVM Summary: A C language family front-end for LLVM
License: NCSA License: Apache-2.0 WITH LLVM-exception OR NCSA
URL: http://llvm.org URL: http://llvm.org
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_srcdir}.tar.xz Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_srcdir}.tar.xz
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_srcdir}.tar.xz.sig Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_srcdir}.tar.xz.sig
@ -62,26 +62,34 @@ Source5: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat
Source6: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/clang-%{compat_ver}.src.tar.xz.sig Source6: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/clang-%{compat_ver}.src.tar.xz.sig
Source7: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/llvm-%{compat_ver}.src.tar.xz Source7: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/llvm-%{compat_ver}.src.tar.xz
Source8: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/llvm-%{compat_ver}.src.tar.xz.sig Source8: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/llvm-%{compat_ver}.src.tar.xz.sig
Source9: tstellar-gpg-key.asc Source9: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/cmake-%{compat_ver}.src.tar.xz
Source10: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/cmake-%{compat_ver}.src.tar.xz.sig
%endif %endif
%if !0%{with compat_build} %if !0%{with compat_build}
Source10: macros.%{name} Source11: macros.%{name}
%endif %endif
# Patches for clang # Patches for clang
Patch2: 0002-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch Patch1: 0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch
# TODO: Can be dropped in LLVM 16: https://reviews.llvm.org/D133316 Patch2: 0006-Don-t-install-static-libraries.patch
Patch3: 0003-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch Patch3: 0002-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch
Patch4: 0004-Reorganize-gtest-integration.patch Patch4: 0010-PATCH-clang-Produce-DWARF4-by-default.patch
# This patch can be dropped once gcc-12.0.1-0.5.fc36 is in the repo. # Fix a test based on the triple used on RHEL-based systems.
Patch5: 0005-Work-around-gcc-miscompile.patch Patch6: 0001-PowerPC-clang-Fix-triple.patch
Patch6: 0006-Don-t-install-static-libraries.patch # Make clangBasic and clangDriver depend on LLVMTargetParser
Patch7: 0007-Make-funwind-tables-the-default-on-all-archs.patch # See https://reviews.llvm.org/D141581
Patch8: 0008-Produce-DWARF4-by-default.patch Patch7: D141581.diff
Patch9: 0009-disable-recommonmark.patch # clang/cmake: Use installed gtest libraries for stand-alone builds
# TODO: Can be dropped in LLVM 16: https://reviews.llvm.org/D134362 # See https://reviews.llvm.org/D138472
Patch10: 0010-clang-Fix-interaction-between-asm-labels-and-inline-.patch Patch8: D138472.diff
Patch10: fix-ieee128-cross.diff
Patch11: 0001-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch
# RHEL specific patch
Patch12: 0009-disable-recommonmark.patch
%if %{without compat_build} %if %{without compat_build}
# Patches for clang-tools-extra # Patches for clang-tools-extra
@ -186,7 +194,7 @@ libomp-devel to enable -fopenmp.
%package libs %package libs
Summary: Runtime library for clang Summary: Runtime library for clang
Requires: %{name}-resource-filesystem%{?_isa} = %{version} Requires: %{name}-resource-filesystem%{?_isa} = %{version}
Requires: gcc-toolset-12-gcc-c++ Requires: gcc-toolset-13-gcc-c++
Recommends: compiler-rt%{?_isa} = %{version} Recommends: compiler-rt%{?_isa} = %{version}
# atomic support is not part of compiler-rt # atomic support is not part of compiler-rt
Recommends: libatomic%{?_isa} Recommends: libatomic%{?_isa}
@ -225,7 +233,7 @@ This package owns the clang resouce directory: $libdir/clang/$version/
%if %{without compat_build} %if %{without compat_build}
%package analyzer %package analyzer
Summary: A source code analysis framework Summary: A source code analysis framework
License: NCSA and MIT License: Apache-2.0 WITH LLVM-exception OR NCSA OR MIT
BuildArch: noarch BuildArch: noarch
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
@ -271,11 +279,13 @@ Requires: python3
%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%if %{with bundle_compat_lib} %if %{with bundle_compat_lib}
%{gpgverify} --keyring='%{SOURCE9}' --signature='%{SOURCE6}' --data='%{SOURCE5}' %{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE6}' --data='%{SOURCE5}'
%{gpgverify} --keyring='%{SOURCE9}' --signature='%{SOURCE8}' --data='%{SOURCE7}' %{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE8}' --data='%{SOURCE7}'
%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE10}' --data='%{SOURCE9}'
%setup -T -q -b 5 -n clang-%{compat_ver}.src %setup -T -q -b 5 -n clang-%{compat_ver}.src
%setup -T -q -b 7 -n llvm-%{compat_ver}.src %setup -T -q -b 7 -n llvm-%{compat_ver}.src
%setup -T -q -b 9 -n cmake-%{compat_ver}.src
%endif %endif
%if %{with compat_build} %if %{with compat_build}
@ -335,12 +345,10 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py
%if %{with bundle_compat_lib} %if %{with bundle_compat_lib}
mv ../clang-%{compat_ver}.src ../clang mv ../clang-%{compat_ver}.src ../clang
mv ../cmake-%{compat_ver}.src ../cmake
%global targets_to_build "X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF;WebAssembly" %global targets_to_build "X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF;WebAssembly"
# Use llvm cmake files from the main package.
#sed -i 's~${LLVM_CMAKE_PATH}~%{_libdir}/cmake/llvm/~' ../clang-%{compat_ver}.src/lib/Basic/CMakeLists.txt
%cmake -S ../llvm-%{compat_ver}.src -B ../clang-compat-libs -G Ninja \ %cmake -S ../llvm-%{compat_ver}.src -B ../clang-compat-libs -G Ninja \
-DLLVM_ENABLE_PROJECTS=clang \ -DLLVM_ENABLE_PROJECTS=clang \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
@ -397,6 +405,7 @@ mv ../clang-%{compat_ver}.src ../clang
%else %else
-DLLVM_TABLEGEN_EXE:FILEPATH=%{_bindir}/llvm-tblgen \ -DLLVM_TABLEGEN_EXE:FILEPATH=%{_bindir}/llvm-tblgen \
%endif %endif
-DLLVM_COMMON_CMAKE_UTILS=%{_libdir}/cmake/llvm \
-DCLANG_ENABLE_ARCMT:BOOL=ON \ -DCLANG_ENABLE_ARCMT:BOOL=ON \
-DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \ -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \
-DCLANG_INCLUDE_DOCS:BOOL=ON \ -DCLANG_INCLUDE_DOCS:BOOL=ON \
@ -416,7 +425,7 @@ mv ../clang-%{compat_ver}.src ../clang
-DCLANG_DEFAULT_LINKER=lld \ -DCLANG_DEFAULT_LINKER=lld \
%endif %endif
-DCLANG_DEFAULT_UNWINDLIB=libgcc \ -DCLANG_DEFAULT_UNWINDLIB=libgcc \
-DGCC_INSTALL_PREFIX=/opt/rh/gcc-toolset-12/root/usr \ -DGCC_INSTALL_PREFIX=/opt/rh/gcc-toolset-13/root/usr \
-DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF
%cmake_build %cmake_build
@ -437,14 +446,14 @@ rm -Rf %{buildroot}%{install_bindir}
rm -Rf %{buildroot}%{install_prefix}/share rm -Rf %{buildroot}%{install_prefix}/share
rm -Rf %{buildroot}%{install_prefix}/libexec rm -Rf %{buildroot}%{install_prefix}/libexec
# Remove scanview-py helper libs # Remove scanview-py helper libs
rm -Rf %{buildroot}%{install_prefix}/lib/{libear,libscanbuild} rm -Rf %{buildroot}%{install_prefix}/%{_lib}/{libear,libscanbuild}
%else %else
# File in the macros file for other packages to use. We are not doing this # File in the macros file for other packages to use. We are not doing this
# in the compat package, because the version macros would # conflict with # in the compat package, because the version macros would # conflict with
# eachother if both clang and the clang compat package were installed together. # eachother if both clang and the clang compat package were installed together.
install -p -m0644 -D %{SOURCE10} %{buildroot}%{_rpmmacrodir}/macros.%{name} install -p -m0644 -D %{SOURCE11} %{buildroot}%{_rpmmacrodir}/macros.%{name}
sed -i -e "s|@@CLANG_MAJOR_VERSION@@|%{maj_ver}|" \ sed -i -e "s|@@CLANG_MAJOR_VERSION@@|%{maj_ver}|" \
-e "s|@@CLANG_MINOR_VERSION@@|%{min_ver}|" \ -e "s|@@CLANG_MINOR_VERSION@@|%{min_ver}|" \
-e "s|@@CLANG_PATCH_VERSION@@|%{patch_ver}|" \ -e "s|@@CLANG_PATCH_VERSION@@|%{patch_ver}|" \
@ -456,7 +465,7 @@ install -p -m644 bindings/python/clang/* %{buildroot}%{python3_sitelib}/clang/
%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/clang %py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/clang
# install scanbuild-py to python sitelib. # install scanbuild-py to python sitelib.
mv %{buildroot}%{_prefix}/lib/{libear,libscanbuild} %{buildroot}%{python3_sitelib} mv %{buildroot}%{_prefix}/%{_lib}/{libear,libscanbuild} %{buildroot}%{python3_sitelib}
%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/{libear,libscanbuild} %py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/{libear,libscanbuild}
# Fix permissions of scan-view scripts # Fix permissions of scan-view scripts
@ -495,20 +504,11 @@ ln -s clang++ %{buildroot}%{_bindir}/clang++-%{maj_ver}
# Fix permission # Fix permission
chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1* chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1*
# create a link to clang's resource directory that is "constant" across minor
# version bumps
# this is required for packages like ccls that hardcode the link to clang's
# resource directory to not require rebuilds on minor version bumps
# Fix for bugs like rhbz#1807574
pushd %{buildroot}%{_libdir}/clang/
ln -s %{version} %{maj_ver}
popd
%endif %endif
# Create sub-directories in the clang resource directory that will be # Create sub-directories in the clang resource directory that will be
# populated by other packages # populated by other packages
mkdir -p %{buildroot}%{pkg_libdir}/clang/%{version}/{include,lib,share}/ mkdir -p %{buildroot}%{pkg_libdir}/clang/%{maj_ver}/{include,lib,share}/
# Remove clang-tidy headers. We don't ship the libraries for these. # Remove clang-tidy headers. We don't ship the libraries for these.
@ -571,11 +571,11 @@ mv ./libclang-cpp.so.%{compat_maj_ver} "$compat_lib"
%files libs %files libs
%if %{without compat_build} %if %{without compat_build}
%{_libdir}/clang/%{version}/include/* %{_libdir}/clang/%{maj_ver}/include/*
%{_libdir}/*.so.* %{_libdir}/*.so.*
%else %else
%{pkg_libdir}/*.so.* %{pkg_libdir}/*.so.*
%{pkg_libdir}/clang/%{version}/include/* %{pkg_libdir}/clang/%{maj_ver}/include/*
%endif %endif
%if %{with bundle_compat_lib} %if %{with bundle_compat_lib}
%{_libdir}/libclang.so.%{compat_maj_ver}* %{_libdir}/libclang.so.%{compat_maj_ver}*
@ -600,13 +600,10 @@ mv ./libclang-cpp.so.%{compat_maj_ver} "$compat_lib"
%files resource-filesystem %files resource-filesystem
%dir %{pkg_libdir}/clang/ %dir %{pkg_libdir}/clang/
%dir %{pkg_libdir}/clang/%{version}/ %dir %{pkg_libdir}/clang/%{maj_ver}/
%dir %{pkg_libdir}/clang/%{version}/include/ %dir %{pkg_libdir}/clang/%{maj_ver}/include/
%dir %{pkg_libdir}/clang/%{version}/lib/ %dir %{pkg_libdir}/clang/%{maj_ver}/lib/
%dir %{pkg_libdir}/clang/%{version}/share/ %dir %{pkg_libdir}/clang/%{maj_ver}/share/
%if %{without compat_build}
%{pkg_libdir}/clang/%{maj_ver}
%endif
%if %{without compat_build} %if %{without compat_build}
%files analyzer %files analyzer
@ -629,19 +626,19 @@ mv ./libclang-cpp.so.%{compat_maj_ver} "$compat_lib"
%files tools-extra %files tools-extra
%{_bindir}/amdgpu-arch
%{_bindir}/clang-apply-replacements %{_bindir}/clang-apply-replacements
%{_bindir}/clang-change-namespace %{_bindir}/clang-change-namespace
%{_bindir}/clang-check %{_bindir}/clang-check
%{_bindir}/clang-doc %{_bindir}/clang-doc
%{_bindir}/clang-extdef-mapping %{_bindir}/clang-extdef-mapping
%{_bindir}/clang-format %{_bindir}/clang-format
%{_bindir}/clang-include-cleaner
%{_bindir}/clang-include-fixer %{_bindir}/clang-include-fixer
%{_bindir}/clang-move %{_bindir}/clang-move
%{_bindir}/clang-offload-bundler %{_bindir}/clang-offload-bundler
%{_bindir}/clang-offload-packager %{_bindir}/clang-offload-packager
%{_bindir}/clang-offload-wrapper
%{_bindir}/clang-linker-wrapper %{_bindir}/clang-linker-wrapper
%{_bindir}/clang-nvlink-wrapper
%{_bindir}/clang-pseudo %{_bindir}/clang-pseudo
%{_bindir}/clang-query %{_bindir}/clang-query
%{_bindir}/clang-refactor %{_bindir}/clang-refactor
@ -653,6 +650,7 @@ mv ./libclang-cpp.so.%{compat_maj_ver} "$compat_lib"
%{_bindir}/clangd %{_bindir}/clangd
%{_bindir}/diagtool %{_bindir}/diagtool
%{_bindir}/hmaptool %{_bindir}/hmaptool
%{_bindir}/nvptx-arch
%{_bindir}/pp-trace %{_bindir}/pp-trace
%{_bindir}/c-index-test %{_bindir}/c-index-test
%{_bindir}/find-all-symbols %{_bindir}/find-all-symbols
@ -679,6 +677,9 @@ mv ./libclang-cpp.so.%{compat_maj_ver} "$compat_lib"
%endif %endif
%changelog %changelog
* Mon Apr 17 2023 Nikita Popov <npopov@redhat.com> - 16.0.1-1
- Update to LLVM 16.0.1
* Fri Jan 27 2023 Konrad Kleine <kkleine@redhat.com> - 15.0.7-3 * Fri Jan 27 2023 Konrad Kleine <kkleine@redhat.com> - 15.0.7-3
- Remove clang-tools-extra-devel package - Remove clang-tools-extra-devel package

16
fix-ieee128-cross.diff Normal file
View File

@ -0,0 +1,16 @@
diff --git a/clang/test/Driver/ppc-float-abi-warning.cpp b/clang/test/Driver/ppc-float-abi-warning.cpp
index e3baa9f4c059..87d6d87a3b31 100644
--- a/clang/test/Driver/ppc-float-abi-warning.cpp
+++ b/clang/test/Driver/ppc-float-abi-warning.cpp
@@ -17,10 +17,12 @@
// RUN: -mabi=ieeelongdouble -stdlib=libc++ -Wno-unsupported-abi 2>&1 | \
// RUN: FileCheck %s --check-prefix=NOWARN
// RUN: %clang -### --driver-mode=g++ -target powerpc64le-linux-gnu %s\
+// RUN: --dyld-prefix=%S/Inputs/powerpc64le-linux-gnu-tree/gcc-12 \
// RUN: -mabi=%if ppc_linux_default_ieeelongdouble %{ieeelongdouble%} \
// RUN: %else %{ibmlongdouble%} -stdlib=libc++ 2>&1 | \
// RUN: FileCheck %s --check-prefix=NOWARN
// RUN: %clang -### --driver-mode=g++ -target powerpc64le-linux-gnu %s\
+// RUN: --dyld-prefix=%S/Inputs/powerpc64le-linux-gnu-tree/gcc-12 \
// RUN: -mabi=%if ppc_linux_default_ieeelongdouble %{ibmlongdouble%} \
// RUN: %else %{ieeelongdouble%} -stdlib=libc++ 2>&1 | FileCheck %s

View File

@ -1,52 +0,0 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
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
67H2IH//2sf8dw==
=ADVe
-----END PGP PUBLIC KEY BLOCK-----

View File

@ -8,7 +8,7 @@
# headers and libraries. This path should be used by packages that need to # headers and libraries. This path should be used by packages that need to
# install files into this directory. This macro's value changes every time # install files into this directory. This macro's value changes every time
# clang's version changes. # clang's version changes.
%clang_resource_dir %{_libdir}/clang/%{clang_version} %clang_resource_dir %{_libdir}/clang/%{clang_major_version}
# This is the path to the clang resource directory that should be used # This is the path to the clang resource directory that should be used
# by packages that need to read files from this directory at runtime. # by packages that need to read files from this directory at runtime.

10
sources
View File

@ -1,4 +1,10 @@
SHA512 (clang-15.0.7.src.tar.xz) = 9fd2736a9f5993ddbb5b3c507fe497234a6def64f6f418f379d1ca56c9c361ad1ae9a5445ab938230fbc1671ec00b4f802a412b048569023863c20dc6bb46a1f SHA512 (clang-15.0.7.src.tar.xz) = 9fd2736a9f5993ddbb5b3c507fe497234a6def64f6f418f379d1ca56c9c361ad1ae9a5445ab938230fbc1671ec00b4f802a412b048569023863c20dc6bb46a1f
SHA512 (clang-15.0.7.src.tar.xz.sig) = e1b41c5a6509c3554794bfa1b8d048f13268bc2234d7480f04f7700e27bd9d53e40bc1433885716a64da57458f3041c42a66639045476daefffc3f5d2e3d6efd SHA512 (clang-15.0.7.src.tar.xz.sig) = e1b41c5a6509c3554794bfa1b8d048f13268bc2234d7480f04f7700e27bd9d53e40bc1433885716a64da57458f3041c42a66639045476daefffc3f5d2e3d6efd
SHA512 (clang-tools-extra-15.0.7.src.tar.xz) = dd95d261d3a1618967b698e97ac0b41204d872d7479c0c832fcf5a91fe447af6a97fa794de07b3e271285867b30b905688f090e98f516b9df4cdfb3bad9defc6 SHA512 (llvm-15.0.7.src.tar.xz) = ed8d565515b1bc6164e4ff06d3388ba92e332850305496fd65db9adf1ec87bd9dd1bfde49dd41be5d5216289efc72bfd287cd7392f2bba80b740d4c314c749e5
SHA512 (clang-tools-extra-15.0.7.src.tar.xz.sig) = 10887b80d453d1ec826afbf5cfd937d5b671ed73f54691072b2b097da21f9358b8d6372df79200dc0694cbbc40b816c4139690b4e7033ba03a8a9b92611ee4ce SHA512 (llvm-15.0.7.src.tar.xz.sig) = 79fc82dfabe397f7df4c139f75fa9a0a34c92b77d603543a4eb3e579e253a9d84d0e8314f7356ed77326977d6190997b42f074a6c910d0f932e6b21d09374bde
SHA512 (cmake-15.0.7.src.tar.xz) = 85097a6eaee0df004567905f7e5ce8ca02e3b46c6fc66fa552fe99734642e6ee61685de4e5e6e8b505963334d7b91d98ecd9c5870e6bdd3f0018ee5b963ffa96
SHA512 (cmake-15.0.7.src.tar.xz.sig) = 61d53c602bcb099426b8828a239628ba2fca9616afcdf67ce3c8c887146dce99a649ddb625df096e3d8aa9ede1ea9bb6933f88f3adec0192fd68faeca2488a1a
SHA512 (clang-16.0.1.src.tar.xz) = c7ef4c386471850f30e194d0a8afe95fdd366c9182b1cdd7653342dcbf72a2b90970c0c4cc900314a26ba131163adec234eec00816207266fbe9c2259d01b61a
SHA512 (clang-16.0.1.src.tar.xz.sig) = 31756b55641debde8e075819a3705c9fbf9a3e39d0f5da5a0e8421bd96eb19972ced6f22df0f66f918d48375089c06b5e499f0627dc81d22956421d9791e088e
SHA512 (clang-tools-extra-16.0.1.src.tar.xz) = eb3a5656526db559fa331e4020305b6070a33e9c4e7a082f0ebe2b307ac43d542c989585e99c660fc749041774ff80dbad089678456318b40415e340654424c8
SHA512 (clang-tools-extra-16.0.1.src.tar.xz.sig) = c661a454ddc27aa12fd82aa19f49e26982147519bb108580059042302dc010b351d99fef65dc51c854a3d06a89a9200ee22dd613a1777bcf35b5236fa75ba2af

Binary file not shown.