From 8ffdcd4aff6be74d167d02833d16092660c1a830 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 17 Apr 2023 16:04:14 +0200 Subject: [PATCH] Update to LLVM 16.0.1 Resolves: #2178739 --- .gitignore | 219 +----------------- ...Change-LLVM_COMMON_CMAKE_UTILS-usage.patch | 30 +++ 0001-PowerPC-clang-Fix-triple.patch | 26 +++ ...a-Make-test-dependency-on-LLVMHello-.patch | 11 +- ...p-implicit-rpath-as-NoArgumentUnused.patch | 29 --- ...wind-tables-the-default-on-all-archs.patch | 21 +- 0004-Reorganize-gtest-integration.patch | 42 ---- 0005-Work-around-gcc-miscompile.patch | 32 --- ...ATCH-clang-Produce-DWARF4-by-default.patch | 47 +++- ...ction-between-asm-labels-and-inline-.patch | 74 ------ D138472.diff | 53 +++++ D141581.diff | 25 ++ clang.spec | 107 ++++----- fix-ieee128-cross.diff | 16 ++ hans-gpg-key.asc | 52 ----- macros.clang | 2 +- sources | 10 +- tstellar-gpg-key.asc | Bin 2222 -> 0 bytes 18 files changed, 271 insertions(+), 525 deletions(-) create mode 100644 0001-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch create mode 100644 0001-PowerPC-clang-Fix-triple.patch delete mode 100644 0003-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch rename 0007-Make-funwind-tables-the-default-on-all-archs.patch => 0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch (53%) delete mode 100644 0004-Reorganize-gtest-integration.patch delete mode 100644 0005-Work-around-gcc-miscompile.patch rename 0008-Produce-DWARF4-by-default.patch => 0010-PATCH-clang-Produce-DWARF4-by-default.patch (71%) delete mode 100644 0010-clang-Fix-interaction-between-asm-labels-and-inline-.patch create mode 100644 D138472.diff create mode 100644 D141581.diff create mode 100644 fix-ieee128-cross.diff delete mode 100644 hans-gpg-key.asc delete mode 100644 tstellar-gpg-key.asc diff --git a/.gitignore b/.gitignore index eb2fa23..4f5174a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,214 +1,5 @@ -/cfe-3.7.1.src.tar.xz -/clang-3.8.0-0.1.fc24.src.rpm -/cfe-3.8.0rc2.src.tar.xz -/cfe-3.8.0rc3.src.tar.xz -/cfe-3.8.0.src.tar.xz -/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 +/*.src.rpm +/*.src.tar.xz +/*.src.tar.xz.sig +/cmake/ +/results_clang/ diff --git a/0001-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch b/0001-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch new file mode 100644 index 0000000..d330f87 --- /dev/null +++ b/0001-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch @@ -0,0 +1,30 @@ +From 2a0175c88ccd8c162901ac0ade56859d2b599f38 Mon Sep 17 00:00:00 2001 +From: Nikita Popov +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 + diff --git a/0001-PowerPC-clang-Fix-triple.patch b/0001-PowerPC-clang-Fix-triple.patch new file mode 100644 index 0000000..f8e6912 --- /dev/null +++ b/0001-PowerPC-clang-Fix-triple.patch @@ -0,0 +1,26 @@ +From 701750a896a08d5841a7bc0d187bcddaa6c0f616 Mon Sep 17 00:00:00 2001 +From: Tulio Magno Quites Machado Filho +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 + diff --git a/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch b/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch index fea1bd5..a0b8cb0 100644 --- a/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch +++ b/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch @@ -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 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 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 --- a/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) if config.has_plugins and config.llvm_plugin_ext: config.available_features.add('plugins') + +if config.has_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 index 4eb830a1baf1..6e5559348454 100644 --- 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. config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@") -- -2.37.1 +2.27.0 diff --git a/0003-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch b/0003-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch deleted file mode 100644 index 9e79262..0000000 --- a/0003-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 1d224b408bc6754bcea9e0b226d6c440f5a4f8fd Mon Sep 17 00:00:00 2001 -From: Nikita Popov -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, -- NegFlag>; -+ NegFlag, -+ BothFlags<[NoArgumentUnused]>>; - def r : Flag<["-"], "r">, Flags<[LinkerInput,NoArgumentUnused]>, - Group; - def save_temps_EQ : Joined<["-", "--"], "save-temps=">, Flags<[CC1Option, FlangOption, NoXarchOption]>, --- -2.37.1 - diff --git a/0007-Make-funwind-tables-the-default-on-all-archs.patch b/0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch similarity index 53% rename from 0007-Make-funwind-tables-the-default-on-all-archs.patch rename to 0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch index 78b77e9..ce920f9 100644 --- a/0007-Make-funwind-tables-the-default-on-all-archs.patch +++ b/0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch @@ -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 -Date: Wed, 21 Sep 2022 12:21:06 +0200 -Subject: Make -funwind-tables the default on all archs +Date: Thu, 25 Feb 2021 14:09:29 +0100 +Subject: [PATCH] Make -funwind-tables the default on all archs --- - clang/lib/Driver/ToolChains/Gnu.cpp | 4 ++++ - 1 file changed, 4 insertions(+) + clang/lib/Driver/ToolChains/Gnu.cpp | 5 +++++ + 1 file changed, 5 insertions(+) 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 +++ 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::x86: case llvm::Triple::x86_64: ++ + // Enable -funwind-tables on all architectures supported by Fedora: + // rhbz#1655546 + case llvm::Triple::systemz: + case llvm::Triple::arm: - return true; + return UnwindTableLevel::Asynchronous; default: - return false; + return UnwindTableLevel::None; -- -2.37.1 +2.39.1 diff --git a/0004-Reorganize-gtest-integration.patch b/0004-Reorganize-gtest-integration.patch deleted file mode 100644 index 7c836cc..0000000 --- a/0004-Reorganize-gtest-integration.patch +++ /dev/null @@ -1,42 +0,0 @@ -From ccfad825687fc45d04ddb987c476dfafb26e56d9 Mon Sep 17 00:00:00 2001 -From: serge-sans-paille -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 - diff --git a/0005-Work-around-gcc-miscompile.patch b/0005-Work-around-gcc-miscompile.patch deleted file mode 100644 index 9260e01..0000000 --- a/0005-Work-around-gcc-miscompile.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0ff89f236b9cc11662cf4f288cfd3254410d8243 Mon Sep 17 00:00:00 2001 -From: Nikita Popov -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 - diff --git a/0008-Produce-DWARF4-by-default.patch b/0010-PATCH-clang-Produce-DWARF4-by-default.patch similarity index 71% rename from 0008-Produce-DWARF4-by-default.patch rename to 0010-PATCH-clang-Produce-DWARF4-by-default.patch index 3aafaa9..ea81f74 100644 --- a/0008-Produce-DWARF4-by-default.patch +++ b/0010-PATCH-clang-Produce-DWARF4-by-default.patch @@ -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 -Date: Thu, 24 Mar 2022 09:44:21 +0100 -Subject: Produce DWARF4 by default +Date: Mon, 13 Feb 2023 17:11:00 -0300 +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: @@ -9,18 +9,19 @@ https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8 --- clang/include/clang/Driver/ToolChain.h | 2 +- clang/test/CodeGen/dwarf-version.c | 4 ++-- + clang/test/Driver/as-options.s | 4 ++-- clang/test/Driver/cl-options.c | 2 +- clang/test/Driver/clang-g-opts.c | 2 +- clang/test/Driver/ve-toolchain.c | 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 -index f20ab164531b..53c86ee82936 100644 +index f75f35dc9e65..a70ae2b17833 100644 --- a/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 // to the contrary. - 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 // 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 -index a2e350a0a835..01889ba0bf9b 100644 +index 1d588bdfc1b0..1ad57aedc3a4 100644 --- a/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 // Z7_gdwarf: "-gcodeview" // Z7_gdwarf: "-debug-info-kind=constructor" -// Z7_gdwarf: "-dwarf-version= +// Z7_gdwarf: "-dwarf-version=4 - // RUN: %clang_cl -fmsc-version=1800 -TP -### -- %s 2>&1 | FileCheck -check-prefix=CXX11 %s - // CXX11: -std=c++11 + // RUN: %clang_cl /ZH:MD5 /c -### -- %s 2>&1 | FileCheck -check-prefix=ZH_MD5 %s + // ZH_MD5: "-gsrc-hash=md5" diff --git a/clang/test/Driver/clang-g-opts.c b/clang/test/Driver/clang-g-opts.c index d982b1070cae..bb129e75769c 100644 --- a/clang/test/Driver/clang-g-opts.c @@ -96,5 +119,5 @@ index 5a33d5eceb61..cedf895b36dc 100644 ///----------------------------------------------------------------------------- /// Checking include-path -- -2.37.1 +2.39.1 diff --git a/0010-clang-Fix-interaction-between-asm-labels-and-inline-.patch b/0010-clang-Fix-interaction-between-asm-labels-and-inline-.patch deleted file mode 100644 index 948d164..0000000 --- a/0010-clang-Fix-interaction-between-asm-labels-and-inline-.patch +++ /dev/null @@ -1,74 +0,0 @@ -From bc9aa904bf9d24e7f39a2a866ff6b463858b6ccb Mon Sep 17 00:00:00 2001 -From: serge-sans-paille -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(); -+ 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 - diff --git a/D138472.diff b/D138472.diff new file mode 100644 index 0000000..5d3cd60 --- /dev/null +++ b/D138472.diff @@ -0,0 +1,53 @@ +From 04b642c646048dd9df652eba05d45beaa13bc895 Mon Sep 17 00:00:00 2001 +From: Konrad Kleine +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 + diff --git a/D141581.diff b/D141581.diff new file mode 100644 index 0000000..c227e22 --- /dev/null +++ b/D141581.diff @@ -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 + diff --git a/clang.spec b/clang.spec index dc29607..1a5507e 100644 --- a/clang.spec +++ b/clang.spec @@ -3,12 +3,12 @@ %global toolchain clang %bcond_with compat_build -%bcond_with bundle_compat_lib +%bcond_without bundle_compat_lib %bcond_without check -%global maj_ver 15 +%global maj_ver 16 %global min_ver 0 -%global patch_ver 7 +%global patch_ver 1 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} %if %{with compat_build} @@ -30,8 +30,8 @@ %endif %if %{with bundle_compat_lib} -%global compat_maj_ver 14 -%global compat_ver %{compat_maj_ver}.0.6 +%global compat_maj_ver 15 +%global compat_ver %{compat_maj_ver}.0.7 %endif @@ -45,10 +45,10 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 3%{?dist} +Release: 1%{?dist} Summary: A C language family front-end for LLVM -License: NCSA +License: Apache-2.0 WITH LLVM-exception OR NCSA 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 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 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 -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 %if !0%{with compat_build} -Source10: macros.%{name} +Source11: macros.%{name} %endif # Patches for clang -Patch2: 0002-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch -# TODO: Can be dropped in LLVM 16: https://reviews.llvm.org/D133316 -Patch3: 0003-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch -Patch4: 0004-Reorganize-gtest-integration.patch -# This patch can be dropped once gcc-12.0.1-0.5.fc36 is in the repo. -Patch5: 0005-Work-around-gcc-miscompile.patch -Patch6: 0006-Don-t-install-static-libraries.patch -Patch7: 0007-Make-funwind-tables-the-default-on-all-archs.patch -Patch8: 0008-Produce-DWARF4-by-default.patch -Patch9: 0009-disable-recommonmark.patch -# TODO: Can be dropped in LLVM 16: https://reviews.llvm.org/D134362 -Patch10: 0010-clang-Fix-interaction-between-asm-labels-and-inline-.patch +Patch1: 0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch +Patch2: 0006-Don-t-install-static-libraries.patch +Patch3: 0002-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch +Patch4: 0010-PATCH-clang-Produce-DWARF4-by-default.patch +# Fix a test based on the triple used on RHEL-based systems. +Patch6: 0001-PowerPC-clang-Fix-triple.patch +# Make clangBasic and clangDriver depend on LLVMTargetParser +# See https://reviews.llvm.org/D141581 +Patch7: D141581.diff +# clang/cmake: Use installed gtest libraries for stand-alone builds +# See https://reviews.llvm.org/D138472 +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} # Patches for clang-tools-extra @@ -186,7 +194,7 @@ libomp-devel to enable -fopenmp. %package libs Summary: Runtime library for clang Requires: %{name}-resource-filesystem%{?_isa} = %{version} -Requires: gcc-toolset-12-gcc-c++ +Requires: gcc-toolset-13-gcc-c++ Recommends: compiler-rt%{?_isa} = %{version} # atomic support is not part of compiler-rt Recommends: libatomic%{?_isa} @@ -225,7 +233,7 @@ This package owns the clang resouce directory: $libdir/clang/$version/ %if %{without compat_build} %package analyzer Summary: A source code analysis framework -License: NCSA and MIT +License: Apache-2.0 WITH LLVM-exception OR NCSA OR MIT BuildArch: noarch Requires: %{name} = %{version}-%{release} @@ -271,11 +279,13 @@ Requires: python3 %{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %if %{with bundle_compat_lib} -%{gpgverify} --keyring='%{SOURCE9}' --signature='%{SOURCE6}' --data='%{SOURCE5}' -%{gpgverify} --keyring='%{SOURCE9}' --signature='%{SOURCE8}' --data='%{SOURCE7}' +%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE6}' --data='%{SOURCE5}' +%{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 7 -n llvm-%{compat_ver}.src +%setup -T -q -b 9 -n cmake-%{compat_ver}.src %endif %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} 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" -# 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 \ -DLLVM_ENABLE_PROJECTS=clang \ -DCMAKE_BUILD_TYPE=Release \ @@ -397,6 +405,7 @@ mv ../clang-%{compat_ver}.src ../clang %else -DLLVM_TABLEGEN_EXE:FILEPATH=%{_bindir}/llvm-tblgen \ %endif + -DLLVM_COMMON_CMAKE_UTILS=%{_libdir}/cmake/llvm \ -DCLANG_ENABLE_ARCMT:BOOL=ON \ -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \ -DCLANG_INCLUDE_DOCS:BOOL=ON \ @@ -416,7 +425,7 @@ mv ../clang-%{compat_ver}.src ../clang -DCLANG_DEFAULT_LINKER=lld \ %endif -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 %cmake_build @@ -437,14 +446,14 @@ rm -Rf %{buildroot}%{install_bindir} rm -Rf %{buildroot}%{install_prefix}/share rm -Rf %{buildroot}%{install_prefix}/libexec # Remove scanview-py helper libs -rm -Rf %{buildroot}%{install_prefix}/lib/{libear,libscanbuild} +rm -Rf %{buildroot}%{install_prefix}/%{_lib}/{libear,libscanbuild} %else # 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 # 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}|" \ -e "s|@@CLANG_MINOR_VERSION@@|%{min_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 # 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} # Fix permissions of scan-view scripts @@ -495,20 +504,11 @@ ln -s clang++ %{buildroot}%{_bindir}/clang++-%{maj_ver} # Fix permission 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 # Create sub-directories in the clang resource directory that will be # 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. @@ -571,11 +571,11 @@ mv ./libclang-cpp.so.%{compat_maj_ver} "$compat_lib" %files libs %if %{without compat_build} -%{_libdir}/clang/%{version}/include/* +%{_libdir}/clang/%{maj_ver}/include/* %{_libdir}/*.so.* %else %{pkg_libdir}/*.so.* -%{pkg_libdir}/clang/%{version}/include/* +%{pkg_libdir}/clang/%{maj_ver}/include/* %endif %if %{with bundle_compat_lib} %{_libdir}/libclang.so.%{compat_maj_ver}* @@ -600,13 +600,10 @@ mv ./libclang-cpp.so.%{compat_maj_ver} "$compat_lib" %files resource-filesystem %dir %{pkg_libdir}/clang/ -%dir %{pkg_libdir}/clang/%{version}/ -%dir %{pkg_libdir}/clang/%{version}/include/ -%dir %{pkg_libdir}/clang/%{version}/lib/ -%dir %{pkg_libdir}/clang/%{version}/share/ -%if %{without compat_build} -%{pkg_libdir}/clang/%{maj_ver} -%endif +%dir %{pkg_libdir}/clang/%{maj_ver}/ +%dir %{pkg_libdir}/clang/%{maj_ver}/include/ +%dir %{pkg_libdir}/clang/%{maj_ver}/lib/ +%dir %{pkg_libdir}/clang/%{maj_ver}/share/ %if %{without compat_build} %files analyzer @@ -629,19 +626,19 @@ mv ./libclang-cpp.so.%{compat_maj_ver} "$compat_lib" %files tools-extra +%{_bindir}/amdgpu-arch %{_bindir}/clang-apply-replacements %{_bindir}/clang-change-namespace %{_bindir}/clang-check %{_bindir}/clang-doc %{_bindir}/clang-extdef-mapping %{_bindir}/clang-format +%{_bindir}/clang-include-cleaner %{_bindir}/clang-include-fixer %{_bindir}/clang-move %{_bindir}/clang-offload-bundler %{_bindir}/clang-offload-packager -%{_bindir}/clang-offload-wrapper %{_bindir}/clang-linker-wrapper -%{_bindir}/clang-nvlink-wrapper %{_bindir}/clang-pseudo %{_bindir}/clang-query %{_bindir}/clang-refactor @@ -653,6 +650,7 @@ mv ./libclang-cpp.so.%{compat_maj_ver} "$compat_lib" %{_bindir}/clangd %{_bindir}/diagtool %{_bindir}/hmaptool +%{_bindir}/nvptx-arch %{_bindir}/pp-trace %{_bindir}/c-index-test %{_bindir}/find-all-symbols @@ -679,6 +677,9 @@ mv ./libclang-cpp.so.%{compat_maj_ver} "$compat_lib" %endif %changelog +* Mon Apr 17 2023 Nikita Popov - 16.0.1-1 +- Update to LLVM 16.0.1 + * Fri Jan 27 2023 Konrad Kleine - 15.0.7-3 - Remove clang-tools-extra-devel package diff --git a/fix-ieee128-cross.diff b/fix-ieee128-cross.diff new file mode 100644 index 0000000..218c229 --- /dev/null +++ b/fix-ieee128-cross.diff @@ -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 diff --git a/hans-gpg-key.asc b/hans-gpg-key.asc deleted file mode 100644 index 4b3cdde..0000000 --- a/hans-gpg-key.asc +++ /dev/null @@ -1,52 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -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 -67H2IH//2sf8dw== -=ADVe ------END PGP PUBLIC KEY BLOCK----- diff --git a/macros.clang b/macros.clang index 1f26e35..6f35452 100644 --- a/macros.clang +++ b/macros.clang @@ -8,7 +8,7 @@ # 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 # 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 # by packages that need to read files from this directory at runtime. diff --git a/sources b/sources index 217a12d..3f71af9 100644 --- a/sources +++ b/sources @@ -1,4 +1,10 @@ SHA512 (clang-15.0.7.src.tar.xz) = 9fd2736a9f5993ddbb5b3c507fe497234a6def64f6f418f379d1ca56c9c361ad1ae9a5445ab938230fbc1671ec00b4f802a412b048569023863c20dc6bb46a1f SHA512 (clang-15.0.7.src.tar.xz.sig) = e1b41c5a6509c3554794bfa1b8d048f13268bc2234d7480f04f7700e27bd9d53e40bc1433885716a64da57458f3041c42a66639045476daefffc3f5d2e3d6efd -SHA512 (clang-tools-extra-15.0.7.src.tar.xz) = dd95d261d3a1618967b698e97ac0b41204d872d7479c0c832fcf5a91fe447af6a97fa794de07b3e271285867b30b905688f090e98f516b9df4cdfb3bad9defc6 -SHA512 (clang-tools-extra-15.0.7.src.tar.xz.sig) = 10887b80d453d1ec826afbf5cfd937d5b671ed73f54691072b2b097da21f9358b8d6372df79200dc0694cbbc40b816c4139690b4e7033ba03a8a9b92611ee4ce +SHA512 (llvm-15.0.7.src.tar.xz) = ed8d565515b1bc6164e4ff06d3388ba92e332850305496fd65db9adf1ec87bd9dd1bfde49dd41be5d5216289efc72bfd287cd7392f2bba80b740d4c314c749e5 +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 diff --git a/tstellar-gpg-key.asc b/tstellar-gpg-key.asc deleted file mode 100644 index eba625c41a5fb1646d8b087acb97a6f079901712..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2222 zcmV;f2vPT$0u2OO>VZ805CFTzjTRs0jjXv;pGugCr`4v#a%GKo$r!Jd->PCt z$y%rpj==vUV}Ir+*R8b>IVmXk+p1pb?8#X&nu=A^mMLf^hWzyKgNi2>hyWLVh=fxY z2uQphyka|M&B_iX7`4E;@VIVye4j+?(eh_~`%yu#&d z*V9fM6W6bny8d9hd1I{mwtG%>CC@J*juZpAErTo`!5xcYL1Aj+mdQryB5UR$E%yF6 z*!s!u));Q?P+9N#0Q6S0jli^^Y40t$(uybAR^$1y6%VyNeBeQ!@oTFdcu?K8u$-I` zKDUMj7UGg4A}({Q;YHV$l=+&0cGG3Hh4_R+d%{rZxYsm$HE!9TA$H#_hM3|NNT^K> zZQU8HH=}vu#c;-9-Jyy=nkH&Ih5=&vyyTF3Oa0+QyQp|o8>g~GALwBu0JFctO)F4By^oR|Q&^+ok_ahpz* zx2{4_^~smFohQB{Cn}OKl!M)6h-Sp7pTRPF)8{xDQnsT*2KBVqzLp^_b}_%Gi3#{7 zPmKinsRK(isAm8X0RRECB2;f}AX9W@Y;0k2WFS0rb97~FY+-Uha%E&_VRSBIZ*4w_ z0zU*30RjLi1p->?fjt5n0|f~I;WK~-3ke7Z0|EgC6$kC|{ ztfg+f-L$-*LG&Y8rEs>Pk0kY2M!#d(HZRxiE0ipTCeAm7F|v6IH9B7Vlm=s3u!P6x zukC3z;PJmJ)xh$MIj*i=cG31 zsr(;uWSlOsz%_4Yz*UkKLqI0&M?pa@7vLxT7E~NOMQpRmC;};m26SlTQ+yR!^FSkd z5X@jE=BH4}c|41ZEr0imr|M~OJc6e@^UU(IF|W<>p1aTajeew-gHXQNys755V(S?e zy&C%siGryJ(2hm;uw^%r#}(W7xEi6^+X#Ec26;Q4R?Bq8H1hLh#VmX*+=kLh#l)OH zuC2P$?)S;hs*FQk8?PUuG{npPBS~7t;@#%(02I5L`it-=nvT%hwBu9Vylt?Rx_WO8 zn;xz3>aTq41Kx`}**s6A$49Kf_AikxBYjpmen!2RxlOtbF<6izL<4CJepUil@?zwT z9--9FX0i_jVtyY+6GeUXY{C6s&jp=gZVLvg0K<2!X;=PL%?gW_4bZMVYaV0@NJs-G zR53P~&$$8(1X}8WJpm8^!P@Z0GUu_8r6%69;^`~$FlQ_sXC1gfPE!ZD7nWV}F8ra9JxN4Hc;rg@5`G`UmNK zQK2H?OT@C(8zIO}kZRe0_IN@oCg4<+qQMIIQ9BTzli>7{__%>7EJKyOXMQt~d~dO#*vR-UpkDf2!SqwMz3;vEnk@ z?=o=Jt#mt#&qQ5T^Djs9 z^4k@B1GCy801*KI0f_=71Q-DV01pKMTIzv40vikk2?60VfB*^!5TeJFsfIzFiUFe# z0I}kKVKh7v)wfS?mcAnLFf2mw>&+IUnN!`^A5o?AROoVE|1Wn*mv*_@{l7RSech<$ z?RLGlpeWdkMhbOTAw|NxrZVM!5o8(5NV^UY>QiIQrC87nWDTTnJfN`ajL|@# zl)Qnlzy(_cGgW866I0m2oMj27)0bsK>19i)o*dAxPI!tSpuQR`^kJnT+%gR}_vkiWGx zBRSn>o||dsUIz{u>`KQ`n~m24dqQqPaip8qJ@%<^y5X6+qY7;4MB$!YUu}^Vz&|fAyIM wpX0lD!)BYGzJZL|-kImy^XM9ph5)K0`p3zNu2XNcRC)Y~P3B_BHh)~2!0gUKHvj+t