From a679a440e94ce20345422cc9be9b96372d8fba6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 14 Jun 2022 07:36:46 +0200 Subject: [PATCH] Update to 14.0.5 Increase version and drop ununeeded patches. --- .gitignore | 4 + 0001-HIP-Fix-HIP-include-path.patch | 122 ---------------------------- clang.spec | 11 ++- m-branch-protection.patch | 44 ---------- sources | 8 +- 5 files changed, 13 insertions(+), 176 deletions(-) delete mode 100644 0001-HIP-Fix-HIP-include-path.patch delete mode 100644 m-branch-protection.patch diff --git a/.gitignore b/.gitignore index 44df38c..b39b646 100644 --- a/.gitignore +++ b/.gitignore @@ -215,3 +215,7 @@ /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 +/clang-tools-extra-14.0.5.src.tar.xz +/clang-tools-extra-14.0.5.src.tar.xz.sig +/clang-14.0.5.src.tar.xz.sig +/clang-14.0.5.src.tar.xz diff --git a/0001-HIP-Fix-HIP-include-path.patch b/0001-HIP-Fix-HIP-include-path.patch deleted file mode 100644 index d7bf377..0000000 --- a/0001-HIP-Fix-HIP-include-path.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 4218b3ad4f7a444ab72bd50c15d2adca85ac23c9 Mon Sep 17 00:00:00 2001 -From: "Yaxun (Sam) Liu" -Date: Wed, 9 Mar 2022 09:10:17 -0500 -Subject: [PATCH] [HIP] Fix HIP include path - -The clang compiler prepends the HIP header include paths to the search -list using -internal-isystem when building for the HIP language. This -prevents warnings related to things like reserved identifiers when -including the HIP headers even when ROCm is installed in a non-system -directory, such as /opt/rocm. - -However, when HIP is installed in /usr, then the prepended include -path would be /usr/include. That is a problem, because the C standard -library headers are stored in /usr/include and the C++ standard -library headers must come before the C library headers in the search -path list (because the C++ standard library headers use #include_next -to include the C standard library headers). - -While the HIP wrapper headers _do_ need to be earlier in the search -than the C++ headers, those headers get their own subdirectory and -their own explicit -internal-isystem argument. This include path is for - and , which do not require a -particular search ordering with respect to the C or C++ headers. Thus, -HIP include path is added after other system include paths. - -With contribution from Cordell Bloor. - -Reviewed by: Artem Belevich - -Differential Revision: https://reviews.llvm.org/D120132 ---- - clang/lib/Driver/ToolChains/AMDGPU.cpp | 2 +- - clang/test/Driver/hip-include-path.hip | 10 +++++----- - clang/test/Driver/rocm-detect.hip | 6 +++--- - 3 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/clang/lib/Driver/ToolChains/AMDGPU.cpp b/clang/lib/Driver/ToolChains/AMDGPU.cpp -index 43ce33750eba..9638fa2ecfca 100644 ---- a/clang/lib/Driver/ToolChains/AMDGPU.cpp -+++ b/clang/lib/Driver/ToolChains/AMDGPU.cpp -@@ -510,7 +510,7 @@ void RocmInstallationDetector::AddHIPIncludeArgs(const ArgList &DriverArgs, - return; - } - -- CC1Args.push_back("-internal-isystem"); -+ CC1Args.push_back("-idirafter"); - CC1Args.push_back(DriverArgs.MakeArgString(getIncludePath())); - if (UsesRuntimeWrapper) - CC1Args.append({"-include", "__clang_hip_runtime_wrapper.h"}); -diff --git a/clang/test/Driver/hip-include-path.hip b/clang/test/Driver/hip-include-path.hip -index dce42f58fdf5..92f2fab6c24c 100644 ---- a/clang/test/Driver/hip-include-path.hip -+++ b/clang/test/Driver/hip-include-path.hip -@@ -19,24 +19,24 @@ - // COMMON-LABEL: "{{[^"]*}}clang{{[^"]*}}" "-cc1" - // CLANG-SAME: "-internal-isystem" "{{[^"]*}}/lib{{[^"]*}}/clang/{{[^"]*}}/include/cuda_wrappers" - // NOCLANG-NOT: "{{[^"]*}}/lib{{[^"]*}}/clang/{{[^"]*}}/include/cuda_wrappers" --// HIP-SAME: "-internal-isystem" "{{[^"]*}}Inputs/rocm/include" --// NOHIP-NOT: "{{.*}}Inputs/rocm/include" -+// HIP-SAME: "-idirafter" "{{[^"]*}}Inputs/rocm/include" - // HIP-SAME: "-include" "__clang_hip_runtime_wrapper.h" - // NOHIP-NOT: "-include" "__clang_hip_runtime_wrapper.h" - // skip check of standard C++ include path - // CLANG-SAME: "-internal-isystem" "{{[^"]*}}/lib{{[^"]*}}/clang/{{[^"]*}}/include" - // NOCLANG-NOT: "{{[^"]*}}/lib{{[^"]*}}/clang/{{[^"]*}}/include" -+// NOHIP-NOT: "{{.*}}Inputs/rocm/include" - - // COMMON-LABEL: "{{[^"]*}}clang{{[^"]*}}" "-cc1" - // CLANG-SAME: "-internal-isystem" "{{[^"]*}}/lib{{[^"]*}}/clang/{{[^"]*}}/include/cuda_wrappers" - // NOCLANG-NOT: "{{[^"]*}}/lib{{[^"]*}}/clang/{{[^"]*}}/include/cuda_wrappers" --// HIP-SAME: "-internal-isystem" "{{[^"]*}}Inputs/rocm/include" --// NOHIP-NOT: "{{.*}}Inputs/rocm/include" -+// HIP-SAME: "-idirafter" "{{[^"]*}}Inputs/rocm/include" - // HIP-SAME: "-include" "__clang_hip_runtime_wrapper.h" - // NOHIP-NOT: "-include" "__clang_hip_runtime_wrapper.h" - // skip check of standard C++ include path - // CLANG-SAME: "-internal-isystem" "{{[^"]*}}/lib{{[^"]*}}/clang/{{[^"]*}}/include" - // NOCLANG-NOT: "{{[^"]*}}/lib{{[^"]*}}/clang/{{[^"]*}}/include" -+// NOHIP-NOT: "{{.*}}Inputs/rocm/include" - - // RUN: %clang -c -### -target x86_64-unknown-linux-gnu --cuda-gpu-arch=gfx900 \ - // RUN: -std=c++11 --rocm-path=%S/Inputs/rocm -nogpulib %s 2>&1 \ -@@ -45,7 +45,7 @@ - // ROCM35-LABEL: "{{[^"]*}}clang{{[^"]*}}" "-cc1" - // ROCM35-NOT: "{{[^"]*}}/lib{{[^"]*}}/clang/{{[^"]*}}/include/cuda_wrappers" - // ROCM35-SAME: "-internal-isystem" "{{[^"]*}}/lib{{[^"]*}}/clang/{{[^"]*}}" --// ROCM35-SAME: "-internal-isystem" "{{[^"]*}}Inputs/rocm/include" -+// ROCM35-SAME: "-idirafter" "{{[^"]*}}Inputs/rocm/include" - // ROCM35-NOT: "-include" "__clang_hip_runtime_wrapper.h" - // skip check of standard C++ include path - // ROCM35-SAME: "-internal-isystem" "{{[^"]*}}/lib{{[^"]*}}/clang/{{[^"]*}}/include" -diff --git a/clang/test/Driver/rocm-detect.hip b/clang/test/Driver/rocm-detect.hip -index 3ab0175cf1f1..7166c42e9691 100644 ---- a/clang/test/Driver/rocm-detect.hip -+++ b/clang/test/Driver/rocm-detect.hip -@@ -90,7 +90,7 @@ - // SPACK: Found HIP installation: [[DIR]]/hip-4.0.0-5f63slrursbrvfe2txrrjkynbsywsob5, version 4.0.20214-a2917cd - // SPACK: "-triple" "amdgcn-amd-amdhsa" - // SPACK-SAME: "-mlink-builtin-bitcode" "[[DIR]]/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/amdgcn/bitcode/hip.bc" --// SPACK-SAME: "-internal-isystem" "[[DIR]]/hip-4.0.0-5f63slrursbrvfe2txrrjkynbsywsob5/include" -+// SPACK-SAME: "-idirafter" "[[DIR]]/hip-4.0.0-5f63slrursbrvfe2txrrjkynbsywsob5/include" - - // SPACK-MULT: InstalledDir: [[DIR:.*]]/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/bin - // SPACK-MULT-DAG: Cannot use SPACK package hip-4.0.0 at [[DIR]] due to multiple installations for the same version -@@ -101,12 +101,12 @@ - // SPACK-SET: Found HIP installation: [[DIR]]/hip-4.0.0-abcd, version 4.0.20214-a2917cd - // SPACK-SET: "-triple" "amdgcn-amd-amdhsa" - // SPACK-SET-SAME: "-mlink-builtin-bitcode" "[[DIR]]/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/amdgcn/bitcode/hip.bc" --// SPACK-SET-SAME: "-internal-isystem" "[[DIR]]/hip-4.0.0-abcd/include" -+// SPACK-SET-SAME: "-idirafter" "[[DIR]]/hip-4.0.0-abcd/include" - - // SPACK-MISS: InstalledDir: [[DIR:.*]]/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/bin - // SPACK-MISS-DAG: SPACK package hip-4.0.0 not found at [[DIR]] - // SPACK-MISS-NOT: Found HIP installation: [[DIR]]/hip-4.0.0-5f63slrursbrvfe2txrrjkynbsywsob5, version 4.0.20214-a2917cd --// SPACK-MISS-NOT: "-internal-isystem" "[[DIR]]/hip-4.0.0-5f63slrursbrvfe2txrrjkynbsywsob5/include" -+// SPACK-MISS-NOT: "-idirafter" "[[DIR]]/hip-4.0.0-5f63slrursbrvfe2txrrjkynbsywsob5/include" - - // SPACK-MISS-SILENT-NOT: SPACK package hip-{{.*}} not found at - // SPACK-MISS-SILENT-NOT: Found HIP installation --- -2.35.1 - diff --git a/clang.spec b/clang.spec index c6a4036..e73d484 100644 --- a/clang.spec +++ b/clang.spec @@ -3,7 +3,7 @@ %global maj_ver 14 %global min_ver 0 -%global patch_ver 0 +%global patch_ver 5 #global rc_ver 4 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} @@ -39,7 +39,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 4%{?dist} +Release: 1%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -63,11 +63,7 @@ Patch3: 0001-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch Patch4: 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch # This patch can be dropped once gcc-12.0.1-0.5.fc36 is in the repo. Patch5: 0001-Work-around-gcc-miscompile.patch -# https://github.com/llvm/llvm-project/commit/fed96f31bb5b68f77dd617ee8e698dd8171ee71b -Patch6: m-branch-protection.patch Patch7: 0010-PATCH-clang-Produce-DWARF4-by-default.patch -# This is cherry-picked from trunk and can be dropped in LLVM 15 -Patch8: 0001-HIP-Fix-HIP-include-path.patch # Patches for clang-tools-extra # See https://reviews.llvm.org/D120301 @@ -599,6 +595,9 @@ false %endif %changelog +* Tue Jun 14 2022 Timm Bäder - 14.0.5-1 +- Update to 14.0.5 + * Mon Jun 13 2022 Python Maint - 14.0.0-4 - Rebuilt for Python 3.11 diff --git a/m-branch-protection.patch b/m-branch-protection.patch deleted file mode 100644 index 7586c7d..0000000 --- a/m-branch-protection.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit fed96f31bb5b68f77dd617ee8e698dd8171ee71b -Author: Tom Stellard -Date: Tue Mar 22 23:17:39 2022 -0700 - - Re-commit: Driver: Don't warn on -mbranch-protection when linking - - This is a re-commit of 98fd3b359866f474ab1c097c22fb5c3be356b996. The - newly added test was failing on the bots, and I've fixed the test now so - that it doesn't actually invoke the linker. - -diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td -index d37d3a31fe07..6ed87f9a464d 100644 ---- a/clang/include/clang/Driver/Options.td -+++ b/clang/include/clang/Driver/Options.td -@@ -3444,6 +3444,7 @@ def msign_return_address_EQ : Joined<["-"], "msign-return-address=">, - Flags<[CC1Option]>, Group, Values<"none,all,non-leaf">, - HelpText<"Select return address signing scope">; - def mbranch_protection_EQ : Joined<["-"], "mbranch-protection=">, -+ Group, - HelpText<"Enforce targets of indirect branches and function returns">; - - def mharden_sls_EQ : Joined<["-"], "mharden-sls=">, -diff --git a/clang/test/Driver/aarch64-security-options.c b/clang/test/Driver/aarch64-security-options.c -index 6ea4b8ae5838..4bd73e06d255 100644 ---- a/clang/test/Driver/aarch64-security-options.c -+++ b/clang/test/Driver/aarch64-security-options.c -@@ -27,6 +27,9 @@ - // RUN: %clang -target aarch64--none-eabi -c %s -### -mbranch-protection=bar 2>&1 | \ - // RUN: FileCheck %s --check-prefix=BAD-BP-PROTECTION --check-prefix=WARN - -+// RUN: %clang -target aarch64--none-eabi -### -o /dev/null -mbranch-protection=standard /dev/null 2>&1 | \ -+// RUN: FileCheck --allow-empty %s --check-prefix=LINKER-DRIVER -+ - // WARN-NOT: warning: ignoring '-mbranch-protection=' option because the 'aarch64' architecture does not support it [-Wbranch-protection] - - // RA-OFF: "-msign-return-address=none" -@@ -46,3 +49,7 @@ - - // BAD-B-KEY-COMBINATION: invalid branch protection option 'b-key' in '-mbranch-protection={{.*}}' - // BAD-LEAF-COMBINATION: invalid branch protection option 'leaf' in '-mbranch-protection={{.*}}' -+ -+// Check that the linker driver doesn't warn about -mbranch-protection=standard -+// as an unused option. -+// LINKER-DRIVER-NOT: warning: diff --git a/sources b/sources index dbf5d67..b6a835f 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-14.0.0.src.tar.xz) = 26e701c0c24eefee1f0c1651cba7d16dca9a463e4d41c8bbc33d7b93a68c3dac0aeef6846d836eddc07afafa8116b81c95737223296f336897f2b75e1b3895f1 -SHA512 (clang-tools-extra-14.0.0.src.tar.xz) = fdf06a46a4c3d689076b41fcc0c42eedbe95924b1611a8f8fe693e4ac1013274cdea97482b48659172f133ed51607a9e979d9d717df4082b50b0c176be2515e5 -SHA512 (clang-tools-extra-14.0.0.src.tar.xz.sig) = 7a6fe5037d462eab4966946dc6ae4d5c53751da3f3a0ea3396a10add2b0e41d4cd26752c9dc82c6f69cefdcab63818e4e1f87ff601ef8c5bdacb81489a30b787 -SHA512 (clang-14.0.0.src.tar.xz.sig) = 579f20b2a7ffee8fa077002272d7029c9f82e9904b52a720c46ac882679b08f6b68f92918593abce916fd4d55aceb1aa4fe26142b7f742e286d0aaa0b2809efd +SHA512 (clang-tools-extra-14.0.5.src.tar.xz) = 9b729f04f769f8209a7bcca909d8a98b76d4789ab32707d5a55f7588a653c3b08a39c2f1bc61325a807315580069aa2dcb5c9fe1e5b1853a58fc548593154490 +SHA512 (clang-tools-extra-14.0.5.src.tar.xz.sig) = 5146c238eba412afeb6839352f5974247470d92efcb5a30c876c76a112554d029d7d9e9bc3e748fc2e44db15857ddf81f226548372ca7f1f04bf7359b338570a +SHA512 (clang-14.0.5.src.tar.xz.sig) = f727ddf5c4995645c6782c396a7e83d62c62c0a16afd9320ab5205ef497886ccb9ab3de24879cdab4e4a4edd4f281b371e26686d0ab721a5edec7781929ce40f +SHA512 (clang-14.0.5.src.tar.xz) = e69faea16e06c8eb4c7cf9969573a5af7dfad9c280d1858dc9655007129e83744dbca3bf928a040e9b66fc84738f76eccd8ae5bc61cf11be7e62d79dafabb5a2