diff --git a/.gitignore b/.gitignore index 7a589bc..da1f622 100644 --- a/.gitignore +++ b/.gitignore @@ -204,3 +204,7 @@ /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 diff --git a/0010-clang-Fix-interaction-between-asm-labels-and-inline-.patch b/0010-clang-Fix-interaction-between-asm-labels-and-inline-.patch new file mode 100644 index 0000000..948d164 --- /dev/null +++ b/0010-clang-Fix-interaction-between-asm-labels-and-inline-.patch @@ -0,0 +1,74 @@ +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/clang.spec b/clang.spec index f7f8364..765b844 100644 --- a/clang.spec +++ b/clang.spec @@ -8,7 +8,7 @@ %global maj_ver 15 %global min_ver 0 -%global patch_ver 1 +%global patch_ver 6 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} %if %{with compat_build} @@ -49,7 +49,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 2%{?dist} +Release: 1%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -85,6 +85,8 @@ 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 %if %{without compat_build} # Patches for clang-tools-extra @@ -531,10 +533,12 @@ sed -i -e "s/'ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH'/'ASAN_SYMBOLIZER_PAT %if %{without compat_build} %if %{with check} +%if %{with bundle_compat_lib} # Move the compat -cpp.so out of the way so it's not picked up # by the LD_LIBRARY_PATH below. compat_lib=$(find %{buildroot}%{_libdir} -name libclang-cpp.so.%{compat_maj_ver}) mv "$compat_lib" . +%endif # requires lit.py from LLVM utilities # FIXME: Fix failing ARM tests @@ -545,7 +549,9 @@ SOURCE_DATA_EPOCH=1629181597 LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} false %endif +%if %{with bundle_compat_lib} mv ./libclang-cpp.so.%{compat_maj_ver} "$compat_lib" +%endif %endif %endif @@ -675,6 +681,9 @@ mv ./libclang-cpp.so.%{compat_maj_ver} "$compat_lib" %endif %changelog +* Thu Dec 08 2022 Konrad Kleine - 15.0.6-1 +- Update to 15.0.6 + * Mon Oct 17 2022 Nikita Popov - 15.0.1-2 - Default to non-pie, fix rhbz#2134146 diff --git a/sources b/sources index 04c0650..26e1efa 100644 --- a/sources +++ b/sources @@ -1,8 +1,4 @@ -SHA512 (clang-14.0.6.src.tar.xz) = 5f5497b57dd116225e90f321902f1015beb50c0b1bb90d0fc6c026f13aa748feabe44f98eb75e86f98f3b1785ad5e850210732f3eae75b942ecd520527dcd30b -SHA512 (clang-15.0.1.src.tar.xz) = 5e5cb8c82ad09df2fec8de4de391d5c6d85c88ce4f94ef2c5cee6cd54e3bde3071402d335cf7f5676a5cf9766af4978df7ef44673b414532b43a53a9f0e23d3d -SHA512 (clang-14.0.6.src.tar.xz.sig) = ece52f4807fd4f6dadaae5ef539d4033f15848b8fafd428fc9896db2191aab59be134cbba1914e4175f5bb51fdfa74b5ab81f2bb818f5f67c441383a839325e9 -SHA512 (clang-15.0.1.src.tar.xz.sig) = 0eae06a45ce68df9a2d278684c38609a2f064b50e86339bdb1e2fcd2ce1d0747b121e45bf41386cd12d147352fd82d868a750645afaa06e04b30bbb7871f5035 -SHA512 (llvm-14.0.6.src.tar.xz) = 6461bdde27aac17fa44c3e99a85ec47ffb181d0d4e5c3ef1c4286a59583e3b0c51af3c8081a300f45b99524340773a3011380059e3b3a571c3b0a8733e96fc1d -SHA512 (llvm-14.0.6.src.tar.xz.sig) = de74affdc3e35dbcc1d45fbbee54a00d66242dc958e32f2a5a2c90b12a50113268d7b2a5dceb3b281691d1f20957895bd627d45ec80d5239dcd1a534e383b5c8 -SHA512 (clang-tools-extra-15.0.1.src.tar.xz) = cea8e17b7f83b2b84fb72b46d6d52800df279ca61efbed604f750380e33f8320445799614db1410484377636378f93b293719f33e5767b843fc8a75643461d7f -SHA512 (clang-tools-extra-15.0.1.src.tar.xz.sig) = 21abd13ab7a9b0001f3cc92e7dc5275881f2cb30253d7dbb15613e0b7c7ff56387e2a33570e5fa3a900a2d223b5b88c6caba9beed5284c88d94aeaabc914b876 +SHA512 (clang-15.0.6.src.tar.xz) = 898e9793b27a17689150b8df99fce87037d7353e35b6f03449c64f131a8afb3780e45bf640af8c173362ddbf60bcf09f864a4316b523123899cdd19073ed5e48 +SHA512 (clang-15.0.6.src.tar.xz.sig) = 2a914cd9936e374ec493ebac677e5346513d6ae3dd9f2c72d80aeff81bfa78cbe346d2bbf78353067b0e89fcaf1578bf268701f607c0e864185b1c5e3ea1826b +SHA512 (clang-tools-extra-15.0.6.src.tar.xz) = c9a36e7fa924351304af27e20e362f580d1d8585fdcd7973bd4c614f81c5c5e0ed313ae110c7662f8df8373a98c10f386352bce6fbfed568e7f879f07fd6a452 +SHA512 (clang-tools-extra-15.0.6.src.tar.xz.sig) = 722c5748cbeae73c6aaefa1c695dcae7b93bb3b12d10decd1f3ca713e95800341ccff7cbc4a9fb281eeb78b8d8de39f7c57d2cefa15aab322a79895e53b48787