From 7808ecbcca0f9b8c416947b3439400b78d176cb7 Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Mon, 29 Aug 2022 11:19:34 +0200 Subject: [PATCH 01/77] Add a Recommends on libatomic, see rhbz#2118592 --- clang.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index 0d4b840..2dd7847 100644 --- a/clang.spec +++ b/clang.spec @@ -39,7 +39,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 6%{?dist} +Release: 7%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -161,6 +161,8 @@ libomp-devel to enable -fopenmp. Summary: Runtime library for clang Requires: %{name}-resource-filesystem%{?_isa} = %{version} Recommends: compiler-rt%{?_isa} = %{version} +# atomic support is not part of compiler-rt +Recommends: libatomic%{?_isa} # libomp-devel is required, so clang can find the omp.h header when compiling # with -fopenmp. Recommends: libomp-devel%{_isa} = %{version} @@ -591,6 +593,9 @@ false %endif %changelog +* Mon Aug 29 2022 sguelton@redhat.com - 14.0.5-7 +- Add a Recommends on libatomic, see rhbz#2118592 + * Wed Aug 10 2022 Nikita Popov - 14.0.5-6 - Revert powerpc -mabi=ieeelongdouble default From 71bc065af978ef0a2bc12daa9a0447d56f713501 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 3 Aug 2022 09:22:17 +0200 Subject: [PATCH 02/77] Update to LLVM 15.0.0 --- .gitignore | 4 + ...p-implicit-rpath-as-NoArgumentUnused.patch | 29 +++++ 0001-Work-around-gcc-miscompile.patch | 33 ------ ...a-Make-test-dependency-on-LLVMHello-.patch | 82 ++++++++++++++ ...wind-tables-the-default-on-all-archs.patch | 0 ...ATCH-clang-Produce-DWARF4-by-default.patch | 22 ++-- clang.spec | 71 ++++++------ llvm-hello.patch | 61 ---------- release-keys.asc | 104 ++++++++++++++++++ remove-test.patch | 20 ---- sources | 8 +- tstellar-gpg-key.asc | Bin 2222 -> 0 bytes 12 files changed, 267 insertions(+), 167 deletions(-) create mode 100644 0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch delete mode 100644 0001-Work-around-gcc-miscompile.patch create mode 100644 0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch rename 0002-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch => 0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch (100%) delete mode 100644 llvm-hello.patch create mode 100644 release-keys.asc delete mode 100644 remove-test.patch delete mode 100644 tstellar-gpg-key.asc diff --git a/.gitignore b/.gitignore index b39b646..a6194c4 100644 --- a/.gitignore +++ b/.gitignore @@ -219,3 +219,7 @@ /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 +/clang-tools-extra-15.0.0.src.tar.xz +/clang-tools-extra-15.0.0.src.tar.xz.sig +/clang-15.0.0.src.tar.xz +/clang-15.0.0.src.tar.xz.sig diff --git a/0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch b/0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch new file mode 100644 index 0000000..87c9b93 --- /dev/null +++ b/0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch @@ -0,0 +1,29 @@ +From 537e325f180d3d82bbef64aac71efcb0256d6916 Mon Sep 17 00:00:00 2001 +From: Nikita Popov +Date: Fri, 2 Sep 2022 16:30:15 +0200 +Subject: [PATCH] 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 d921ea5d5da9..d883fd3a8f04 100644 +--- a/clang/include/clang/Driver/Options.td ++++ b/clang/include/clang/Driver/Options.td +@@ -4118,7 +4118,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.2 + diff --git a/0001-Work-around-gcc-miscompile.patch b/0001-Work-around-gcc-miscompile.patch deleted file mode 100644 index 16c1467..0000000 --- a/0001-Work-around-gcc-miscompile.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0f97b7209eed4a428171af6044fe7e0aaf81ee2a Mon Sep 17 00:00:00 2001 -From: Nikita Popov -Date: Thu, 3 Feb 2022 10:34:44 +0100 -Subject: [PATCH] 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.34.1 - - diff --git a/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch b/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch new file mode 100644 index 0000000..8f30ef4 --- /dev/null +++ b/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch @@ -0,0 +1,82 @@ +From 581300e447602b9b7a505b0f07e8461d58d041ca Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Fri, 1 Jul 2022 21:24:17 -0700 +Subject: [PATCH] clang-tools-extra: Make test dependency on LLVMHello optional + +This fixes clang + clang-tools-extra standalone build after +36892727e4f19a60778e371d78f8fb09d8122c85. +--- + clang-tools-extra/test/CMakeLists.txt | 10 +++++++++- + clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp | 2 +- + clang-tools-extra/test/lit.cfg.py | 3 +++ + clang-tools-extra/test/lit.site.cfg.py.in | 1 + + 4 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/clang-tools-extra/test/CMakeLists.txt b/clang-tools-extra/test/CMakeLists.txt +index f4c529ee8af2..1cfb4dd529aa 100644 +--- a/clang-tools-extra/test/CMakeLists.txt ++++ b/clang-tools-extra/test/CMakeLists.txt +@@ -7,10 +7,15 @@ + set(CLANG_TOOLS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..") + set(CLANG_TOOLS_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/..") + ++if (TARGET LLVMHello) ++ set (LLVM_HAS_LLVM_HELLO 1) ++endif() ++ + llvm_canonicalize_cmake_booleans( + CLANG_TIDY_ENABLE_STATIC_ANALYZER + CLANG_PLUGIN_SUPPORT + LLVM_INSTALL_TOOLCHAIN_ONLY ++ LLVM_HAS_LLVM_HELLO + ) + + configure_lit_site_cfg( +@@ -86,7 +91,10 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + endif() + + if(TARGET CTTestTidyModule) +- list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule LLVMHello) ++ list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) ++ if (TARGET LLVMHello) ++ list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) ++ endif() + target_include_directories(CTTestTidyModule PUBLIC BEFORE "${CLANG_TOOLS_SOURCE_DIR}") + if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN)) + set(LLVM_LINK_COMPONENTS +diff --git a/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp b/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp +index c66a94f458cf..b4e7a5d691e5 100644 +--- a/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp ++++ b/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp +@@ -1,4 +1,4 @@ +-// REQUIRES: plugins ++// REQUIRES: plugins, llvm-hello + // RUN: clang-tidy -checks='-*,mytest*' --list-checks -load %llvmshlibdir/CTTestTidyModule%pluginext -load %llvmshlibdir/LLVMHello%pluginext | FileCheck --check-prefix=CHECK-LIST %s + // CHECK-LIST: Enabled checks: + // CHECK-LIST-NEXT: mytest1 +diff --git a/clang-tools-extra/test/lit.cfg.py b/clang-tools-extra/test/lit.cfg.py +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( + # 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") +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 ++++ b/clang-tools-extra/test/lit.site.cfg.py.in +@@ -11,6 +11,7 @@ config.target_triple = "@LLVM_TARGET_TRIPLE@" + config.host_triple = "@LLVM_HOST_TRIPLE@" + config.clang_tidy_staticanalyzer = @CLANG_TIDY_ENABLE_STATIC_ANALYZER@ + config.has_plugins = @CLANG_PLUGIN_SUPPORT@ & ~@LLVM_INSTALL_TOOLCHAIN_ONLY@ ++config.has_llvm_hello = @LLVM_HAS_LLVM_HELLO@ + # Support substitution of the tools and libs dirs with user parameters. This is + # used when we can't determine the tool dir at configuration time. + config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@") +-- +2.27.0 + diff --git a/0002-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch b/0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch similarity index 100% rename from 0002-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch rename to 0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch diff --git a/0010-PATCH-clang-Produce-DWARF4-by-default.patch b/0010-PATCH-clang-Produce-DWARF4-by-default.patch index 22af8ac..2d698c5 100644 --- a/0010-PATCH-clang-Produce-DWARF4-by-default.patch +++ b/0010-PATCH-clang-Produce-DWARF4-by-default.patch @@ -1,4 +1,4 @@ -From c7fd378862328e3e2c60be76b7a15821ca2d44ab Mon Sep 17 00:00:00 2001 +From 1f68d73910ddee1beaf3582480b8a9738c941a43 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Thu, 24 Mar 2022 09:44:21 +0100 Subject: [PATCH] Produce DWARF4 by default @@ -16,11 +16,11 @@ https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/clang/include/clang/Driver/ToolChain.h b/clang/include/clang/Driver/ToolChain.h -index bfc46af00265..a2f4ac85e7d7 100644 +index f20ab164531b..53c86ee82936 100644 --- a/clang/include/clang/Driver/ToolChain.h +++ b/clang/include/clang/Driver/ToolChain.h -@@ -515,7 +515,7 @@ public: - +@@ -535,7 +535,7 @@ public: + // Return the DWARF version to emit, in the absence of arguments // to the contrary. - virtual unsigned GetDefaultDwarfVersion() const { return 5; } @@ -44,10 +44,10 @@ 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/cl-options.c b/clang/test/Driver/cl-options.c -index 8d240e6e6e5c..1a568e95d349 100644 +index a2e350a0a835..01889ba0bf9b 100644 --- a/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c -@@ -596,7 +596,7 @@ +@@ -570,7 +570,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" @@ -70,25 +70,25 @@ index d982b1070cae..bb129e75769c 100644 // CHECK-WITH-G-STANDALONE: "-debug-info-kind=standalone" diff --git a/clang/test/Driver/ve-toolchain.c b/clang/test/Driver/ve-toolchain.c -index 753dee19fcbf..dfd12cc0bba4 100644 +index 32e25769b6da..b8a2852daba8 100644 --- a/clang/test/Driver/ve-toolchain.c +++ b/clang/test/Driver/ve-toolchain.c @@ -6,7 +6,7 @@ /// Checking dwarf-version - // RUN: %clang -### -g -target ve %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s + // RUN: %clang -### -g --target=ve %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s -// DWARF_VER: "-dwarf-version=5" +// DWARF_VER: "-dwarf-version=4" ///----------------------------------------------------------------------------- /// Checking include-path diff --git a/clang/test/Driver/ve-toolchain.cpp b/clang/test/Driver/ve-toolchain.cpp -index 4b2b9c5747fe..3a196dd94ca1 100644 +index 5a33d5eceb61..cedf895b36dc 100644 --- a/clang/test/Driver/ve-toolchain.cpp +++ b/clang/test/Driver/ve-toolchain.cpp @@ -7,7 +7,7 @@ - // RUN: %clangxx -### -g -target ve-unknown-linux-gnu \ + // RUN: %clangxx -### -g --target=ve-unknown-linux-gnu \ // RUN: %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s -// DWARF_VER: "-dwarf-version=5" +// DWARF_VER: "-dwarf-version=4" @@ -96,5 +96,5 @@ index 4b2b9c5747fe..3a196dd94ca1 100644 ///----------------------------------------------------------------------------- /// Checking include-path -- -2.27.0 +2.37.1 diff --git a/clang.spec b/clang.spec index 2dd7847..cc9b4fa 100644 --- a/clang.spec +++ b/clang.spec @@ -1,10 +1,12 @@ +%global toolchain clang + %bcond_with compat_build %bcond_without check -%global maj_ver 14 +%global maj_ver 15 %global min_ver 0 -%global patch_ver 5 -#global rc_ver 4 +%global patch_ver 0 +#global rc_ver 3 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} %if %{with compat_build} @@ -39,7 +41,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 7%{?dist} +Release: 1%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -50,29 +52,27 @@ Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_ Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz.sig %endif -Source4: tstellar-gpg-key.asc +Source4: release-keys.asc %if %{without compat_build} Source5: macros.%{name} %endif # Patches for clang Patch0: 0001-PATCH-clang-Reorganize-gtest-integration.patch -Patch1: 0002-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch +Patch1: 0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch 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 -Patch7: 0010-PATCH-clang-Produce-DWARF4-by-default.patch +Patch5: 0010-PATCH-clang-Produce-DWARF4-by-default.patch + +# TODO: Can be dropped in LLVM 16: https://reviews.llvm.org/D133316 +Patch6: 0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch # Patches for clang-tools-extra # See https://reviews.llvm.org/D120301 -Patch201: llvm-hello.patch -# See https://github.com/llvm/llvm-project/issues/54116 -Patch202: remove-test.patch +Patch201: 0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch -BuildRequires: gcc -BuildRequires: gcc-c++ +BuildRequires: clang BuildRequires: cmake BuildRequires: ninja-build %if %{with compat_build} @@ -252,13 +252,8 @@ Requires: python3 %autopatch -m200 -p2 -# This test is broken upstream. It is a clang-tidy unittest -# that includes a file from clang, breaking standalone builds. -# https://github.com/llvm/llvm-project/issues/54116 -rm unittests/clang-tidy/ReadabilityModuleTest.cpp - # failing test case -rm test/clang-tidy/checkers/altera-struct-pack-align.cpp +rm test/clang-tidy/checkers/altera/struct-pack-align.cpp %py3_shebang_fix \ clang-tidy/tool/ \ @@ -282,17 +277,13 @@ rm test/CodeGen/profile-filter.c %endif %build -# We run the builders out of memory on armv7 and i686 when LTO is enabled -%ifarch %{arm} i686 -%define _lto_cflags %{nil} -%else -# This package does not ship any object files or static libraries, so we -# don't need -ffat-lto-objects. -%global _lto_cflags %(echo %{_lto_cflags} | sed 's/-ffat-lto-objects//') -%endif -# lto builds with gcc 11 fail while running the lit tests. +# Use ThinLTO to limit build time. +%define _lto_cflags -flto=thin +# And disable LTO on AArch64 entirely. +%ifarch aarch64 %define _lto_cflags %{nil} +%endif %if 0%{?__isa_bits} == 64 sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@/64/g' test/lit.cfg.py @@ -300,18 +291,16 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@/64/g' test/lit.cfg.py sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py %endif -%ifarch s390 s390x %{arm} %ix86 ppc64le +%ifarch s390 s390x %{arm} aarch64 %ix86 ppc64le # Decrease debuginfo verbosity to reduce memory consumption during final library linking %global optflags %(echo %{optflags} | sed 's/-g /-g1 /') %endif +# Disable dwz on aarch64, because it takes a huge amount of time to decide not to optimize things. +%ifarch aarch64 +%define _find_debuginfo_dwz_opts %{nil} +%endif -%set_build_flags -CXXFLAGS="$CXXFLAGS -Wno-address -Wno-nonnull -Wno-maybe-uninitialized" -CFLAGS="$CFLAGS -Wno-address -Wno-nonnull -Wno-maybe-uninitialized" - -# -DLLVM_ENABLE_NEW_PASS_MANAGER=ON can be removed once this patch is committed: -# https://reviews.llvm.org/D107628 %cmake -G Ninja \ -DLLVM_PARALLEL_LINK_JOBS=1 \ -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ @@ -329,6 +318,7 @@ CFLAGS="$CFLAGS -Wno-address -Wno-nonnull -Wno-maybe-uninitialized" -DCLANG_INCLUDE_TESTS:BOOL=OFF \ %else -DCLANG_INCLUDE_TESTS:BOOL=ON \ + -DLLVM_BUILD_UTILS:BOOL=ON \ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=../%{clang_tools_srcdir} \ -DLLVM_EXTERNAL_LIT=%{_bindir}/lit \ -DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \ @@ -352,7 +342,6 @@ CFLAGS="$CFLAGS -Wno-address -Wno-nonnull -Wno-maybe-uninitialized" -DLLVM_ENABLE_EH=ON \ -DLLVM_ENABLE_RTTI=ON \ -DLLVM_BUILD_DOCS=ON \ - -DLLVM_ENABLE_NEW_PASS_MANAGER=ON \ -DLLVM_ENABLE_SPHINX=ON \ -DCLANG_LINK_CLANG_DYLIB=ON \ %{?abi_revision:-DLLVM_ABI_REVISION=%{abi_revision}} \ @@ -506,6 +495,7 @@ false %{_includedir}/clang/ %{_includedir}/clang-c/ %{_libdir}/cmake/* +%{_bindir}/clang-tblgen %dir %{_datadir}/clang/ %{_rpmmacrodir}/macros.%{name} %else @@ -554,9 +544,11 @@ false %{_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 %{_bindir}/clang-rename @@ -593,13 +585,16 @@ false %endif %changelog +* Tue Sep 06 2022 Nikita Popov - 15.0.0-1 +- Update to LLVM 15.0.0 + * Mon Aug 29 2022 sguelton@redhat.com - 14.0.5-7 - Add a Recommends on libatomic, see rhbz#2118592 * Wed Aug 10 2022 Nikita Popov - 14.0.5-6 - Revert powerpc -mabi=ieeelongdouble default -* Mon Aug 04 2022 Tom Stellard - 14.0.5-5 +* Thu Aug 04 2022 Tom Stellard - 14.0.5-5 - Re-enable ieee128 as the default long double format on ppc64le * Thu Jul 28 2022 Amit Shah - 14.0.5-4 diff --git a/llvm-hello.patch b/llvm-hello.patch deleted file mode 100644 index d28e349..0000000 --- a/llvm-hello.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff -ruN a/clang-tools-extra-14.0.0rc2.src.orig/test/clang-tidy/CTTestTidyModule.cpp a/clang-tools-extra-14.0.0rc2.src/test/clang-tidy/CTTestTidyModule.cpp ---- a/clang-tools-extra-14.0.0rc2.src.orig/test/clang-tidy/CTTestTidyModule.cpp 2022-03-02 01:46:37.000000000 +0100 -+++ a/clang-tools-extra-14.0.0rc2.src/test/clang-tidy/CTTestTidyModule.cpp 2022-03-07 08:52:20.009112976 +0100 -@@ -1,4 +1,4 @@ --// REQUIRES: plugins -+// REQUIRES: plugins, llvm-hello - // RUN: clang-tidy -checks='-*,mytest*' --list-checks -load %llvmshlibdir/CTTestTidyModule%pluginext -load %llvmshlibdir/LLVMHello%pluginext | FileCheck --check-prefix=CHECK-LIST %s - // CHECK-LIST: Enabled checks: - // CHECK-LIST-NEXT: mytest1 -diff -ruN a/clang-tools-extra-14.0.0rc2.src.orig/test/CMakeLists.txt a/clang-tools-extra-14.0.0rc2.src/test/CMakeLists.txt ---- a/clang-tools-extra-14.0.0rc2.src.orig/test/CMakeLists.txt 2022-03-02 01:46:37.000000000 +0100 -+++ a/clang-tools-extra-14.0.0rc2.src/test/CMakeLists.txt 2022-03-07 10:58:56.172490672 +0100 -@@ -15,10 +15,15 @@ - - string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) - -+if (TARGET LLVMHello) -+ set (LLVM_HAS_LLVM_HELLO 1) -+endif() -+ - llvm_canonicalize_cmake_booleans( - CLANG_TIDY_ENABLE_STATIC_ANALYZER - CLANG_PLUGIN_SUPPORT - LLVM_INSTALL_TOOLCHAIN_ONLY -+ LLVM_HAS_LLVM_HELLO - ) - - configure_lit_site_cfg( -@@ -97,7 +102,10 @@ - endif() - - if(TARGET CTTestTidyModule) -- list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule LLVMHello) -+ list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) -+ if (TARGET LLVMHello) -+ list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) # Should be LLVMHello? -+ endif() - target_include_directories(CTTestTidyModule PUBLIC BEFORE "${CLANG_TOOLS_SOURCE_DIR}") - if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN)) - set(LLVM_LINK_COMPONENTS -diff -ruN a/clang-tools-extra-14.0.0rc2.src.orig/test/lit.cfg.py a/clang-tools-extra-14.0.0rc2.src/test/lit.cfg.py ---- a/clang-tools-extra-14.0.0rc2.src.orig/test/lit.cfg.py 2022-03-02 01:46:37.000000000 +0100 -+++ a/clang-tools-extra-14.0.0rc2.src/test/lit.cfg.py 2022-03-07 08:52:20.010112983 +0100 -@@ -155,3 +155,6 @@ - # 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') -diff -ruN a/clang-tools-extra-14.0.0rc2.src.orig/test/lit.site.cfg.py.in a/clang-tools-extra-14.0.0rc2.src/test/lit.site.cfg.py.in ---- a/clang-tools-extra-14.0.0rc2.src.orig/test/lit.site.cfg.py.in 2022-03-02 01:46:37.000000000 +0100 -+++ a/clang-tools-extra-14.0.0rc2.src/test/lit.site.cfg.py.in 2022-03-07 10:59:17.202663983 +0100 -@@ -13,6 +13,7 @@ - config.target_triple = "@TARGET_TRIPLE@" - config.clang_tidy_staticanalyzer = @CLANG_TIDY_ENABLE_STATIC_ANALYZER@ - config.has_plugins = @CLANG_PLUGIN_SUPPORT@ & ~@LLVM_INSTALL_TOOLCHAIN_ONLY@ -+config.has_llvm_hello = @LLVM_HAS_LLVM_HELLO@ - - # Support substitution of the tools and libs dirs with user parameters. This is - # used when we can't determine the tool dir at configuration time. diff --git a/release-keys.asc b/release-keys.asc new file mode 100644 index 0000000..0d3789a --- /dev/null +++ b/release-keys.asc @@ -0,0 +1,104 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQGNBGLtemUBDADClvDIromq0Y4TX+wyRyYCq5WusPQheQuY8dVCXd9KhMpYAv8U +X15E5boH/quGpJ0ZlVkWcf+1WUHIrQWlbzQdIx514CDM7DBgO92CXsnn86kIMDW+ +9S+Hkn8upbizT1fWritlHwzD9osz7ZQRq7ac03PPgw27tqeIizHGuG4VNLyhbbjA +w+0VLFSu3r219eevS+lzBIvR5U9W720jFxWxts4UvaGuD6XW1ErcsTvuhgyCKrrs +gxO5Ma/V7r0+lqRL688ZPr4HxthwsON1YCfpNiMZ6sgxT8rOE0qL/d07ItbnXxz6 +KdcNWIXamTJKJgag6Tl0gYX4KIuUCcivXaRdJtUcFFsveCorkdHkdGNos403XR89 +5u9gq7Ef10Zahsv5GjE2DV5oFCEhXvfIWxvyeJa65iBkJafElb2stgUjkIut2a2u ++XmpKpwpGSFklce1ABLrmazlLjhsYiJVrz5l5ktoT9moE4GaF7Q5LD6JgsxzLE0U +Tzo9/AQPd8qG2REAEQEAAbQeVG9iaWFzIEhpZXRhIDx0b2JpYXNAaGlldGEuc2U+ +iQHUBBMBCAA+FiEE1XS9XR0OmIleO/kARPJIXkXVkEIFAmLtemUCGwMFCRLMAwAF +CwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQRPJIXkXVkEKoNwv+MEMVzdnzJarx +ZJ0OzHrGJJG8/chkuoejTjCLG73li9yWQigy5KmvynB5yW0fk0PAQ90vvp2wr/Hd +mUh0Zda3CwF6sWlO3N6DEDjVA3lZUuofTtvMn/tdGvvOOXYXAP9N+SZfp/7q8dxX +zn5SA1AO87nXq5lrwVzlVzUCdwOeqDlJ+2U9VEqvukP/FdkgaR2bEb8Wm/h+encW +UIQEqPDE+qOyJ9dRaiL0CUI4x+1wXeXB3OA7VybF2LvaZDbMlocdy+vs825iUWfa +n8g3mE2TpV8jkc9UHgGGopzxqNquvkkIB7ZFZm/PSW40W3OeHKhYsZZbHrz9403t +3R4SAzA3ApmMP/P8ue9irsbe24g3rzYMvck1w4C1a4Uy9buT0OCfA+dA16IRAPgV +5SJEIS62cFbUxkw8el3rUK9V+6kwoq4k8Fs8f1U7DEnOKS/v8BJJCNEc1cvimZai +Y5/3r5BeneEmuZFKX4iIIfcn5PmLSDB4aw+gKAIAAus+E2DxBqE+uQGNBGLtemUB +DADBCNyvUdv0OV//6pQ/0YC2bYXL/ElF0rOjFFl4H7O3TRxgIz2C4nQJHUOrXSmo +iL7ldfUjoAMgebcoWDpgE8S2Vjw2Gd+UJBQXj+3J6dPKLBUCjj9CLyb5hwOHITMV +b9UC/E+iwpn4vgTbI6K1O847brkBC+GuDT4g9D3O3sRbja0GjN0n2yZiS8NtRQm1 +MXAVy1IffeXKpGLookAhoUArSN88koMe+4Nx6Qun4/aUcwz0P2QUr5MA5jUzFLy1 +R3M5p1nctX15oLOU33nwCWuyjvqkxAeAfJMlkKDKYX25u1R2RmQ4ju2kAbw0PiiZ +yYft8fGlrwT4/PB3AqfKeSpx8l9Vs15ePvcuJITauo3fhBjJ6Y4WCKlTG1FbDYUl +KvPhyGO8yLhtZJg3+LbA5M/CEHsDmUh7YEQVxM0RTQMTxNBVBF5IG/4y8v/+19DZ +89VdpsQF3ThoPV0yh57YMemTBeIxpF9Swp5N7kUWct4872kBnXOmbp/jhU4MpLj6 +iLEAEQEAAYkBvAQYAQgAJhYhBNV0vV0dDpiJXjv5AETySF5F1ZBCBQJi7XplAhsM +BQkSzAMAAAoJEETySF5F1ZBCdPwL/3Ox6MwrKFzYJNz3NpQFpKFdDrkwhf25D/Qw +vu5e8Lql/q62NIhEKH3jxXXgoFYas2G7r8CSCRehraDqvXygbaiWUIkxSU0xuDTl +lNqHSkCRqIxhi/yxNm1Pk84NVGTLXWW0+CwT9cRwWn5foIPJhoDdZ732zJ7rcY3R +g71SJTe3R6MnGBzIF1LzT7Znwkh7YfcmeTfInareIWXpeNaeKy8KrQmr/0+5AIer +Ax1gu03o8GD5LFDUuGbESgDJU6nVtVyht7C6AlJWqSX6QS3+lPCw5BOCKbxakYNR +/oBNauzyDISdbUwzHM2d+XGCjBsXKRA0Tft2NlG6EC83/PuY2J9MSA2gg3iPHsiN +J5iipbdZNpZ3XL0l8/t/7T60nM7UZDqt3twLMA0eRFRlCnhMjvFE5Zgj5DE7BsJh +w2nCoGWkAcfeuih+jfyEjN24NK+sE/bM+krwVv430ewJwm1bVUqKrbOb9aa6V9gP +9RmlwZlOTFGcWBYl/cfRONn9qi9a6w== +=Lvw+ +-----END PGP PUBLIC KEY BLOCK----- +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFrqgT0BEAC7xo0WH+eNrLlU5LrCk59KmImn1abFcmWNd8kYr5XfqmJKyVqo +EY7A/yRjf+Yn1621EDkpKPjbql7q7MlZMpqKVdOWKWgmhvz08IOKJxaIABd/iIRT +FwhIvB68YjtmzcoOJRi1wLnwuG55fJ9E69HyZ33jgAlRaWV3bE/YyszoTlZriUOE +RbzC5WzX004cE9evlrr+YLt5Y6z7tntOdSXPLyGOFAO5LYMsHsEdi2JBYWrjlslG +6iJr5iEt9v442PrJ79YYbu5QWe/6APRWtI3AtKBp7y250oon2lbj+bIVD7U9fOBB +n/Frqx54UN22sJycET63hgYW4pIjIi5zq+FF15aU+ZqBdtNltoX4hEN7wlDpuNc0 +ezVu2Z8hdt8thpjiFUioTQ1t3RmsN6N548VwxmHdoYpAmiZqPIYBYvm85JB7S/3h +RLuoeGxufBhXGCpnG8ghTOGtbbdanuLB/UROFXTdyZbTCBN5S6jvwkPSaHG7H35Z +3fazMriTXwL1RGAbKITSWhDe5dXy/yOInWe8emJx+35vwQYCB2L4S8wRyQyRw6x4 +YoXCscW041DUMBX2CC7SjMCcmAC39UX1c3GbTpS3rkJR9cmXt50nviMnKpIwlIPd +ZYhmxKifwTJ70+c4GVK2o0MG9bTYvpYhLnYxv6iJCfgmT40E+qkDSzSoZwARAQAB +tCJUb20gU3RlbGxhcmQgPHRzdGVsbGFyQHJlZGhhdC5jb20+iQI/BBMBAgApBQJa +6oE9AhsDBQkB4TOABwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQoseUqYZB +nYp8Gg//RmX6Nup/Dv05jTL7dKRBSD08MF400tRtTmRhIuAgGv27qO2hbqzprKVu +vd20vKBB9CNZpXC2oY8k9VhGv2PZNi/X7iuULIYmzjeFMbJ5CjU6XvuUBmNasITH +6K/0KLhGebPs5h/DNtd7lbzDm86dLcjxgl6LXUULaSyYvTAKn6YB6mAv5J3qJs2X +lfTmenNh9p7TPFTfcMHcS70ywjqKXlDiH0q9bRKJnSX7xUFlTHjKkNnAcRjlPaGf +wUUhIPrnpDboqfwfcmScLrHANW9nwFWSFkNAJu1HQUEuF+An/RZUHDxFbLPKKAIp +hwZ0aORTfBVZ80AjehDMYCbmp1DJeTyLjC1/94un6mlxPIKnPPPM8rMxr83xnrvP ++Y1+pJaDUL7ZvKnmt2LrGRa9GvsNiYKpCNCORfiwZTeSxxXb+LgaodnbCHvGBnk7 +nlbLdMY08vNlxSx8LNyG0krFxJw/rq260+73yc+qjENeG68fozTEy/4jSVrF4t3m +8AAUu5r6i/Aomo7Q27TjU928bbCVunpvDpserfDqr3zsA96LO9k8T6THR6zC9i+R +LiN9Vjl+Rr2YuU26DjFYkCNEA2kNflYCWPJi5I0eodTPZrIPBWJ+H0YTRX31bMH9 +X88FnWJuCwaqAMN3rWlX/lXNCouWDdCuPWseZApISAMnVDE2mM+JAlYEEwEIAEAC +GwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgBYhBEdOIjFqv0eFqIxujqLHlKmG +QZ2KBQJgkytfBQkJaxEiAAoJEKLHlKmGQZ2Kv8YP/jNPjcMAP0ZTpUcYV46mGKwf +aQ0g5FUMSfxP7uJHtctj2dUckPGpA9SAH+ApiJutVgTQpWqNJKPd2vVxOiu5sywN +iDKCOMlKug5m6lgLX5h3zBvSN90Hpn4I0qHRA3rgENLoPs/UYBxohvFPIhOOjPqO +HIUuSPhAIuIZawxtqlADswHiKPy38Ao5GnWRb60zKfrB+N+ZiOtg7ITrlTGYm2tX +0W9iWUG32gIA/RX2qmFPoLrDFqsk66Eir0Ghk5gppRrmpEl/M1lqA8bxlqWto/8w +V8yDbSEu5fmM3WN3OUcSA23lYJi4j656Q4hS5PU+IWuZbBhcpYwDGexV5+m/ySZb +wtHZMIb4Au+dgJHCvRiSqHgplyfiamxX5CfA0DJVHoGXpBOw8a2geRT0+DrjSbOS ++CDDnlfmQLfHgjEuyQPU8V0Wlb0tJEvnPPqNPmAv0Rv7MC4qmD/zDrgwuddpfr1x +H+nWus2plR8E6p/x9uvPLb3plJ94ri1XjXiJPyPvqzBAwA40Zeg0rE7sTVwCC3E9 +RZa7dHh17exkcZdOIS/vRQ1G/VNaOVUwrcC/vIMgZSe37bCLeOKViMtacAiBJDjo +INC1QJ2F3CYVwktrcgmuz9S8e2WrqdTWwijjConB80EwfHQllz5sp/jU6Bgv297X +UXkgpk1y+ibQ9/syRQpFuQINBFrqgT0BEADB2vDHMuexkaUm3rPi6SvyMGcsHWle +feAWm+UjROKIaV77rHwo0/8ncKbtoQx4ZZjDXdI77M2bXB7tPgyEML90bWDMMGN/ +gnpwWSsiDRWpFIV/+hD6B+l9UaEi4UvEstUbIchOkGrZgPZ4Qism4FSVosEK+FE7 +EKCT4PSS+LiBKSxJZB8/g2uX+3pJvVxYurvcVpTmiNlXvUyll4KMpzy5e0KKa/0y +w9h7SAre5399cSM8E7PDQZQDb1EwbyVyO2yDLgs+p3yzPtRJAydaqRPmT1JbSCYf +hcihTrViMA4EDN5GRjH2EElI37+2HMpgLs4rc6Abz1F4FUVFhqWJXCKUcAIrG17w +A7YUlYg38S6Xws2Xj1VfZ/WP7/qIMJZidYTHZbN9WWCaifCPfLlE5VDNsa8y6Mxm +uFMBAB4PpB1gmmP9pPZsOzV9SmeYt8h2P8cVKDW2f56azpBZvZX6NFn8e0+ZDXS4 +8BQz31G2Xdfa3uOEV0J3JxPXcEbfuPzDHb7OMYP+2Ypjox1TozT1e9zr46SQl9OF +MglOBnwLZJ9baA/IqZkqLq5iu5Oqda44EIVNAntQ3gebi3+q3YG1SvNUseIy2+8y +cNWtdDuWv366Af0okCdrKAdap8+KbREer9uXhamtvxc49RCoWwuKoKfBz0RdVvMv +R/Py2xV8A7PaIQARAQABiQIlBBgBAgAPBQJa6oE9AhsMBQkB4TOAAAoJEKLHlKmG +QZ2KAaMQALHif2E0PBLVt09vlr4i8jAsQvDrzRajmVPd2B9RpfNU6HJe/y93SZd2 +udr9vzgmfd2o5u12vbegKNiMRgp1VyHQDmYlce27jrH5aPuKmos78+o5/p5yPWCv +Rj8zxGKh7le7UPO+7UveKu+bgb3zwTj6bEuHX7fVI+WjGmEH3bbjDGamWxXrpfGc +7+Jr8TN4ZO2OwYBcFOS9U2ZQ6TxrPaCSIm6+j8f+a9HPOuuDc62mMuV/EWQZy0i7 +DhDqU2PNpVjQDWQNpHA8oLDrjNFAoJS8gbHABVsFM1VnwBNT2MKcZQmm05dlQ+ll +S6meHNCvTniKIKC+Giz1Yd5JVGDACZWWPxEz6VhpQW/twkxRqwlUdpFt7UgDquTL +M1beQUCZRt81yJTNdrggbhQ2POxOdIO0CPiQv7U1IzndZp6baedeBw4a7FCbj6GY +cQeHxQCrWpQrwigiseG5uhhS9aiaVFEHja9baSLfXlZu/vsR4MdDG5/iEpier/Xw +h1qnpTSY+r31Uw3lTUlPHzlg47PMgPslaIhCzfVggxh9bTqxcDbuYJ7NuoMho3tN +yWfeofTJ7PhKzoXM2Y/rRFoM5gNh1RVA19ngLT5Jwiof8fPZvHJ/9ZkHn+O7eMNm +m5++gYza3pnn2/PoGpGGAKok+sfJiq5Tb7RUefyJTeZiyTZ/XJrA +=tMzl +-----END PGP PUBLIC KEY BLOCK----- diff --git a/remove-test.patch b/remove-test.patch deleted file mode 100644 index ba43de9..0000000 --- a/remove-test.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt b/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt -index 253f78eb36ea..1199da3e4cfd 100644 ---- a/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt -+++ b/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt -@@ -30,7 +30,6 @@ add_extra_unittest(ClangTidyTests - OptionsProviderTest.cpp - OverlappingReplacementsTest.cpp - UsingInserterTest.cpp -- ReadabilityModuleTest.cpp - TransformerClangTidyCheckTest.cpp - ) - -@@ -54,7 +53,6 @@ target_link_libraries(ClangTidyTests - clangTidyGoogleModule - clangTidyLLVMModule - clangTidyObjCModule -- clangTidyReadabilityModule - clangTidyUtils - LLVMTestingSupport - ) diff --git a/sources b/sources index b6a835f..4ace6b5 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -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 +SHA512 (clang-tools-extra-15.0.0.src.tar.xz) = 74e42df5a5496eacb69f172ac77a33fdf19be63cdab22c6bf5f7a9acdf9742bd48f8ee791cdf8bb14c17df9ba1e3b07c6e95ac68c62e4180acbd510fa971da49 +SHA512 (clang-tools-extra-15.0.0.src.tar.xz.sig) = b6adbffa21483f125fbe2712d7d20df9be2d05ea354f170b5d08f80499fdcf2eb37a4f2e5781dfdce124687fb94935f535aea37ff2d5ab6d81ffe88324a9272f +SHA512 (clang-15.0.0.src.tar.xz) = cf6eab1bd4623e0bcf844839f5008ec49f83c9b4eb145de21798125a2c8798909007ed7c74a2ade1eed4b210a62750411b8dcad37263148a5ffca81988cf7dc4 +SHA512 (clang-15.0.0.src.tar.xz.sig) = 6c15f4783512c402079af42f1ae55a9d3e03f622bbda5bd789e8902ef03a365d75d3765d4bf50975a75f116e72e780a5226ab2ad3e145c83a1cbf65fdee8d271 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 From c55124d0324a3dd7b7ac78e055ecccc3abaccfdb Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 7 Sep 2022 16:57:23 +0200 Subject: [PATCH 03/77] Fix i686 build --- clang.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clang.spec b/clang.spec index cc9b4fa..68494a3 100644 --- a/clang.spec +++ b/clang.spec @@ -301,7 +301,12 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py %define _find_debuginfo_dwz_opts %{nil} %endif +# TODO: Drop the HAVE_CXX_ATOMICS64_WITHOUT_LIB once clang15 is in the buildroot. It looks like +# previously clang emitted __atomic_load for std::atomic, which is not detected by cmake. %cmake -G Ninja \ +%ifarch %ix86 + -DHAVE_CXX_ATOMICS64_WITHOUT_LIB=OFF \ +%endif -DLLVM_PARALLEL_LINK_JOBS=1 \ -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ From 3389ce3d4f956d7d1e03b32d2203a2e8af80ec79 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 7 Sep 2022 16:14:07 +0200 Subject: [PATCH 04/77] Fix compat build Backport changes from clang14 package. We need to exclude patches for clang-format (which we don't build for compat packages). Additionally, clang14-devel needs a dependency on clang14-libs, otherwise this only installs dead symlinks without the shared objects they point to. --- clang.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index 68494a3..e4382f1 100644 --- a/clang.spec +++ b/clang.spec @@ -68,9 +68,11 @@ Patch5: 0010-PATCH-clang-Produce-DWARF4-by-default.patch # TODO: Can be dropped in LLVM 16: https://reviews.llvm.org/D133316 Patch6: 0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch +%if %{without compat_build} # Patches for clang-tools-extra # See https://reviews.llvm.org/D120301 Patch201: 0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch +%endif BuildRequires: clang BuildRequires: cmake @@ -178,11 +180,11 @@ Runtime library for clang. %package devel Summary: Development header files for clang +Requires: %{name}-libs = %{version}-%{release} %if %{without compat_build} Requires: %{name}%{?_isa} = %{version}-%{release} # The clang CMake files reference tools from clang-tools-extra. Requires: %{name}-tools-extra%{?_isa} = %{version}-%{release} -Requires: %{name}-libs = %{version}-%{release} %endif %description devel From 668f77d2079b8f6186c638b6d43c35ced2d7f5a4 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 14 Sep 2022 09:42:01 +0200 Subject: [PATCH 05/77] Downgrade implicit int and implicit function declaration to warning only This backports a fix for a major regression that will be part of the 15.0.1 release. See https://reviews.llvm.org/D133800 and https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213. --- ...ngrade-implicit-int-and-implicit-fun.patch | 1015 +++++++++++++++++ clang.spec | 9 +- 2 files changed, 1023 insertions(+), 1 deletion(-) create mode 100644 0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch diff --git a/0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch b/0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch new file mode 100644 index 0000000..ffd6d3d --- /dev/null +++ b/0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch @@ -0,0 +1,1015 @@ +From 77c19531189aac51466617f97cdacdaebf56291a Mon Sep 17 00:00:00 2001 +From: Aaron Ballman +Date: Wed, 14 Sep 2022 09:38:39 +0200 +Subject: [PATCH] [Clang 15.0.1] Downgrade implicit int and implicit function + declaration to warning only + +The changes in Clang 15.0.0 which enabled these diagnostics as a warning which defaulted to an error caused disruption for people working on distributions such as Gentoo. There was an explicit request to downgrade these to be warning-only in Clang 15.0.1 with the expectation that Clang 16 will default the diagnostics to an error. + +See https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213 for more details on the discussion. +--- + clang/docs/ReleaseNotes.rst | 21 +++++------ + .../clang/Basic/DiagnosticSemaKinds.td | 8 ++--- + clang/test/C/drs/dr0xx.c | 2 +- + clang/test/C/drs/dr1xx.c | 2 +- + clang/test/Driver/cxx_for_opencl.clcpp | 2 +- + clang/test/FixIt/fixit.c | 2 +- + clang/test/Frontend/fixed_point_errors.c | 4 +-- + clang/test/Frontend/fixed_point_not_enabled.c | 2 +- + .../Frontend/system-header-line-directive.c | 2 +- + clang/test/Headers/arm-cmse-header-ns.c | 10 +++--- + clang/test/Modules/config_macros.m | 2 +- + clang/test/Modules/malformed-overload.m | 2 +- + clang/test/Modules/modulemap-locations.m | 6 ++-- + clang/test/OpenMP/declare_mapper_messages.c | 4 +-- + clang/test/PCH/chain-macro-override.c | 2 +- + clang/test/Parser/altivec.c | 4 +-- + clang/test/Parser/attributes.c | 10 +++--- + clang/test/Parser/declarators.c | 8 ++--- + clang/test/Parser/objc-forcollection-neg-2.m | 2 +- + .../Preprocessor/macro_paste_msextensions.c | 2 +- + clang/test/Sema/__try.c | 2 +- + clang/test/Sema/aarch64-tme-errors.c | 2 +- + clang/test/Sema/address_spaces.c | 2 +- + clang/test/Sema/auto-type.c | 2 +- + clang/test/Sema/bitfield.c | 2 +- + clang/test/Sema/block-args.c | 2 +- + clang/test/Sema/block-literal.c | 2 +- + clang/test/Sema/builtin-setjmp.c | 4 +-- + clang/test/Sema/builtins.c | 6 ++-- + clang/test/Sema/crash-invalid-builtin.c | 2 +- + clang/test/Sema/cxx-as-c.c | 2 +- + clang/test/Sema/function.c | 6 ++-- + clang/test/Sema/implicit-builtin-decl.c | 4 +-- + clang/test/Sema/implicit-decl.c | 35 +++++++++++-------- + clang/test/Sema/implicit-int.c | 12 +++---- + clang/test/Sema/implicit-intel-builtin-decl.c | 14 ++++---- + clang/test/Sema/implicit-ms-builtin-decl.c | 12 +++---- + clang/test/Sema/invalid-decl.c | 2 +- + clang/test/Sema/invalid-struct-init.c | 2 +- + clang/test/Sema/redefinition.c | 2 +- + clang/test/Sema/typo-correction.c | 6 ++-- + clang/test/Sema/varargs.c | 2 +- + clang/test/Sema/vla.c | 2 +- + .../SemaObjC/builtin_objc_lib_functions.m | 14 ++++---- + clang/test/SemaObjC/builtin_objc_nslog.m | 4 +-- + .../SemaObjC/ivar-lookup-resolution-builtin.m | 2 +- + clang/test/SemaObjC/protocols.m | 2 +- + clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl | 2 +- + 48 files changed, 124 insertions(+), 124 deletions(-) + +diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst +index cbf3f4b37b5f..a26846a3eac4 100644 +--- a/clang/docs/ReleaseNotes.rst ++++ b/clang/docs/ReleaseNotes.rst +@@ -245,18 +245,15 @@ Improvements to Clang's diagnostics + without a prototype and with no arguments is an invalid redeclaration of a + function with a prototype. e.g., ``void f(int); void f() {}`` is now properly + diagnosed. +-- The ``-Wimplicit-function-declaration`` warning diagnostic now defaults to +- an error in C99 and later. Prior to C2x, it may be downgraded to a warning +- with ``-Wno-error=implicit-function-declaration``, or disabled entirely with +- ``-Wno-implicit-function-declaration``. As of C2x, support for implicit +- function declarations has been removed, and the warning options will have no +- effect. +-- The ``-Wimplicit-int`` warning diagnostic now defaults to an error in C99 and +- later. Prior to C2x, it may be downgraded to a warning with +- ``-Wno-error=implicit-int``, or disabled entirely with ``-Wno-implicit-int``. +- As of C2x, support for implicit int has been removed, and the warning options +- will have no effect. Specifying ``-Wimplicit-int`` in C89 mode will now issue +- warnings instead of being a noop. ++- The ``-Wimplicit-function-declaration`` warning diagnostic is now enabled by ++ default in C99, C11, and C17. As of C2x, support for implicit function ++ declarations has been removed, and the warning options will have no effect. ++ *NOTE* this warning will default to an error in Clang 16. ++- The ``-Wimplicit-int`` warning diagnostic is now enabled by default in C99, ++ C11, and C17. As of C2x, support for implicit int has been removed, and the ++ warning option will have no effect. Specifying ``-Wimplicit-int`` in C89 mode ++ will now issue warnings instead of being a noop. ++ *NOTE* this warning will default to an error in Clang 16. + - No longer issue a "declaration specifiers missing, defaulting to int" + diagnostic in C89 mode because it is not an extension in C89, it was valid + code. The diagnostic has been removed entirely as it did not have a +diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td +index 6ff5b8de57fd..cb460401eb47 100644 +--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td ++++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td +@@ -419,7 +419,7 @@ def warn_implicit_function_decl : Warning< + InGroup, DefaultIgnore; + def ext_implicit_function_decl_c99 : ExtWarn< + "call to undeclared function %0; ISO C99 and later do not support implicit " +- "function declarations">, InGroup, DefaultError; ++ "function declarations">, InGroup; + def note_function_suggestion : Note<"did you mean %0?">; + + def err_ellipsis_first_param : Error< +@@ -705,7 +705,7 @@ def ext_implicit_lib_function_decl : ExtWarn< + def ext_implicit_lib_function_decl_c99 : ExtWarn< + "call to undeclared library function '%0' with type %1; ISO C99 and later " + "do not support implicit function declarations">, +- InGroup, DefaultError; ++ InGroup; + def note_include_header_or_declare : Note< + "include the header <%0> or explicitly provide a declaration for '%1'">; + def note_previous_builtin_declaration : Note<"%0 is a builtin with type %1">; +@@ -4359,7 +4359,7 @@ def err_ident_list_in_fn_declaration : Error< + "a parameter list without types is only allowed in a function definition">; + def ext_param_not_declared : ExtWarn< + "parameter %0 was not declared, defaults to 'int'; ISO C99 and later do not " +- "support implicit int">, InGroup, DefaultError; ++ "support implicit int">, InGroup; + def err_param_default_argument : Error< + "C does not support default arguments">; + def err_param_default_argument_redefinition : Error< +@@ -10029,7 +10029,7 @@ def warn_receiver_forward_class : Warning< + def note_method_sent_forward_class : Note<"method %0 is used for the forward class">; + def ext_missing_type_specifier : ExtWarn< + "type specifier missing, defaults to 'int'; ISO C99 and later do not support " +- "implicit int">, InGroup, DefaultError; ++ "implicit int">, InGroup; + def err_missing_type_specifier : Error< + "a type specifier is required for all declarations">; + def err_decimal_unsupported : Error< +diff --git a/clang/test/C/drs/dr0xx.c b/clang/test/C/drs/dr0xx.c +index 183382406475..3bfad3637d26 100644 +--- a/clang/test/C/drs/dr0xx.c ++++ b/clang/test/C/drs/dr0xx.c +@@ -110,7 +110,7 @@ struct dr007_b; + * of treated as declaring a parameter of type 'int (*)(dr009_t);' + */ + typedef int dr009_t; +-void dr009_f((dr009_t)); /* c99untilc2x-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} ++void dr009_f((dr009_t)); /* c99untilc2x-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} + c2xandup-error {{a type specifier is required for all declarations}} */ + + /* WG14 DR010: +diff --git a/clang/test/C/drs/dr1xx.c b/clang/test/C/drs/dr1xx.c +index 70435b523765..1e430c5fb395 100644 +--- a/clang/test/C/drs/dr1xx.c ++++ b/clang/test/C/drs/dr1xx.c +@@ -369,7 +369,7 @@ void dr163(void) { + int i; + i = undeclared; /* expected-error {{use of undeclared identifier 'undeclared'}} */ + sdfsdfsf = 1; /* expected-error {{use of undeclared identifier 'sdfsdfsf'}} */ +- i = also_undeclared(); /* c99untilc2x-error {{call to undeclared function 'also_undeclared'; ISO C99 and later do not support implicit function declarations}} ++ i = also_undeclared(); /* c99untilc2x-warning {{call to undeclared function 'also_undeclared'; ISO C99 and later do not support implicit function declarations}} + c2xandup-error {{use of undeclared identifier 'also_undeclared'}} + */ + } +diff --git a/clang/test/Driver/cxx_for_opencl.clcpp b/clang/test/Driver/cxx_for_opencl.clcpp +index fc2fc621791d..e3e89c53b888 100644 +--- a/clang/test/Driver/cxx_for_opencl.clcpp ++++ b/clang/test/Driver/cxx_for_opencl.clcpp +@@ -13,6 +13,6 @@ kernel void k(){ + auto a = get_local_id(1); + #ifndef __OPENCL_CPP_VERSION__ + //expected-error@-2{{OpenCL C version 2.0 does not support the 'auto' storage class specifier}} +-//expected-error@-3{{type specifier missing, defaults to 'int'}} ++//expected-warning@-3{{type specifier missing, defaults to 'int'}} + #endif + } +diff --git a/clang/test/FixIt/fixit.c b/clang/test/FixIt/fixit.c +index eda00c35ccbb..c929b5abc5ee 100644 +--- a/clang/test/FixIt/fixit.c ++++ b/clang/test/FixIt/fixit.c +@@ -29,7 +29,7 @@ int array0[5] = { [3] 3 }; // expected-warning {{GNU 'missing ='}} + + // CHECK: int x + // CHECK: int y +-void f1(x, y) // expected-error 2{{was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} ++void f1(x, y) // expected-warning 2{{was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} + { + } + +diff --git a/clang/test/Frontend/fixed_point_errors.c b/clang/test/Frontend/fixed_point_errors.c +index 6a711936f239..2d12a1ebb10b 100644 +--- a/clang/test/Frontend/fixed_point_errors.c ++++ b/clang/test/Frontend/fixed_point_errors.c +@@ -228,9 +228,9 @@ void CheckSuffixOnIntegerLiterals(void) { + + // Using auto + auto auto_fract = 0r; // expected-error{{invalid suffix 'r' on integer constant}} +- // expected-error@-1{{type specifier missing, defaults to 'int'}} ++ // expected-warning@-1{{type specifier missing, defaults to 'int'}} + auto auto_accum = 0k; // expected-error{{invalid suffix 'k' on integer constant}} +- // expected-error@-1{{type specifier missing, defaults to 'int'}} ++ // expected-warning@-1{{type specifier missing, defaults to 'int'}} + } + + // Ok conversions +diff --git a/clang/test/Frontend/fixed_point_not_enabled.c b/clang/test/Frontend/fixed_point_not_enabled.c +index a1a60c5a6fa8..e7522213f98d 100644 +--- a/clang/test/Frontend/fixed_point_not_enabled.c ++++ b/clang/test/Frontend/fixed_point_not_enabled.c +@@ -11,7 +11,7 @@ unsigned long _Accum u_long_accum; // expected-error{{compile with '-ffixed-p + // Aliased fixed point types + short _Accum short_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}} + _Accum accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}} +- // expected-error@-1{{type specifier missing, defaults to 'int'}} ++ // expected-warning@-1{{type specifier missing, defaults to 'int'}} + long _Accum long_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}} + + // Cannot use fixed point suffixes +diff --git a/clang/test/Frontend/system-header-line-directive.c b/clang/test/Frontend/system-header-line-directive.c +index d5705e028daa..0de69196d76e 100644 +--- a/clang/test/Frontend/system-header-line-directive.c ++++ b/clang/test/Frontend/system-header-line-directive.c +@@ -3,7 +3,7 @@ + #include + #include + +-// expected-error@line-directive.h:* {{type specifier missing, defaults to 'int'}} ++// expected-warning@line-directive.h:* {{type specifier missing, defaults to 'int'}} + #include "line-directive.h" + + // This tests that "#line" directives in system headers preserve system +diff --git a/clang/test/Headers/arm-cmse-header-ns.c b/clang/test/Headers/arm-cmse-header-ns.c +index dfbef2c00291..b4112a4fc79a 100644 +--- a/clang/test/Headers/arm-cmse-header-ns.c ++++ b/clang/test/Headers/arm-cmse-header-ns.c +@@ -1,4 +1,4 @@ +-// RUN: not %clang_cc1 -triple thumbv8m.base-eabi -fsyntax-only %s 2>&1 | FileCheck --check-prefix=CHECK-c %s ++// RUN: %clang_cc1 -triple thumbv8m.base-eabi -fsyntax-only %s 2>&1 | FileCheck --check-prefix=CHECK-c %s + // RUN: not %clang_cc1 -triple thumbv8m.base-eabi -fsyntax-only -x c++ %s 2>&1 | FileCheck --check-prefix=CHECK-cpp %s + + #include +@@ -16,10 +16,10 @@ void func(callback_t fptr, void *p) + cmse_TTAT(p); + cmse_TTA_fptr(fptr); + cmse_TTAT_fptr(fptr); +-// CHECK-c: error: call to undeclared function 'cmse_TTA' +-// CHECK-c: error: call to undeclared function 'cmse_TTAT' +-// CHECK-c: error: call to undeclared function 'cmse_TTA_fptr' +-// CHECK-c: error: call to undeclared function 'cmse_TTAT_fptr' ++// CHECK-c: warning: call to undeclared function 'cmse_TTA' ++// CHECK-c: warning: call to undeclared function 'cmse_TTAT' ++// CHECK-c: warning: call to undeclared function 'cmse_TTA_fptr' ++// CHECK-c: warning: call to undeclared function 'cmse_TTAT_fptr' + // CHECK-cpp: error: use of undeclared identifier 'cmse_TTA' + // CHECK-cpp: error: use of undeclared identifier 'cmse_TTAT' + // CHECK-cpp: error: use of undeclared identifier 'cmse_TTA_fptr' +diff --git a/clang/test/Modules/config_macros.m b/clang/test/Modules/config_macros.m +index dd071993809b..68ef6508afe6 100644 +--- a/clang/test/Modules/config_macros.m ++++ b/clang/test/Modules/config_macros.m +@@ -5,7 +5,7 @@ int *test_foo(void) { + } + + char *test_bar(void) { +- return bar(); // expected-error{{call to undeclared function 'bar'; ISO C99 and later do not support implicit function declarations}} \ ++ return bar(); // expected-warning{{call to undeclared function 'bar'; ISO C99 and later do not support implicit function declarations}} \ + // expected-error{{incompatible integer to pointer conversion}} + } + +diff --git a/clang/test/Modules/malformed-overload.m b/clang/test/Modules/malformed-overload.m +index fd5d2f4f696b..369de580c9d7 100644 +--- a/clang/test/Modules/malformed-overload.m ++++ b/clang/test/Modules/malformed-overload.m +@@ -1,6 +1,6 @@ + // RUN: rm -rf %t + // RUN: %clang_cc1 -fsyntax-only -I%S/Inputs/malformed-overload -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Wno-strict-prototypes -verify %s +-NSLog(@"%@", path); // expected-error {{expected parameter declarator}} expected-error {{expected ')'}} expected-error {{type specifier missing}} expected-warning {{incompatible redeclaration}} expected-note {{to match this '('}} expected-note {{'NSLog' is a builtin with type}} ++NSLog(@"%@", path); // expected-error {{expected parameter declarator}} expected-error {{expected ')'}} expected-warning {{type specifier missing}} expected-warning {{incompatible redeclaration}} expected-note {{to match this '('}} expected-note {{'NSLog' is a builtin with type}} + #import "X.h" + + @class NSString; +diff --git a/clang/test/Modules/modulemap-locations.m b/clang/test/Modules/modulemap-locations.m +index e5738e105263..08e06f47f5c8 100644 +--- a/clang/test/Modules/modulemap-locations.m ++++ b/clang/test/Modules/modulemap-locations.m +@@ -12,9 +12,7 @@ + + void test(void) { + will_be_found1(); +- wont_be_found1(); // expected-error{{call to undeclared function 'wont_be_found1'; ISO C99 and later do not support implicit function declarations}} \ +- expected-note {{did you mean 'will_be_found1'?}} \ +- expected-note@Inputs/ModuleMapLocations/Module_ModuleMap/a.h:1 {{'will_be_found1' declared here}} ++ wont_be_found1(); // expected-warning{{call to undeclared function 'wont_be_found1'; ISO C99 and later do not support implicit function declarations}} + will_be_found2(); +- wont_be_found2(); // expected-error{{call to undeclared function 'wont_be_found2'; ISO C99 and later do not support implicit function declarations}} ++ wont_be_found2(); // expected-warning{{call to undeclared function 'wont_be_found2'; ISO C99 and later do not support implicit function declarations}} + } +diff --git a/clang/test/OpenMP/declare_mapper_messages.c b/clang/test/OpenMP/declare_mapper_messages.c +index ae95dc81caef..ab9e63ede450 100644 +--- a/clang/test/OpenMP/declare_mapper_messages.c ++++ b/clang/test/OpenMP/declare_mapper_messages.c +@@ -42,9 +42,9 @@ int fun(int arg) { + {} + #pragma omp target map(mapper:vv) // expected-error {{expected '(' after 'mapper'}} + {} +-#pragma omp target map(mapper( :vv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-error {{call to undeclared function 'mapper'}} expected-note {{to match this '('}} ++#pragma omp target map(mapper( :vv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-warning {{call to undeclared function 'mapper'}} expected-note {{to match this '('}} + {} +-#pragma omp target map(mapper(aa :vv) // expected-error {{use of undeclared identifier 'aa'}} expected-error {{expected ')'}} expected-error {{call to undeclared function 'mapper'}} expected-note {{to match this '('}} ++#pragma omp target map(mapper(aa :vv) // expected-error {{use of undeclared identifier 'aa'}} expected-error {{expected ')'}} expected-warning {{call to undeclared function 'mapper'}} expected-note {{to match this '('}} + {} + #pragma omp target map(mapper(ab) :vv) // expected-error {{missing map type}} expected-error {{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}} + {} +diff --git a/clang/test/PCH/chain-macro-override.c b/clang/test/PCH/chain-macro-override.c +index 26abae1cb9d5..62b05324ed44 100644 +--- a/clang/test/PCH/chain-macro-override.c ++++ b/clang/test/PCH/chain-macro-override.c +@@ -10,7 +10,7 @@ int foo(void) { + f(); + g(); + h(); +- h2(); // expected-error {{call to undeclared function 'h2'; ISO C99 and later do not support implicit function declarations}} ++ h2(); // expected-warning {{call to undeclared function 'h2'; ISO C99 and later do not support implicit function declarations}} + h3(); + return x; + } +diff --git a/clang/test/Parser/altivec.c b/clang/test/Parser/altivec.c +index 66d2ca33ed91..3f344e9c5a13 100644 +--- a/clang/test/Parser/altivec.c ++++ b/clang/test/Parser/altivec.c +@@ -97,8 +97,8 @@ vector unsigned long int v_uli; // nonaix-warning {{Use of 'long' with '__ve + // These should have warnings. + __vector long double vv_ld; // expected-error {{cannot use 'long double' with '__vector'}} + vector long double v_ld; // expected-error {{cannot use 'long double' with '__vector'}} +-vector bool v_b; // expected-error {{type specifier missing, defaults to 'int'}} +-vector __bool v___b; // expected-error {{type specifier missing, defaults to 'int'}} ++vector bool v_b; // expected-warning {{type specifier missing, defaults to 'int'}} ++vector __bool v___b; // expected-warning {{type specifier missing, defaults to 'int'}} + + // These should have errors. + #ifndef __VSX__ +diff --git a/clang/test/Parser/attributes.c b/clang/test/Parser/attributes.c +index fe22c7e98a53..3375c4bc3741 100644 +--- a/clang/test/Parser/attributes.c ++++ b/clang/test/Parser/attributes.c +@@ -7,7 +7,7 @@ foo(void) { + } + + +-__attribute__(()) y; // expected-error {{type specifier missing, defaults to 'int'}} ++__attribute__(()) y; // expected-warning {{type specifier missing, defaults to 'int'}} + + // PR2796 + int (__attribute__(()) *z)(long y); +@@ -19,8 +19,8 @@ int f2(y, __attribute__(()) x); // expected-error {{expected identifier}} + + // This is parsed as a normal argument list (with two args that are implicit + // int) because the __attribute__ is a declspec. +-void f3(__attribute__(()) x, // expected-error {{type specifier missing, defaults to 'int'}} +- y); // expected-error {{type specifier missing, defaults to 'int'}} ++void f3(__attribute__(()) x, // expected-warning {{type specifier missing, defaults to 'int'}} ++ y); // expected-warning {{type specifier missing, defaults to 'int'}} + + void f4(__attribute__(())); // expected-error {{expected parameter declarator}} + +@@ -30,14 +30,14 @@ int baz(int (__attribute__(()) *x)(long y)); + + void g1(void (*f1)(__attribute__(()) int x)); + void g2(int (*f2)(y, __attribute__(()) x)); // expected-error {{expected identifier}} +-void g3(void (*f3)(__attribute__(()) x, int y)); // expected-error {{type specifier missing, defaults to 'int'}} ++void g3(void (*f3)(__attribute__(()) x, int y)); // expected-warning {{type specifier missing, defaults to 'int'}} + void g4(void (*f4)(__attribute__(()))); // expected-error {{expected parameter declarator}} + + + void (*h1)(void (*f1)(__attribute__(()) int x)); + void (*h2)(int (*f2)(y, __attribute__(()) x)); // expected-error {{expected identifier}} + +-void (*h3)(void (*f3)(__attribute__(()) x)); // expected-error {{type specifier missing, defaults to 'int'}} ++void (*h3)(void (*f3)(__attribute__(()) x)); // expected-warning {{type specifier missing, defaults to 'int'}} + void (*h4)(void (*f4)(__attribute__(()))); // expected-error {{expected parameter declarator}} + + +diff --git a/clang/test/Parser/declarators.c b/clang/test/Parser/declarators.c +index c294bd085366..92cba09cdbbf 100644 +--- a/clang/test/Parser/declarators.c ++++ b/clang/test/Parser/declarators.c +@@ -6,7 +6,7 @@ void f0(); /* expected-warning {{a function declaration without a prototype is d + void f1(int [*]); + void f2(int [const *]); + void f3(int [volatile const*]); +-int f4(*XX)(void); /* expected-error {{cannot return}} expected-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} */ ++int f4(*XX)(void); /* expected-error {{cannot return}} expected-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} */ + int f5(int [static]); /* expected-error {{'static' may not be used without an array size}} */ + + char ((((*X)))); +@@ -64,9 +64,9 @@ struct xyz test8(void) { return a; } // a should be be marked invalid, no diag. + + + // Verify that implicit int still works. +-static f; // expected-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} +-static g = 4; // expected-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} +-static h // expected-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} ++static f; // expected-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} ++static g = 4; // expected-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} ++static h // expected-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} + __asm__("foo"); + + +diff --git a/clang/test/Parser/objc-forcollection-neg-2.m b/clang/test/Parser/objc-forcollection-neg-2.m +index e28b74f3f442..f95dd1356bc3 100644 +--- a/clang/test/Parser/objc-forcollection-neg-2.m ++++ b/clang/test/Parser/objc-forcollection-neg-2.m +@@ -24,7 +24,7 @@ typedef struct objc_object { + + @implementation MyList (BasicTest) + - (void)compilerTestAgainst { +- static i;// expected-error {{type specifier missing, defaults to 'int'}} ++ static i;// expected-warning {{type specifier missing, defaults to 'int'}} + for (id el, elem in self) // expected-error {{only one element declaration is allowed}} + ++i; + for (id el in self) +diff --git a/clang/test/Preprocessor/macro_paste_msextensions.c b/clang/test/Preprocessor/macro_paste_msextensions.c +index 1549ff5e5562..dcc5336b91c1 100644 +--- a/clang/test/Preprocessor/macro_paste_msextensions.c ++++ b/clang/test/Preprocessor/macro_paste_msextensions.c +@@ -32,7 +32,7 @@ nested(baz) rise of the dead tokens + // rdar://8197149 - VC++ allows invalid token pastes: (##baz + #define foo(x) abc(x) + #define bar(y) foo(##baz(y)) +-bar(q) // expected-error {{type specifier missing}} expected-error {{invalid preprocessing token}} expected-error {{parameter list without types}} ++bar(q) // expected-warning {{type specifier missing}} expected-error {{invalid preprocessing token}} expected-error {{parameter list without types}} + + // CHECK: abc(baz(q)) + +diff --git a/clang/test/Sema/__try.c b/clang/test/Sema/__try.c +index 9bfd914c013c..d0b2164198a2 100644 +--- a/clang/test/Sema/__try.c ++++ b/clang/test/Sema/__try.c +@@ -50,7 +50,7 @@ void TEST(void) { + } // expected-error{{expected '__except' or '__finally' block}} + + void TEST(void) { +- __except (FilterExpression()) { // expected-error{{call to undeclared function '__except'; ISO C99 and later do not support implicit function declarations}} \ ++ __except (FilterExpression()) { // expected-warning{{call to undeclared function '__except'; ISO C99 and later do not support implicit function declarations}} \ + // expected-error{{too few arguments to function call, expected 1, have 0}} \ + // expected-error{{expected ';' after expression}} + } +diff --git a/clang/test/Sema/aarch64-tme-errors.c b/clang/test/Sema/aarch64-tme-errors.c +index 26e931b62bcb..63ce87f3dc6b 100644 +--- a/clang/test/Sema/aarch64-tme-errors.c ++++ b/clang/test/Sema/aarch64-tme-errors.c +@@ -3,6 +3,6 @@ + #include "arm_acle.h" + + void test_no_tme_funcs(void) { +- __tstart(); // expected-error{{call to undeclared function '__tstart'; ISO C99 and later do not support implicit function declarations}} ++ __tstart(); // expected-warning{{call to undeclared function '__tstart'; ISO C99 and later do not support implicit function declarations}} + __builtin_tstart(); // expected-error{{use of unknown builtin '__builtin_tstart'}} + } +diff --git a/clang/test/Sema/address_spaces.c b/clang/test/Sema/address_spaces.c +index ff7a134e04eb..085bef9b72d3 100644 +--- a/clang/test/Sema/address_spaces.c ++++ b/clang/test/Sema/address_spaces.c +@@ -9,7 +9,7 @@ void bar(_AS2 int a); // expected-error {{parameter may not be qualified with an + void foo(_AS3 float *a, + _AS1 float b) // expected-error {{parameter may not be qualified with an address space}} + { +- _AS2 *x;// expected-error {{type specifier missing, defaults to 'int'}} ++ _AS2 *x;// expected-warning {{type specifier missing, defaults to 'int'}} + _AS1 float * _AS2 *B; + + int _AS1 _AS2 *Y; // expected-error {{multiple address spaces specified for type}} +diff --git a/clang/test/Sema/auto-type.c b/clang/test/Sema/auto-type.c +index 1170c687c96a..bc845e37c2ae 100644 +--- a/clang/test/Sema/auto-type.c ++++ b/clang/test/Sema/auto-type.c +@@ -37,7 +37,7 @@ void Issue53652(void) { + + // GCC does not accept this either, for the same reason. + _Atomic(__auto_type) aat2 = a; // expected-error {{'__auto_type' not allowed here}} \ +- // expected-error {{type specifier missing, defaults to 'int'}} ++ // expected-warning {{type specifier missing, defaults to 'int'}} + + // Ensure the types are what we expect them to be, regardless of order we + // pass the types. +diff --git a/clang/test/Sema/bitfield.c b/clang/test/Sema/bitfield.c +index 468fe93485cc..b2982515da4d 100644 +--- a/clang/test/Sema/bitfield.c ++++ b/clang/test/Sema/bitfield.c +@@ -84,5 +84,5 @@ struct Test6 { + }; + + struct PR36157 { +- int n : 1 ? 1 : implicitly_declare_function(); // expected-error {{call to undeclared function 'implicitly_declare_function'; ISO C99 and later do not support implicit function declarations}} ++ int n : 1 ? 1 : implicitly_declare_function(); // expected-warning {{call to undeclared function 'implicitly_declare_function'; ISO C99 and later do not support implicit function declarations}} + }; +diff --git a/clang/test/Sema/block-args.c b/clang/test/Sema/block-args.c +index 1e000abf4b36..245b2c02b806 100644 +--- a/clang/test/Sema/block-args.c ++++ b/clang/test/Sema/block-args.c +@@ -37,7 +37,7 @@ void f0(void) { + + // rdar://problem/8962770 + void test4(void) { +- int (^f)(void) = ^((x)) { }; // expected-error {{type specifier missing}} expected-error {{type-id cannot have a name}} ++ int (^f)(void) = ^((x)) { }; // expected-warning {{type specifier missing}} expected-error {{type-id cannot have a name}} + } + + // rdar://problem/9170609 +diff --git a/clang/test/Sema/block-literal.c b/clang/test/Sema/block-literal.c +index b760c647f0d1..4cb96fb49092 100644 +--- a/clang/test/Sema/block-literal.c ++++ b/clang/test/Sema/block-literal.c +@@ -41,7 +41,7 @@ void test2(void) { + + foo: + takeblock(^{ x = 4; }); // expected-error {{variable is not assignable (missing __block type specifier)}} +- __block y = 7; // expected-error {{type specifier missing, defaults to 'int'}} ++ __block y = 7; // expected-warning {{type specifier missing, defaults to 'int'}} + takeblock(^{ y = 8; }); + } + +diff --git a/clang/test/Sema/builtin-setjmp.c b/clang/test/Sema/builtin-setjmp.c +index 5092d1665c19..94cd2652d0ab 100644 +--- a/clang/test/Sema/builtin-setjmp.c ++++ b/clang/test/Sema/builtin-setjmp.c +@@ -35,10 +35,10 @@ void use(void) { + setjmp(0); + #if NO_SETJMP + // cxx-error@-2 {{undeclared identifier 'setjmp'}} +- // c-error@-3 {{call to undeclared function 'setjmp'; ISO C99 and later do not support implicit function declarations}} ++ // c-warning@-3 {{call to undeclared function 'setjmp'; ISO C99 and later do not support implicit function declarations}} + #elif ONLY_JMP_BUF + // cxx-error@-5 {{undeclared identifier 'setjmp'}} +- // c-error@-6 {{call to undeclared library function 'setjmp' with type 'int (jmp_buf)' (aka 'int (int *)'); ISO C99 and later do not support implicit function declarations}} ++ // c-warning@-6 {{call to undeclared library function 'setjmp' with type 'int (jmp_buf)' (aka 'int (int *)'); ISO C99 and later do not support implicit function declarations}} + // c-note@-7 {{include the header or explicitly provide a declaration for 'setjmp'}} + #else + // cxx-no-diagnostics +diff --git a/clang/test/Sema/builtins.c b/clang/test/Sema/builtins.c +index 702b40c63767..b3ef004bec0f 100644 +--- a/clang/test/Sema/builtins.c ++++ b/clang/test/Sema/builtins.c +@@ -206,9 +206,9 @@ void test18(void) { + } + + void no_ms_builtins(void) { +- __assume(1); // expected-error {{call to undeclared function '__assume'; ISO C99 and later do not support implicit function declarations}} +- __noop(1); // expected-error {{call to undeclared function '__noop'; ISO C99 and later do not support implicit function declarations}} +- __debugbreak(); // expected-error {{call to undeclared function '__debugbreak'; ISO C99 and later do not support implicit function declarations}} ++ __assume(1); // expected-warning {{call to undeclared function '__assume'; ISO C99 and later do not support implicit function declarations}} ++ __noop(1); // expected-warning {{call to undeclared function '__noop'; ISO C99 and later do not support implicit function declarations}} ++ __debugbreak(); // expected-warning {{call to undeclared function '__debugbreak'; ISO C99 and later do not support implicit function declarations}} + } + + void unavailable(void) { +diff --git a/clang/test/Sema/crash-invalid-builtin.c b/clang/test/Sema/crash-invalid-builtin.c +index 26e5888a9e30..8f749f7b32bb 100644 +--- a/clang/test/Sema/crash-invalid-builtin.c ++++ b/clang/test/Sema/crash-invalid-builtin.c +@@ -1,4 +1,4 @@ + // RUN: %clang_cc1 -triple=x86_64-apple-darwin -fsyntax-only -verify %s + // PR23086 + +-__builtin_isinf(...); // expected-error {{type specifier missing, defaults to 'int'}} expected-error {{ISO C requires a named parameter before '...'}} // expected-error {{cannot redeclare builtin function '__builtin_isinf'}} // expected-note {{'__builtin_isinf' is a builtin with type 'int ()'}} ++__builtin_isinf(...); // expected-warning {{type specifier missing, defaults to 'int'}} expected-error {{ISO C requires a named parameter before '...'}} // expected-error {{cannot redeclare builtin function '__builtin_isinf'}} // expected-note {{'__builtin_isinf' is a builtin with type 'int ()'}} +diff --git a/clang/test/Sema/cxx-as-c.c b/clang/test/Sema/cxx-as-c.c +index a5d1a4944c95..41d7350d1f15 100644 +--- a/clang/test/Sema/cxx-as-c.c ++++ b/clang/test/Sema/cxx-as-c.c +@@ -2,7 +2,7 @@ + + // PR36157 + struct Foo { +- Foo(int n) : n_(n) {} // expected-error 1+{{}} ++ Foo(int n) : n_(n) {} // expected-error 1+{{}} expected-warning 1+{{}} + private: + int n; + }; +diff --git a/clang/test/Sema/function.c b/clang/test/Sema/function.c +index 1143fe8f50d5..43c8a6c8662b 100644 +--- a/clang/test/Sema/function.c ++++ b/clang/test/Sema/function.c +@@ -18,7 +18,7 @@ void h (const char *fmt, ...) {} // expected-error{{conflicting types for 'h'}} + + // PR1965 + int t5(b); // expected-error {{parameter list without types}} +-int t6(int x, g); // expected-error {{type specifier missing, defaults to 'int'}} ++int t6(int x, g); // expected-warning {{type specifier missing, defaults to 'int'}} + + int t7(, ); // expected-error {{expected parameter declarator}} expected-error {{expected parameter declarator}} + int t8(, int a); // expected-error {{expected parameter declarator}} +@@ -41,8 +41,8 @@ int t14() { + } + + // +-y(y) { return y; } // expected-error{{parameter 'y' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} \ +- // expected-error{{type specifier missing, defaults to 'int'}} ++y(y) { return y; } // expected-warning{{parameter 'y' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} \ ++ // expected-warning{{type specifier missing, defaults to 'int'}} + + + // PR3137, +diff --git a/clang/test/Sema/implicit-builtin-decl.c b/clang/test/Sema/implicit-builtin-decl.c +index 055ba7e70eb1..a54e652556c3 100644 +--- a/clang/test/Sema/implicit-builtin-decl.c ++++ b/clang/test/Sema/implicit-builtin-decl.c +@@ -1,7 +1,7 @@ + // RUN: %clang_cc1 -fsyntax-only -Wno-strict-prototypes -verify %s + + void f() { +- int *ptr = malloc(sizeof(int) * 10); // expected-error{{call to undeclared library function 'malloc' with type}} \ ++ int *ptr = malloc(sizeof(int) * 10); // expected-warning{{call to undeclared library function 'malloc' with type}} \ + // expected-note{{include the header or explicitly provide a declaration for 'malloc'}} \ + // expected-note{{'malloc' is a builtin with type 'void *}} + } +@@ -24,7 +24,7 @@ void h() { + + void f2() { + fprintf(0, "foo"); // expected-warning{{declaration of built-in function 'fprintf' requires inclusion of the header }} \ +- expected-error {{call to undeclared function 'fprintf'; ISO C99 and later do not support implicit function declarations}} ++ expected-warning {{call to undeclared function 'fprintf'; ISO C99 and later do not support implicit function declarations}} + } + + // PR2892 +diff --git a/clang/test/Sema/implicit-decl.c b/clang/test/Sema/implicit-decl.c +index 351f70ea3366..ce26dcd3a122 100644 +--- a/clang/test/Sema/implicit-decl.c ++++ b/clang/test/Sema/implicit-decl.c +@@ -1,55 +1,60 @@ +-// RUN: %clang_cc1 %s -verify -fsyntax-only -Werror=implicit-function-declaration -std=c99 +-// RUN: %clang_cc1 %s -verify -fsyntax-only -std=c11 ++// RUN: %clang_cc1 %s -verify=werror,both -fsyntax-only -Werror=implicit-function-declaration -std=c99 ++// RUN: %clang_cc1 %s -verify=expected,both -fsyntax-only -std=c11 + // RUN: %clang_cc1 %s -verify=c2x -fsyntax-only -std=c2x + + /// -Werror-implicit-function-declaration is a deprecated alias used by many projects. +-// RUN: %clang_cc1 %s -verify -fsyntax-only -Werror-implicit-function-declaration ++// RUN: %clang_cc1 %s -verify=werror,both -fsyntax-only -Werror-implicit-function-declaration + + // c2x-note@*:* {{'__builtin_va_list' declared here}} + + typedef int int32_t; + typedef unsigned char Boolean; + +-extern int printf(__const char *__restrict __format, ...); // expected-note{{'printf' declared here}} \ ++extern int printf(__const char *__restrict __format, ...); // werror-note{{'printf' declared here}} \ + c2x-note {{'printf' declared here}} + + void func(void) { + int32_t *vector[16]; + const char compDesc[16 + 1]; + int32_t compCount = 0; +- if (_CFCalendarDecomposeAbsoluteTimeV(compDesc, vector, compCount)) { // expected-error {{call to undeclared function '_CFCalendarDecomposeAbsoluteTimeV'; ISO C99 and later do not support implicit function declarations}} \ +- expected-note {{previous implicit declaration}} \ ++ if (_CFCalendarDecomposeAbsoluteTimeV(compDesc, vector, compCount)) { // werror-error {{call to undeclared function '_CFCalendarDecomposeAbsoluteTimeV'; ISO C99 and later do not support implicit function declarations}} \ ++ both-note {{previous implicit declaration}} \ ++ expected-warning {{call to undeclared function '_CFCalendarDecomposeAbsoluteTimeV'; ISO C99 and later do not support implicit function declarations}} \ + c2x-error {{use of undeclared identifier '_CFCalendarDecomposeAbsoluteTimeV'}} + } + +- printg("Hello, World!\n"); // expected-error{{call to undeclared function 'printg'; ISO C99 and later do not support implicit function declarations}} \ +- expected-note{{did you mean 'printf'?}} \ ++ printg("Hello, World!\n"); // werror-error{{call to undeclared function 'printg'; ISO C99 and later do not support implicit function declarations}} \ ++ werror-note{{did you mean 'printf'?}} \ ++ expected-warning{{call to undeclared function 'printg'; ISO C99 and later do not support implicit function declarations}} \ + c2x-error {{use of undeclared identifier 'printg'; did you mean 'printf'?}} + +- __builtin_is_les(1, 3); // expected-error{{use of unknown builtin '__builtin_is_les'}} \ ++ __builtin_is_les(1, 3); // both-error{{use of unknown builtin '__builtin_is_les'}} \ + c2x-error {{unknown type name '__builtin_is_les'; did you mean '__builtin_va_list'?}} \ + c2x-error {{expected identifier or '('}} \ + c2x-error {{expected ')'}} \ + c2x-note {{to match this '('}} + } +-Boolean _CFCalendarDecomposeAbsoluteTimeV(const char *componentDesc, int32_t **vector, int32_t count) { // expected-error {{conflicting types}} ++Boolean _CFCalendarDecomposeAbsoluteTimeV(const char *componentDesc, int32_t **vector, int32_t count) { // both-error {{conflicting types}} + return 0; + } + + + // Test the typo-correction callback in Sema::ImplicitlyDefineFunction +-extern int sformatf(char *str, __const char *__restrict __format, ...); // expected-note{{'sformatf' declared here}} ++extern int sformatf(char *str, __const char *__restrict __format, ...); // werror-note{{'sformatf' declared here}} + void test_implicit(void) { + int formats = 0; // c2x-note {{'formats' declared here}} +- formatd("Hello, World!\n"); // expected-error{{call to undeclared function 'formatd'; ISO C99 and later do not support implicit function declarations}} \ +- expected-note{{did you mean 'sformatf'?}} \ ++ formatd("Hello, World!\n"); // werror-error{{call to undeclared function 'formatd'; ISO C99 and later do not support implicit function declarations}} \ ++ werror-note{{did you mean 'sformatf'?}} \ ++ expected-warning{{call to undeclared function 'formatd'; ISO C99 and later do not support implicit function declarations}} \ + c2x-error {{use of undeclared identifier 'formatd'; did you mean 'formats'?}} \ + c2x-error {{called object type 'int' is not a function or function pointer}} + } + + void test_suggestion(void) { +- bark(); // expected-error {{call to undeclared function 'bark'; ISO C99 and later do not support implicit function declarations}} \ ++ bark(); // werror-error {{call to undeclared function 'bark'; ISO C99 and later do not support implicit function declarations}} \ ++ expected-warning {{call to undeclared function 'bark'; ISO C99 and later do not support implicit function declarations}} \ + c2x-error {{use of undeclared identifier 'bark'}} +- bork(); // expected-error {{call to undeclared function 'bork'; ISO C99 and later do not support implicit function declarations}} \ ++ bork(); // werror-error {{call to undeclared function 'bork'; ISO C99 and later do not support implicit function declarations}} \ ++ expected-warning {{call to undeclared function 'bork'; ISO C99 and later do not support implicit function declarations}} \ + c2x-error {{use of undeclared identifier 'bork'}} + } +diff --git a/clang/test/Sema/implicit-int.c b/clang/test/Sema/implicit-int.c +index 477cd6977375..a5578cd0f65b 100644 +--- a/clang/test/Sema/implicit-int.c ++++ b/clang/test/Sema/implicit-int.c +@@ -4,18 +4,18 @@ + */ + + foo(void) { /* expected-warning {{type specifier missing, defaults to 'int'}} \ +- ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ ++ ext-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ + unsupported-error {{a type specifier is required for all declarations}} */ + return 0; + } + + y; /* expected-warning {{type specifier missing, defaults to 'int'}} \ +- ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ ++ ext-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ + unsupported-error {{a type specifier is required for all declarations}} */ + + /* rdar://6131634 */ + void f((x)); /* expected-warning {{type specifier missing, defaults to 'int'}} \ +- ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ ++ ext-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ + unsupported-error {{a type specifier is required for all declarations}} */ + + /* PR3702 */ +@@ -26,18 +26,18 @@ void f((x)); /* expected-warning {{type specifier missing, defaults to 'int'}} + #define ILPAD() PAD((NROW - tt.tt_row) * 10) /* 1 ms per char */ + + void +-h19_insline(n) /* ext-error {{parameter 'n' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} \ ++h19_insline(n) /* ext-warning {{parameter 'n' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} \ + unsupported-error {{unknown type name 'n'}} */ + { + ILPAD(); /* expected-warning {{type specifier missing, defaults to 'int'}} \ +- ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ ++ ext-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ + unsupported-error {{a type specifier is required for all declarations}} */ + + } + + struct foo { + __extension__ __attribute__((packed)) x : 4; /* expected-warning {{type specifier missing, defaults to 'int'}} \ +- ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ ++ ext-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ + unsupported-error {{unknown type name 'x'}} */ + + }; +diff --git a/clang/test/Sema/implicit-intel-builtin-decl.c b/clang/test/Sema/implicit-intel-builtin-decl.c +index e7d17d9f19b9..1015d9bfe026 100644 +--- a/clang/test/Sema/implicit-intel-builtin-decl.c ++++ b/clang/test/Sema/implicit-intel-builtin-decl.c +@@ -3,26 +3,26 @@ + + void f(void) { + (void)_mm_getcsr(); // cxx-warning{{implicitly declaring library function '_mm_getcsr'}} \ +- c-error{{call to undeclared library function '_mm_getcsr'}} \ ++ c-warning{{call to undeclared library function '_mm_getcsr'}} \ + expected-note{{include the header or explicitly provide a declaration for '_mm_getcsr'}} + _mm_setcsr(1); // cxx-warning{{implicitly declaring library function '_mm_setcsr'}} \ +- c-error{{call to undeclared library function '_mm_setcsr'}} \ ++ c-warning{{call to undeclared library function '_mm_setcsr'}} \ + expected-note{{include the header or explicitly provide a declaration for '_mm_setcsr'}} + _mm_sfence(); // cxx-warning{{implicitly declaring library function '_mm_sfence'}} \ +- c-error{{call to undeclared library function '_mm_sfence'}} \ ++ c-warning{{call to undeclared library function '_mm_sfence'}} \ + expected-note{{include the header or explicitly provide a declaration for '_mm_sfence'}} + + _mm_clflush((void*)0); // cxx-warning{{implicitly declaring library function '_mm_clflush'}} \ +- c-error{{call to undeclared library function '_mm_clflush'}} \ ++ c-warning{{call to undeclared library function '_mm_clflush'}} \ + expected-note{{include the header or explicitly provide a declaration for '_mm_clflush'}} + _mm_lfence(); // cxx-warning{{implicitly declaring library function '_mm_lfence'}} \ +- c-error{{call to undeclared library function '_mm_lfence'}} \ ++ c-warning{{call to undeclared library function '_mm_lfence'}} \ + expected-note{{include the header or explicitly provide a declaration for '_mm_lfence'}} + _mm_mfence(); // cxx-warning{{implicitly declaring library function '_mm_mfence'}} \ +- c-error{{call to undeclared library function '_mm_mfence'}} \ ++ c-warning{{call to undeclared library function '_mm_mfence'}} \ + expected-note{{include the header or explicitly provide a declaration for '_mm_mfence'}} + _mm_pause(); // cxx-warning{{implicitly declaring library function '_mm_pause'}} \ +- c-error{{call to undeclared library function '_mm_pause'}} \ ++ c-warning{{call to undeclared library function '_mm_pause'}} \ + expected-note{{include the header or explicitly provide a declaration for '_mm_pause'}} + } + +diff --git a/clang/test/Sema/implicit-ms-builtin-decl.c b/clang/test/Sema/implicit-ms-builtin-decl.c +index 1294bb6aa9aa..6bb2f6e3b8e2 100644 +--- a/clang/test/Sema/implicit-ms-builtin-decl.c ++++ b/clang/test/Sema/implicit-ms-builtin-decl.c +@@ -2,9 +2,9 @@ + // RUN: %clang_cc1 -triple i386-unknown-unknown -fsyntax-only -verify %s -fms-extensions + + void f(void) { +- (void)_byteswap_ushort(42); // expected-error{{call to undeclared library function '_byteswap_ushort'}} \ ++ (void)_byteswap_ushort(42); // expected-warning{{call to undeclared library function '_byteswap_ushort'}} \ + // expected-note{{include the header or explicitly provide a declaration for '_byteswap_ushort'}} +- (void)_byteswap_uint64(42LL); // expected-error{{call to undeclared library function '_byteswap_uint64'}} \ ++ (void)_byteswap_uint64(42LL); // expected-warning{{call to undeclared library function '_byteswap_uint64'}} \ + // expected-note{{include the header or explicitly provide a declaration for '_byteswap_uint64'}} + } + +@@ -21,9 +21,9 @@ void g(void) { + + #if defined(__x86_64__) + void h(void) { +- (void)__mulh(21, 2); // expected-error{{call to undeclared library function '__mulh'}} \ ++ (void)__mulh(21, 2); // expected-warning{{call to undeclared library function '__mulh'}} \ + // expected-note{{include the header or explicitly provide a declaration for '__mulh'}} +- (void)__umulh(21, 2); // expected-error{{call to undeclared library function '__umulh'}} \ ++ (void)__umulh(21, 2); // expected-warning{{call to undeclared library function '__umulh'}} \ + // expected-note{{include the header or explicitly provide a declaration for '__umulh'}} + } + +@@ -38,7 +38,7 @@ void i(void) { + + #if defined(i386) + void h(void) { +- (void)__mulh(21LL, 2LL); // expected-error{{call to undeclared function '__mulh'; ISO C99 and later do not support implicit function declarations}} +- (void)__umulh(21ULL, 2ULL); // expected-error{{call to undeclared function '__umulh'; ISO C99 and later do not support implicit function declarations}} ++ (void)__mulh(21LL, 2LL); // expected-warning{{call to undeclared function '__mulh'; ISO C99 and later do not support implicit function declarations}} ++ (void)__umulh(21ULL, 2ULL); // expected-warning{{call to undeclared function '__umulh'; ISO C99 and later do not support implicit function declarations}} + } + #endif +diff --git a/clang/test/Sema/invalid-decl.c b/clang/test/Sema/invalid-decl.c +index 4f2680074dcd..ca5fa124e802 100644 +--- a/clang/test/Sema/invalid-decl.c ++++ b/clang/test/Sema/invalid-decl.c +@@ -6,7 +6,7 @@ void test(void) { + + + // PR2400 +-typedef xtype (*x)(void* handle); // expected-error {{function cannot return function type}} expected-error 2{{type specifier missing, defaults to 'int'}} ++typedef xtype (*x)(void* handle); // expected-error {{function cannot return function type}} expected-warning 2{{type specifier missing, defaults to 'int'}} + + typedef void ytype(); + +diff --git a/clang/test/Sema/invalid-struct-init.c b/clang/test/Sema/invalid-struct-init.c +index 72f6bbae12ab..0dd00b55ea21 100644 +--- a/clang/test/Sema/invalid-struct-init.c ++++ b/clang/test/Sema/invalid-struct-init.c +@@ -3,7 +3,7 @@ + typedef struct _zend_module_entry zend_module_entry; + struct _zend_module_entry { + _efree((p)); // expected-error{{type name requires a specifier or qualifier}} \ +- expected-error {{type specifier missing, defaults to 'int'}} ++ expected-warning {{type specifier missing, defaults to 'int'}} + + }; + typedef struct _zend_function_entry { } zend_function_entry; +diff --git a/clang/test/Sema/redefinition.c b/clang/test/Sema/redefinition.c +index 7e690e1a917d..28f7f02bb251 100644 +--- a/clang/test/Sema/redefinition.c ++++ b/clang/test/Sema/redefinition.c +@@ -4,7 +4,7 @@ int f(int); + int f(int a) { return 0; } // expected-error {{redefinition of 'f'}} + + // +-int foo(x) { // expected-error {{parameter 'x' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} ++int foo(x) { // expected-warning {{parameter 'x' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} + return 0; + } + int x = 1; +diff --git a/clang/test/Sema/typo-correction.c b/clang/test/Sema/typo-correction.c +index ceab0e2634c5..4048488528d4 100644 +--- a/clang/test/Sema/typo-correction.c ++++ b/clang/test/Sema/typo-correction.c +@@ -10,11 +10,11 @@ void PR21656(void) { + x = (float)arst; // expected-error-re {{use of undeclared identifier 'arst'{{$}}}} + } + +-a = b ? : 0; // expected-error {{type specifier missing, defaults to 'int'}} \ ++a = b ? : 0; // expected-warning {{type specifier missing, defaults to 'int'}} \ + // expected-error {{use of undeclared identifier 'b'}} + + int foobar; // expected-note {{'foobar' declared here}} +-new_a = goobar ?: 4; // expected-error {{type specifier missing, defaults to 'int'}} \ ++new_a = goobar ?: 4; // expected-warning {{type specifier missing, defaults to 'int'}} \ + // expected-error {{use of undeclared identifier 'goobar'; did you mean 'foobar'?}} \ + // expected-error {{initializer element is not a compile-time constant}} + +@@ -37,7 +37,7 @@ int c11Generic(int arg) { + + typedef long long __m128i __attribute__((__vector_size__(16))); + int PR23101(__m128i __x) { +- return foo((__v2di)__x); // expected-error {{call to undeclared function 'foo'; ISO C99 and later do not support implicit function declarations}} \ ++ return foo((__v2di)__x); // expected-warning {{call to undeclared function 'foo'; ISO C99 and later do not support implicit function declarations}} \ + // expected-error {{use of undeclared identifier '__v2di'}} + } + +diff --git a/clang/test/Sema/varargs.c b/clang/test/Sema/varargs.c +index 2cb7270f604a..ebab2c9cd8b5 100644 +--- a/clang/test/Sema/varargs.c ++++ b/clang/test/Sema/varargs.c +@@ -114,7 +114,7 @@ void f13(enum E1 e, ...) { + } + + void f14(int e, ...) { +- // expected-error@+3 {{call to undeclared library function 'va_start'}} ++ // expected-warning@+3 {{call to undeclared library function 'va_start'}} + // expected-note@+2 {{include the header }} + // expected-error@+1 {{too few arguments to function call}} + va_start(); +diff --git a/clang/test/Sema/vla.c b/clang/test/Sema/vla.c +index c6d61aac4515..73e24e90beea 100644 +--- a/clang/test/Sema/vla.c ++++ b/clang/test/Sema/vla.c +@@ -72,7 +72,7 @@ int TransformBug(int a) { + // PR36157 + struct { + int a[ // expected-error {{variable length array in struct}} +- implicitly_declared() // expected-error {{call to undeclared function 'implicitly_declared'; ISO C99 and later do not support implicit function declarations}} ++ implicitly_declared() // expected-warning {{call to undeclared function 'implicitly_declared'; ISO C99 and later do not support implicit function declarations}} + ]; + }; + int (*use_implicitly_declared)(void) = implicitly_declared; // ok, was implicitly declared at file scope +diff --git a/clang/test/SemaObjC/builtin_objc_lib_functions.m b/clang/test/SemaObjC/builtin_objc_lib_functions.m +index 211c47246460..bda2f62678c0 100644 +--- a/clang/test/SemaObjC/builtin_objc_lib_functions.m ++++ b/clang/test/SemaObjC/builtin_objc_lib_functions.m +@@ -1,29 +1,29 @@ + // RUN: %clang_cc1 -x objective-c %s -fsyntax-only -verify + // rdar://8592641 +-Class f0(void) { return objc_getClass("a"); } // expected-error {{call to undeclared library function 'objc_getClass' with type 'id (const char *)'}} \ ++Class f0(void) { return objc_getClass("a"); } // expected-warning {{call to undeclared library function 'objc_getClass' with type 'id (const char *)'}} \ + // expected-note {{include the header or explicitly provide a declaration for 'objc_getClass'}} + + // rdar://8735023 +-Class f1(void) { return objc_getMetaClass("a"); } // expected-error {{call to undeclared library function 'objc_getMetaClass' with type 'id (const char *)'}} \ ++Class f1(void) { return objc_getMetaClass("a"); } // expected-warning {{call to undeclared library function 'objc_getMetaClass' with type 'id (const char *)'}} \ + // expected-note {{include the header or explicitly provide a declaration for 'objc_getMetaClass'}} + +-void f2(id val) { objc_enumerationMutation(val); } // expected-error {{call to undeclared library function 'objc_enumerationMutation' with type 'void (id)'}} \ ++void f2(id val) { objc_enumerationMutation(val); } // expected-warning {{call to undeclared library function 'objc_enumerationMutation' with type 'void (id)'}} \ + // expected-note {{include the header or explicitly provide a declaration for 'objc_enumerationMutation'}} + +-long double f3(id self, SEL op) { return objc_msgSend_fpret(self, op); } // expected-error {{call to undeclared library function 'objc_msgSend_fpret' with type 'long double (id, SEL, ...)'}} \ ++long double f3(id self, SEL op) { return objc_msgSend_fpret(self, op); } // expected-warning {{call to undeclared library function 'objc_msgSend_fpret' with type 'long double (id, SEL, ...)'}} \ + // expected-note {{include the header or explicitly provide a declaration for 'objc_msgSend_fpret'}} + + id f4(struct objc_super *super, SEL op) { // expected-warning {{declaration of 'struct objc_super' will not be visible outside of this function}} +- return objc_msgSendSuper(super, op); // expected-error {{call to undeclared library function 'objc_msgSendSuper' with type 'id (struct objc_super *, SEL, ...)'}} \ ++ return objc_msgSendSuper(super, op); // expected-warning {{call to undeclared library function 'objc_msgSendSuper' with type 'id (struct objc_super *, SEL, ...)'}} \ + // expected-note {{include the header or explicitly provide a declaration for 'objc_msgSendSuper'}} + } + + id f5(id val, id *dest) { +- return objc_assign_strongCast(val, dest); // expected-error {{call to undeclared library function 'objc_assign_strongCast' with type 'id (id, id *)'}} \ ++ return objc_assign_strongCast(val, dest); // expected-warning {{call to undeclared library function 'objc_assign_strongCast' with type 'id (id, id *)'}} \ + // expected-note {{include the header or explicitly provide a declaration for 'objc_assign_strongCast'}} + } + + int f6(Class exceptionClass, id exception) { +- return objc_exception_match(exceptionClass, exception); // expected-error {{call to undeclared library function 'objc_exception_match' with type 'int (id, id)'}} \ ++ return objc_exception_match(exceptionClass, exception); // expected-warning {{call to undeclared library function 'objc_exception_match' with type 'int (id, id)'}} \ + // expected-note {{include the header or explicitly provide a declaration for 'objc_exception_match'}} + } +diff --git a/clang/test/SemaObjC/builtin_objc_nslog.m b/clang/test/SemaObjC/builtin_objc_nslog.m +index 3c35a02d9b8a..ad7873fe1d47 100644 +--- a/clang/test/SemaObjC/builtin_objc_nslog.m ++++ b/clang/test/SemaObjC/builtin_objc_nslog.m +@@ -3,11 +3,11 @@ + #include + + void f1(id arg) { +- NSLog(@"%@", arg); // expected-error {{call to undeclared library function 'NSLog' with type 'void (id, ...)'}} \ ++ NSLog(@"%@", arg); // expected-warning {{call to undeclared library function 'NSLog' with type 'void (id, ...)'}} \ + // expected-note {{include the header or explicitly provide a declaration for 'NSLog'}} + } + + void f2(id str, va_list args) { +- NSLogv(@"%@", args); // expected-error {{call to undeclared library function 'NSLogv' with type }} \ ++ NSLogv(@"%@", args); // expected-warning {{call to undeclared library function 'NSLogv' with type }} \ + // expected-note {{include the header or explicitly provide a declaration for 'NSLogv'}} + } +diff --git a/clang/test/SemaObjC/ivar-lookup-resolution-builtin.m b/clang/test/SemaObjC/ivar-lookup-resolution-builtin.m +index 09d69aca9f93..bbb1b4f6a168 100644 +--- a/clang/test/SemaObjC/ivar-lookup-resolution-builtin.m ++++ b/clang/test/SemaObjC/ivar-lookup-resolution-builtin.m +@@ -28,7 +28,7 @@ + @implementation Test1 + - (int) InstMethod + { +- return index; // expected-error {{call to undeclared library function 'index'}} \ ++ return index; // expected-warning {{call to undeclared library function 'index'}} \ + // expected-note {{include the header or explicitly provide a declaration for 'index'}} \ + // expected-error {{incompatible pointer to integer conversion returning}} + } +diff --git a/clang/test/SemaObjC/protocols.m b/clang/test/SemaObjC/protocols.m +index ebb9b634b4b6..eb2734100769 100644 +--- a/clang/test/SemaObjC/protocols.m ++++ b/clang/test/SemaObjC/protocols.m +@@ -62,6 +62,6 @@ + @end + + @protocol P +-- (int)test:(int)param, ..; // expected-error{{type specifier missing}} \ ++- (int)test:(int)param, ..; // expected-warning{{type specifier missing}} \ + // expected-error{{expected ';' after method prototype}} + @end +diff --git a/clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl b/clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl +index 2ea6d3bc4862..9e2869af87b4 100644 +--- a/clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl ++++ b/clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl +@@ -10,7 +10,7 @@ void foo(read_only pipe int p); + // expected-error@-5 {{C++ for OpenCL version 2021 does not support the 'pipe' type qualifier}} + // expected-error@-6 {{access qualifier can only be used for pipe and image type}} + #else +-// expected-error@-8 {{type specifier missing, defaults to 'int'}} ++// expected-warning@-8 {{type specifier missing, defaults to 'int'}} + // expected-error@-9 {{access qualifier can only be used for pipe and image type}} + // expected-error@-10 {{expected ')'}} expected-note@-10 {{to match this '('}} + #endif +-- +2.37.2 + diff --git a/clang.spec b/clang.spec index e4382f1..56de2fd 100644 --- a/clang.spec +++ b/clang.spec @@ -41,7 +41,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -68,6 +68,10 @@ Patch5: 0010-PATCH-clang-Produce-DWARF4-by-default.patch # TODO: Can be dropped in LLVM 16: https://reviews.llvm.org/D133316 Patch6: 0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch +# Backport of https://reviews.llvm.org/D133800 to the 15.0.0 release. +# TODO: Drop once updating to 15.0.1 or newer. +Patch7: 0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch + %if %{without compat_build} # Patches for clang-tools-extra # See https://reviews.llvm.org/D120301 @@ -592,6 +596,9 @@ false %endif %changelog +* Wed Sep 14 2022 Nikita Popov - 15.0.0-2 +- Downgrade implicit int and implicit function declaration to warning only + * Tue Sep 06 2022 Nikita Popov - 15.0.0-1 - Update to LLVM 15.0.0 From 0b6571588e12d7e80e29f3aaf69fd8489627b408 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 14 Sep 2022 11:54:16 +0200 Subject: [PATCH 06/77] Add more test updates to patch --- ...ngrade-implicit-int-and-implicit-fun.patch | 63 ++++++++++++++++++- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch b/0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch index ffd6d3d..eecaf1d 100644 --- a/0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch +++ b/0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch @@ -1,4 +1,4 @@ -From 77c19531189aac51466617f97cdacdaebf56291a Mon Sep 17 00:00:00 2001 +From 87932fdfa171458562a5d9237c81fced205d9e99 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 14 Sep 2022 09:38:39 +0200 Subject: [PATCH] [Clang 15.0.1] Downgrade implicit int and implicit function @@ -12,6 +12,9 @@ See https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-i .../clang/Basic/DiagnosticSemaKinds.td | 8 ++--- clang/test/C/drs/dr0xx.c | 2 +- clang/test/C/drs/dr1xx.c | 2 +- + .../CodeGen/PowerPC/builtins-ppc-p8vector.c | 4 +-- + .../CodeGen/builtins-arm-msvc-compat-only.c | 4 +-- + clang/test/CodeGen/neon-crypto.c | 2 +- clang/test/Driver/cxx_for_opencl.clcpp | 2 +- clang/test/FixIt/fixit.c | 2 +- clang/test/Frontend/fixed_point_errors.c | 4 +-- @@ -56,7 +59,7 @@ See https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-i .../SemaObjC/ivar-lookup-resolution-builtin.m | 2 +- clang/test/SemaObjC/protocols.m | 2 +- clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl | 2 +- - 48 files changed, 124 insertions(+), 124 deletions(-) + 51 files changed, 129 insertions(+), 129 deletions(-) diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index cbf3f4b37b5f..a26846a3eac4 100644 @@ -156,6 +159,62 @@ index 70435b523765..1e430c5fb395 100644 c2xandup-error {{use of undeclared identifier 'also_undeclared'}} */ } +diff --git a/clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c b/clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c +index af3d5c7d066b..3c55e63d1bc8 100644 +--- a/clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c ++++ b/clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c +@@ -143,7 +143,7 @@ void test1() { + res_vui = vec_mergee(vui, vui); + // CHECK: @llvm.ppc.altivec.vperm + // CHECK-LE: @llvm.ppc.altivec.vperm +-// CHECK-PPC: error: call to undeclared function 'vec_mergee' ++// CHECK-PPC: warning: call to undeclared function 'vec_mergee' + + res_vbll = vec_mergee(vbll, vbll); + // CHECK: @llvm.ppc.altivec.vperm +@@ -177,7 +177,7 @@ void test1() { + res_vui = vec_mergeo(vui, vui); + // CHECK: @llvm.ppc.altivec.vperm + // CHECK-LE: @llvm.ppc.altivec.vperm +-// CHECK-PPC: error: call to undeclared function 'vec_mergeo' ++// CHECK-PPC: warning: call to undeclared function 'vec_mergeo' + + /* vec_cmpeq */ + res_vbll = vec_cmpeq(vbll, vbll); +diff --git a/clang/test/CodeGen/builtins-arm-msvc-compat-only.c b/clang/test/CodeGen/builtins-arm-msvc-compat-only.c +index 42cc9d70a142..c2b021b31174 100644 +--- a/clang/test/CodeGen/builtins-arm-msvc-compat-only.c ++++ b/clang/test/CodeGen/builtins-arm-msvc-compat-only.c +@@ -1,6 +1,6 @@ + // RUN: %clang_cc1 -triple thumbv7-windows -fms-extensions -emit-llvm -o - %s \ + // RUN: | FileCheck %s -check-prefix CHECK-MSVC +-// RUN: not %clang_cc1 -triple armv7-eabi -emit-llvm %s -o /dev/null 2>&1 \ ++// RUN: %clang_cc1 -triple armv7-eabi -emit-llvm %s -o /dev/null 2>&1 \ + // RUN: | FileCheck %s -check-prefix CHECK-EABI + // REQUIRES: arm-registered-target + +@@ -9,7 +9,7 @@ void emit() { + } + + // CHECK-MSVC: call void asm sideeffect ".inst.n 0xDEFE", ""() +-// CHECK-EABI: error: call to undeclared function '__emit' ++// CHECK-EABI: warning: call to undeclared function '__emit' + + void emit_truncated() { + __emit(0x11110000); // movs r0, r0 +diff --git a/clang/test/CodeGen/neon-crypto.c b/clang/test/CodeGen/neon-crypto.c +index 916886574416..1b29b1a53096 100644 +--- a/clang/test/CodeGen/neon-crypto.c ++++ b/clang/test/CodeGen/neon-crypto.c +@@ -14,7 +14,7 @@ + + uint8x16_t test_vaeseq_u8(uint8x16_t data, uint8x16_t key) { + // CHECK-LABEL: @test_vaeseq_u8 +- // CHECK-NO-CRYPTO: error: call to undeclared function 'vaeseq_u8' ++ // CHECK-NO-CRYPTO: warning: call to undeclared function 'vaeseq_u8' + return vaeseq_u8(data, key); + // CHECK: call <16 x i8> @llvm.{{arm.neon|aarch64.crypto}}.aese(<16 x i8> %data, <16 x i8> %key) + } diff --git a/clang/test/Driver/cxx_for_opencl.clcpp b/clang/test/Driver/cxx_for_opencl.clcpp index fc2fc621791d..e3e89c53b888 100644 --- a/clang/test/Driver/cxx_for_opencl.clcpp From 431a66ade20a4fb8be387c65510371a918a88ca5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 14 Sep 2022 12:35:23 +0200 Subject: [PATCH 07/77] Add more test updates Some more changes missed in the previous commit. --- ...ngrade-implicit-int-and-implicit-fun.patch | 107 +++++++++++++++++- 1 file changed, 103 insertions(+), 4 deletions(-) diff --git a/0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch b/0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch index eecaf1d..fd5fd1f 100644 --- a/0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch +++ b/0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch @@ -1,4 +1,4 @@ -From 87932fdfa171458562a5d9237c81fced205d9e99 Mon Sep 17 00:00:00 2001 +From 9a95c7e534a4f0e7e992ea62cf3efc75fbdc04ae Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 14 Sep 2022 09:38:39 +0200 Subject: [PATCH] [Clang 15.0.1] Downgrade implicit int and implicit function @@ -12,7 +12,7 @@ See https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-i .../clang/Basic/DiagnosticSemaKinds.td | 8 ++--- clang/test/C/drs/dr0xx.c | 2 +- clang/test/C/drs/dr1xx.c | 2 +- - .../CodeGen/PowerPC/builtins-ppc-p8vector.c | 4 +-- + .../CodeGen/PowerPC/builtins-ppc-p8vector.c | 28 +++++++-------- .../CodeGen/builtins-arm-msvc-compat-only.c | 4 +-- clang/test/CodeGen/neon-crypto.c | 2 +- clang/test/Driver/cxx_for_opencl.clcpp | 2 +- @@ -59,7 +59,7 @@ See https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-i .../SemaObjC/ivar-lookup-resolution-builtin.m | 2 +- clang/test/SemaObjC/protocols.m | 2 +- clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl | 2 +- - 51 files changed, 129 insertions(+), 129 deletions(-) + 51 files changed, 141 insertions(+), 141 deletions(-) diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index cbf3f4b37b5f..a26846a3eac4 100644 @@ -160,7 +160,7 @@ index 70435b523765..1e430c5fb395 100644 */ } diff --git a/clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c b/clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c -index af3d5c7d066b..3c55e63d1bc8 100644 +index af3d5c7d066b..54d2c70c0aa5 100644 --- a/clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c +++ b/clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c @@ -143,7 +143,7 @@ void test1() { @@ -181,6 +181,105 @@ index af3d5c7d066b..3c55e63d1bc8 100644 /* vec_cmpeq */ res_vbll = vec_cmpeq(vbll, vbll); +@@ -403,7 +403,7 @@ void test1() { + res_vsc = vec_cntlz(vsc); + // CHECK: call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %{{.+}}, i1 false) + // CHECK-LE: call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %{{.+}}, i1 false) +-// CHECK-PPC: error: call to undeclared function 'vec_cntlz' ++// CHECK-PPC: warning: call to undeclared function 'vec_cntlz' + + res_vuc = vec_cntlz(vuc); + // CHECK: call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %{{.+}}, i1 false) +@@ -754,19 +754,19 @@ void test1() { + res_vsi = vec_vpksdss(vsll, vsll); + // CHECK: llvm.ppc.altivec.vpksdss + // CHECK-LE: llvm.ppc.altivec.vpksdss +-// CHECK-PPC: error: call to undeclared function 'vec_vpksdss' ++// CHECK-PPC: warning: call to undeclared function 'vec_vpksdss' + + /* vec_vpksdus */ + res_vui = vec_vpksdus(vsll, vsll); + // CHECK: llvm.ppc.altivec.vpksdus + // CHECK-LE: llvm.ppc.altivec.vpksdus +-// CHECK-PPC: error: call to undeclared function 'vec_vpksdus' ++// CHECK-PPC: warning: call to undeclared function 'vec_vpksdus' + + /* vec_vpkudum */ + res_vsi = vec_vpkudum(vsll, vsll); + // CHECK: vperm + // CHECK-LE: vperm +-// CHECK-PPC: error: call to undeclared function 'vec_vpkudum' ++// CHECK-PPC: warning: call to undeclared function 'vec_vpkudum' + + res_vui = vec_vpkudum(vull, vull); + // CHECK: vperm +@@ -775,13 +775,13 @@ void test1() { + res_vui = vec_vpkudus(vull, vull); + // CHECK: llvm.ppc.altivec.vpkudus + // CHECK-LE: llvm.ppc.altivec.vpkudus +-// CHECK-PPC: error: call to undeclared function 'vec_vpkudus' ++// CHECK-PPC: warning: call to undeclared function 'vec_vpkudus' + + /* vec_vupkhsw */ + res_vsll = vec_vupkhsw(vsi); + // CHECK: llvm.ppc.altivec.vupkhsw + // CHECK-LE: llvm.ppc.altivec.vupklsw +-// CHECK-PPC: error: call to undeclared function 'vec_vupkhsw' ++// CHECK-PPC: warning: call to undeclared function 'vec_vupkhsw' + + res_vbll = vec_vupkhsw(vbi); + // CHECK: llvm.ppc.altivec.vupkhsw +@@ -791,7 +791,7 @@ void test1() { + res_vsll = vec_vupklsw(vsi); + // CHECK: llvm.ppc.altivec.vupklsw + // CHECK-LE: llvm.ppc.altivec.vupkhsw +-// CHECK-PPC: error: call to undeclared function 'vec_vupklsw' ++// CHECK-PPC: warning: call to undeclared function 'vec_vupklsw' + + res_vbll = vec_vupklsw(vbi); + // CHECK: llvm.ppc.altivec.vupklsw +@@ -845,7 +845,7 @@ void test1() { + // CHECK: xor <16 x i8> [[T1]], + // CHECK-LE: [[T1:%.+]] = and <16 x i8> + // CHECK-LE: xor <16 x i8> [[T1]], +-// CHECK-PPC: error: call to undeclared function 'vec_nand' ++// CHECK-PPC: warning: call to undeclared function 'vec_nand' + + res_vbc = vec_nand(vbc, vbc); + // CHECK: [[T1:%.+]] = and <16 x i8> +@@ -937,7 +937,7 @@ void test1() { + // CHECK: or <16 x i8> {{%.+}}, [[T1]] + // CHECK-LE: [[T1:%.+]] = xor <16 x i8> {{%.+}}, + // CHECK-LE: or <16 x i8> {{%.+}}, [[T1]] +-// CHECK-PPC: error: call to undeclared function 'vec_orc' ++// CHECK-PPC: warning: call to undeclared function 'vec_orc' + + res_vsc = vec_orc(vsc, vbc); + // CHECK: [[T1:%.+]] = xor <16 x i8> {{%.+}}, +@@ -1166,7 +1166,7 @@ void test1() { + res_vsll = vec_vbpermq(vuc, vuc); + // CHECK: llvm.ppc.altivec.vbpermq + // CHECK-LE: llvm.ppc.altivec.vbpermq +-// CHECK-PPC: error: call to undeclared function 'vec_vbpermq' ++// CHECK-PPC: warning: call to undeclared function 'vec_vbpermq' + + /* vec_vgbbd */ + res_vsc = vec_vgbbd(vsc); +@@ -1176,12 +1176,12 @@ void test1() { + res_vuc = vec_vgbbd(vuc); + // CHECK: llvm.ppc.altivec.vgbbd + // CHECK-LE: llvm.ppc.altivec.vgbbd +-// CHECK-PPC: error: call to undeclared function 'vec_vgbbd' ++// CHECK-PPC: warning: call to undeclared function 'vec_vgbbd' + + res_vuc = vec_gb(vuc); + // CHECK: llvm.ppc.altivec.vgbbd + // CHECK-LE: llvm.ppc.altivec.vgbbd +-// CHECK-PPC: error: call to undeclared function 'vec_gb' ++// CHECK-PPC: warning: call to undeclared function 'vec_gb' + + res_vsll = vec_gbb(vsll); + // CHECK: llvm.ppc.altivec.vgbbd diff --git a/clang/test/CodeGen/builtins-arm-msvc-compat-only.c b/clang/test/CodeGen/builtins-arm-msvc-compat-only.c index 42cc9d70a142..c2b021b31174 100644 --- a/clang/test/CodeGen/builtins-arm-msvc-compat-only.c From f15eec4d81a86c5db129b38c59eee10d2b9fcc4a Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Mon, 12 Sep 2022 11:53:59 +0200 Subject: [PATCH 08/77] Migrate tests to tests/clang repo --- tests/README.md | 6 ++ tests/build-gating-libomp.fmf | 37 ------- tests/build-gating-pocl.fmf | 2 + tests/build-gating.fmf | 6 +- tests/clang-format-diff/main.fmf | 15 --- tests/clang-format-diff/test.sh | 5 - tests/fedora-flags/hello.c | 5 - tests/fedora-flags/hello.cpp | 5 - tests/fedora-flags/main.c | 6 -- tests/fedora-flags/main.cpp | 6 -- tests/fedora-flags/main.fmf | 30 ------ tests/fedora-flags/test.sh | 20 ---- tests/libomp/main.fmf | 36 ------- tests/libomp/openmp-compile-link-test.c | 8 -- tests/libomp/test.sh | 7 -- tests/llvm-test-suite/main.fmf | 18 ---- tests/llvm-test-suite/test.sh | 7 -- tests/openmp-rpm/main.fmf | 30 ------ tests/openmp-rpm/runtest.sh | 6 -- tests/openmp-rpm/test.c | 7 -- tests/openmp-rpm/test.spec | 36 ------- tests/pocl/main.fmf | 24 ----- tests/pocl/test.sh | 7 -- tests/ppc64le-long-double/main.fmf | 33 ------- tests/ppc64le-long-double/runtest-fedora.sh | 14 --- tests/ppc64le-long-double/runtest.sh | 9 -- tests/rhbz_1647130/main.fmf | 19 ---- tests/rhbz_1647130/test.sh | 8 -- tests/rhbz_1657544/from_chars.cpp | 15 --- tests/rhbz_1657544/main.fmf | 16 --- tests/rhbz_1657544/test.sh | 4 - tests/rhbz_482491/main.fmf | 17 ---- tests/rhbz_482491/test.sh | 3 - tests/toolchains/hello.c | 5 - tests/toolchains/hello.cpp | 5 - tests/toolchains/main.fmf | 55 ----------- tests/toolchains/test.sh | 102 -------------------- tests/use-dwarf4-by-default/main.fmf | 20 ---- tests/use-dwarf4-by-default/test.sh | 7 -- 39 files changed, 12 insertions(+), 649 deletions(-) create mode 100644 tests/README.md delete mode 100644 tests/build-gating-libomp.fmf delete mode 100644 tests/clang-format-diff/main.fmf delete mode 100755 tests/clang-format-diff/test.sh delete mode 100644 tests/fedora-flags/hello.c delete mode 100644 tests/fedora-flags/hello.cpp delete mode 100644 tests/fedora-flags/main.c delete mode 100644 tests/fedora-flags/main.cpp delete mode 100644 tests/fedora-flags/main.fmf delete mode 100755 tests/fedora-flags/test.sh delete mode 100644 tests/libomp/main.fmf delete mode 100644 tests/libomp/openmp-compile-link-test.c delete mode 100755 tests/libomp/test.sh delete mode 100644 tests/llvm-test-suite/main.fmf delete mode 100755 tests/llvm-test-suite/test.sh delete mode 100644 tests/openmp-rpm/main.fmf delete mode 100755 tests/openmp-rpm/runtest.sh delete mode 100644 tests/openmp-rpm/test.c delete mode 100644 tests/openmp-rpm/test.spec delete mode 100644 tests/pocl/main.fmf delete mode 100755 tests/pocl/test.sh delete mode 100644 tests/ppc64le-long-double/main.fmf delete mode 100755 tests/ppc64le-long-double/runtest-fedora.sh delete mode 100755 tests/ppc64le-long-double/runtest.sh delete mode 100644 tests/rhbz_1647130/main.fmf delete mode 100755 tests/rhbz_1647130/test.sh delete mode 100644 tests/rhbz_1657544/from_chars.cpp delete mode 100644 tests/rhbz_1657544/main.fmf delete mode 100755 tests/rhbz_1657544/test.sh delete mode 100644 tests/rhbz_482491/main.fmf delete mode 100755 tests/rhbz_482491/test.sh delete mode 100644 tests/toolchains/hello.c delete mode 100644 tests/toolchains/hello.cpp delete mode 100644 tests/toolchains/main.fmf delete mode 100755 tests/toolchains/test.sh delete mode 100644 tests/use-dwarf4-by-default/main.fmf delete mode 100755 tests/use-dwarf4-by-default/test.sh diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..0f96d35 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,6 @@ +# Gating testplans for Clang + +The tests for clang are in a separate repo: https://src.fedoraproject.org/tests/clang +This directory should contain only fmf plans (such as build-gating.fmf) which import +the tests from the tests repo. This can be done using the "url" parameter of the +plan's "discover" step. Reference: https://tmt.readthedocs.io/en/stable/spec/plans.html#fmf \ No newline at end of file diff --git a/tests/build-gating-libomp.fmf b/tests/build-gating-libomp.fmf deleted file mode 100644 index 1ddd29e..0000000 --- a/tests/build-gating-libomp.fmf +++ /dev/null @@ -1,37 +0,0 @@ -summary: libomp clang tests for build/PR gating -adjust: - - because: "Plan to be ran when either executed locally, or executed by CI system to gate a build or PR." - when: >- - trigger is defined - and trigger != commit - and trigger != build - enabled: false - - - because: "When testing SCL-ized LLVM, the collection must be enabled first" - environment+: - WITH_SCL: "scl enable llvm-toolset-13.0" - when: "collection == llvm-toolset-13.0" - - because: "When testing SCL-ized LLVM, the collection must be enabled first" - environment+: - WITH_SCL: "scl enable llvm-toolset-14.0" - when: "collection == llvm-toolset-14.0" - - - because: "libomp not supported in s390x" - when: arch == s390x - enabled: false - -discover: - how: fmf - test: libomp -execute: - how: tmt -prepare: - # We want to make sure libomp is not already present on the system to ensure - # that clang pulls in the correct libomp dependencies when it is installed. - - name: Drop libomp - how: shell - script: | - yum erase -y libomp libomp-devel clang clang-libs -provision: - hardware: - memory: ">= 4 GiB" diff --git a/tests/build-gating-pocl.fmf b/tests/build-gating-pocl.fmf index 4b74ced..6fda183 100644 --- a/tests/build-gating-pocl.fmf +++ b/tests/build-gating-pocl.fmf @@ -16,6 +16,8 @@ adjust: discover: how: fmf test: pocl + url: https://src.fedoraproject.org/tests/clang.git + ref: main execute: how: tmt prepare: diff --git a/tests/build-gating.fmf b/tests/build-gating.fmf index b0b49be..ae4fdb3 100644 --- a/tests/build-gating.fmf +++ b/tests/build-gating.fmf @@ -50,11 +50,13 @@ adjust: discover: - name: clang-tests how: fmf + url: https://src.fedoraproject.org/tests/clang.git + ref: main filter: "tag:-not-in-default" - name: upstream-llvm-integration-testsuite how: fmf - url: https://src.fedoraproject.org/rpms/llvm.git - ref: rawhide + url: https://src.fedoraproject.org/tests/llvm.git + ref: main test: integration-test-suite execute: how: tmt diff --git a/tests/clang-format-diff/main.fmf b/tests/clang-format-diff/main.fmf deleted file mode 100644 index 06ed176..0000000 --- a/tests/clang-format-diff/main.fmf +++ /dev/null @@ -1,15 +0,0 @@ -summary: clang-format-diff -test: "$WITH_SCL ./test.sh" -adjust: - # Common requirements when LLVM is not SCL-ized - - require: - - clang-tools-extra - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require: - - llvm-toolset-13.0-clang-tools-extra - when: "collection == llvm-toolset-13.0" - - require: - - llvm-toolset-14.0-clang-tools-extra - when: "collection == llvm-toolset-14.0" diff --git a/tests/clang-format-diff/test.sh b/tests/clang-format-diff/test.sh deleted file mode 100755 index d6fcb47..0000000 --- a/tests/clang-format-diff/test.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -eux - -# Check that clang-format-diff is in PATH. -# rhbz#1939018 -clang-format-diff -h diff --git a/tests/fedora-flags/hello.c b/tests/fedora-flags/hello.c deleted file mode 100644 index 51b259b..0000000 --- a/tests/fedora-flags/hello.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -void hello() { - printf("Hello World\n"); -} diff --git a/tests/fedora-flags/hello.cpp b/tests/fedora-flags/hello.cpp deleted file mode 100644 index 400612b..0000000 --- a/tests/fedora-flags/hello.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include - -void hello() { - std::cout << "Hello World\n"; -} diff --git a/tests/fedora-flags/main.c b/tests/fedora-flags/main.c deleted file mode 100644 index 1a3455d..0000000 --- a/tests/fedora-flags/main.c +++ /dev/null @@ -1,6 +0,0 @@ -void hello(); - -int main(int argc, char **argv) { - hello(); - return 0; -} diff --git a/tests/fedora-flags/main.cpp b/tests/fedora-flags/main.cpp deleted file mode 100644 index 1a3455d..0000000 --- a/tests/fedora-flags/main.cpp +++ /dev/null @@ -1,6 +0,0 @@ -void hello(); - -int main(int argc, char **argv) { - hello(); - return 0; -} diff --git a/tests/fedora-flags/main.fmf b/tests/fedora-flags/main.fmf deleted file mode 100644 index f2728ba..0000000 --- a/tests/fedora-flags/main.fmf +++ /dev/null @@ -1,30 +0,0 @@ -summary: fedora-flags -test: "$WITH_SCL ./test.sh" -require: - - redhat-rpm-config -adjust: - - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - when: "collection == llvm-toolset-14.0" - - - because: s390x does not have epel repo which is required to provide rpm macros - enabled: false - when: >- - distro == rhel-7 - and arch == s390x - - # Note: this needs epel-release repo to be available - - because: "To enable rpm macros not available by default (e.g. build_cflags), epel-rpm-macros is needed" - require+: - - epel-rpm-macros - when: distro == rhel-7 diff --git a/tests/fedora-flags/test.sh b/tests/fedora-flags/test.sh deleted file mode 100755 index 75f674f..0000000 --- a/tests/fedora-flags/test.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -eux - -set pipefail - -cflags=`rpm -D '%toolchain clang' -E %{build_cflags}` -cxxflags=`rpm -D '%toolchain clang' -E %{build_cxxflags}` -ldflags=`rpm -D '%toolchain clang' -E %{build_ldflags}` - - -# Test a c program -clang $cflags -c hello.c -o hello.o -clang $cflags -c main.c -o main.o -clang $ldflags -o hello main.o hello.o -./hello | grep "Hello World" - -# Test a cxx program -clang++ $cxxflags -c hello.cpp -o hello-cpp.o -clang++ $cxxflags -c main.cpp -o main-cpp.o -clang++ $ldflags -o hello-cpp main-cpp.o hello-cpp.o -./hello-cpp | grep "Hello World" diff --git a/tests/libomp/main.fmf b/tests/libomp/main.fmf deleted file mode 100644 index 960bccb..0000000 --- a/tests/libomp/main.fmf +++ /dev/null @@ -1,36 +0,0 @@ -# TODO: get fitting summary - what's the purpose of this test? Comment from the STI version says: -# -# We want to make sure libomp is not already present on the system to ensure -# that clang pulls in the correct libomp dependencies when it is installed. -summary: libomp tests -# This test requires a special preparation, see `/tests/tests-libomp` plan. As such, -# it shouldn't be part of the `/tests/default` plan. -tag: - - not-in-default -test: "$WITH_SCL ./test.sh" -adjust: - - because: "libomp is not supported in s390x" - when: arch == s390x - enabled: false - - # Common requirements when LLVM is not SCL-ized - - require: - - clang - - clang-libs - - libomp - - libomp-devel - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require: - - llvm-toolset-13.0-clang - - llvm-toolset-13.0-clang-libs - - llvm-toolset-13.0-libomp - - llvm-toolset-13.0-libomp-devel - when: "collection == llvm-toolset-13.0" - - require: - - llvm-toolset-14.0-clang - - llvm-toolset-14.0-clang-libs - - llvm-toolset-14.0-libomp - - llvm-toolset-14.0-libomp-devel - when: "collection == llvm-toolset-14.0" \ No newline at end of file diff --git a/tests/libomp/openmp-compile-link-test.c b/tests/libomp/openmp-compile-link-test.c deleted file mode 100644 index a2b6004..0000000 --- a/tests/libomp/openmp-compile-link-test.c +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include - -int main(int argc, char **argv) { - int nthreads = omp_get_num_threads(); - printf("Num Threads: %d\n", nthreads); - return 0; -} diff --git a/tests/libomp/test.sh b/tests/libomp/test.sh deleted file mode 100755 index f07dbbc..0000000 --- a/tests/libomp/test.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -set -exo pipefail - -clang -fopenmp openmp-compile-link-test.c - -./a.out | grep "Num Threads: 1" diff --git a/tests/llvm-test-suite/main.fmf b/tests/llvm-test-suite/main.fmf deleted file mode 100644 index 7d61dfb..0000000 --- a/tests/llvm-test-suite/main.fmf +++ /dev/null @@ -1,18 +0,0 @@ -# TODO: once llvm-test-suite is converted to TMT, we can just link the test from plan. -summary: Run tests from llvm-test-suite package - -adjust: - - because: "llvm-test-suite is available for Fedora, not RHEL/CentOS" - when: >- - distro == rhel - or distro == centos - enabled: false - -test: "$WITH_SCL ./test.sh" - -require: - - git - - clang - - ninja-build - - llvm-test-suite -duration: 1h diff --git a/tests/llvm-test-suite/test.sh b/tests/llvm-test-suite/test.sh deleted file mode 100755 index 85418bc..0000000 --- a/tests/llvm-test-suite/test.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -eux - -# TODO: tmt does not support a remote git repo as a requirement, one has to clone it "manually". - -git clone --depth 1 https://src.fedoraproject.org/rpms/llvm-test-suite.git llvm-test-suite -cd llvm-test-suite/tests/test-suite -./runtest.sh diff --git a/tests/openmp-rpm/main.fmf b/tests/openmp-rpm/main.fmf deleted file mode 100644 index 2344193..0000000 --- a/tests/openmp-rpm/main.fmf +++ /dev/null @@ -1,30 +0,0 @@ -summary: Test build a simple RPM package to ensure that -fopenmp works -test: "$WITH_SCL ./runtest.sh" -require: - - rpm-build -adjust: - - because: "libomp not supported in s390x" - when: arch == s390x - enabled: false - - - because: "Use yum in RHEL < 8" - require+: - - yum-utils - environment+: - BUILDDEP_CMD: "yum-builddep" - when: distro < rhel-8 - - - because: "Use dnf in RHEL >= 8, Fedora and CentOS" - require+: - - dnf-plugins-core - environment+: - BUILDDEP_CMD: "dnf builddep" - when: distro >= rhel-8 or distro != rhel - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-build - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-build - when: "collection == llvm-toolset-14.0" \ No newline at end of file diff --git a/tests/openmp-rpm/runtest.sh b/tests/openmp-rpm/runtest.sh deleted file mode 100755 index 37647fe..0000000 --- a/tests/openmp-rpm/runtest.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -set -ex - -${BUILDDEP_CMD} -y test.spec -rpmbuild --define '_sourcedir .' --define '_builddir .' -bb test.spec diff --git a/tests/openmp-rpm/test.c b/tests/openmp-rpm/test.c deleted file mode 100644 index b20d164..0000000 --- a/tests/openmp-rpm/test.c +++ /dev/null @@ -1,7 +0,0 @@ -int main(int argc, char **argv) { - int res = 1; -#pragma omp parallel -#pragma omp single - res = 0; - return res; -} diff --git a/tests/openmp-rpm/test.spec b/tests/openmp-rpm/test.spec deleted file mode 100644 index e317a6a..0000000 --- a/tests/openmp-rpm/test.spec +++ /dev/null @@ -1,36 +0,0 @@ -%global toolchain clang -%{?scl:%global scl_prefix %{scl}-} - -Name: test -Version: 1 -Release: 1 -Summary: Test package for checking that RPM packages using -fopenmp build correctly -License: MIT - -BuildRequires: %{?scl_prefix}clang -BuildRequires: %{?scl_prefix}libomp - -Source0: test.c - -%description -clang was adding RUNPATH to binaries that use OpenMP, and since RUNPATH -is prohibited in Fedora builds, this was causing packages using clang -and OpenMP to fail to build. - -References: -https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild -https://github.com/llvm/llvm-project/commit/9b9d08111b618d74574ba03e5cc3d752ecc56f55 - -%build -clang ${CFLAGS} -c %{SOURCE0} -o test.o -clang ${LDFLAGS} -fopenmp test.o -o main - -%check -./main - -%install -install -d %{buildroot}%{_bindir} -install main %{buildroot}%{_bindir} - -%files -%{_bindir}/main diff --git a/tests/pocl/main.fmf b/tests/pocl/main.fmf deleted file mode 100644 index 1143416..0000000 --- a/tests/pocl/main.fmf +++ /dev/null @@ -1,24 +0,0 @@ -# TODO REVIEW: get fitting summary - what's the purpose of this test? Comment from the STI version says: -# -# This is separate from tests.yml because we want to run the tests without -# clang installed. -summary: pocl - -adjust: - - because: "PoCL is shipped with Fedora, not RHEL/CentOS" - when: >- - distro == rhel - or distro == centos - enabled: false - -# This test requires a special preparation, see `/tests/tests-pocl` plan. As such, -# it shouldn't be part of the `/tests/default` plan. -tag: - - not-in-default -# rhbz#1582884 -test: "$WITH_SCL ./test.sh" -require: - - git - - ocl-icd-devel - - pocl - - gcc diff --git a/tests/pocl/test.sh b/tests/pocl/test.sh deleted file mode 100755 index fd9f92b..0000000 --- a/tests/pocl/test.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -eux - -# TODO: tmt does not support a remote git repo as a requirement, one has to clone it "manually". - -git clone --depth 1 https://src.fedoraproject.org/rpms/pocl.git pocl -cd pocl/tests/simple-opencl-no-clang -./runtest.sh diff --git a/tests/ppc64le-long-double/main.fmf b/tests/ppc64le-long-double/main.fmf deleted file mode 100644 index 133c75a..0000000 --- a/tests/ppc64le-long-double/main.fmf +++ /dev/null @@ -1,33 +0,0 @@ -summary: Test that gcc and clang use the same long double format on ppc64le -test: $WITH_SCL ./runtest.sh -duration: 1h -# see https://bugzilla.redhat.com/show_bug.cgi?id=2115752 -enabled: false -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - when: "collection is not defined" - - - because: "Fedora CI runs in x86_64 only, emulate with qemu and mock" - require+: - - qemu-user-static - - mock - test: ./runtest-fedora.sh - when: distro == fedora and arch == x86_64 - continue: false - - - enabled: false - when: arch != ppc64le - - - require+: - - gcc - when: distro != fedora - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - when: "collection == llvm-toolset-14.0" diff --git a/tests/ppc64le-long-double/runtest-fedora.sh b/tests/ppc64le-long-double/runtest-fedora.sh deleted file mode 100755 index 25dbb9c..0000000 --- a/tests/ppc64le-long-double/runtest-fedora.sh +++ /dev/null @@ -1,14 +0,0 @@ -set -e - -fedora_release=`rpm -E %{fedora}` -mock_root=fedora-$fedora_release-ppc64le -triple=ppc64le-redhat-linux - -mock -r $mock_root --isolation=simple --install gcc -gcc_output=$(mock -r $mock_root --isolation=simple -q --shell gcc -E -dM -x c /dev/null | grep -e __LONG_DOUBLE_IEEE128__ -e __LONG_DOUBLE_IBM128__) -clang_output=$(clang -target $triple -E -dM -x c /dev/null | grep -e __LONG_DOUBLE_IEEE128__ -e __LONG_DOUBLE_IBM128__) - -echo "gcc: $gcc_output" -echo "clang: $clang_output" - -test "$gcc_output" = "$clang_output" diff --git a/tests/ppc64le-long-double/runtest.sh b/tests/ppc64le-long-double/runtest.sh deleted file mode 100755 index 8061bd7..0000000 --- a/tests/ppc64le-long-double/runtest.sh +++ /dev/null @@ -1,9 +0,0 @@ -set -e - -gcc_output=$(gcc -E -dM -x c /dev/null | grep -e __LONG_DOUBLE_IEEE128__ -e __LONG_DOUBLE_IBM128__) -clang_output=$(clang -E -dM -x c /dev/null | grep -e __LONG_DOUBLE_IEEE128__ -e __LONG_DOUBLE_IBM128__) - -echo "gcc: $gcc_output" -echo "clang: $clang_output" - -test "$gcc_output" = "$clang_output" diff --git a/tests/rhbz_1647130/main.fmf b/tests/rhbz_1647130/main.fmf deleted file mode 100644 index 3445a1b..0000000 --- a/tests/rhbz_1647130/main.fmf +++ /dev/null @@ -1,19 +0,0 @@ -summary: RHBZ1647130 -test: "$WITH_SCL ./test.sh" -require: [] -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - - clang-analyzer - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - - llvm-toolset-13.0-clang-analyzer - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - - llvm-toolset-14.0-clang-analyzer - when: "collection == llvm-toolset-14.0" \ No newline at end of file diff --git a/tests/rhbz_1647130/test.sh b/tests/rhbz_1647130/test.sh deleted file mode 100755 index 7fb47ba..0000000 --- a/tests/rhbz_1647130/test.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -eux - -tmp_cpp=`mktemp -t XXXXX.cpp` -tmp_dir=`mktemp -d` -echo 'int main(int argc, char*argv[]) { while(argc--) new int(); return 0; }' > $tmp_cpp -scan-build -o $tmp_dir clang++ -c $tmp_cpp -o /dev/null -(scan-view --no-browser $tmp_dir/* & WPID=$! && sleep 10s && kill $WPID) - diff --git a/tests/rhbz_1657544/from_chars.cpp b/tests/rhbz_1657544/from_chars.cpp deleted file mode 100644 index b76be22..0000000 --- a/tests/rhbz_1657544/from_chars.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include -#include - -using namespace std; - -int main(int argc, char **argv) -{ - size_t r=0; - const char *begin = argv[1]; - const char *end = begin + strlen(begin); - from_chars(begin, end, r); - cout << r << '\n'; - return 0; -} diff --git a/tests/rhbz_1657544/main.fmf b/tests/rhbz_1657544/main.fmf deleted file mode 100644 index a775439..0000000 --- a/tests/rhbz_1657544/main.fmf +++ /dev/null @@ -1,16 +0,0 @@ -summary: RHBZ1657544 -test: "$WITH_SCL ./test.sh" -require: [] -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - when: "collection == llvm-toolset-14.0" diff --git a/tests/rhbz_1657544/test.sh b/tests/rhbz_1657544/test.sh deleted file mode 100755 index 58c088f..0000000 --- a/tests/rhbz_1657544/test.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -eux - -clang++ from_chars.cpp -./a.out 100 | grep 100 diff --git a/tests/rhbz_482491/main.fmf b/tests/rhbz_482491/main.fmf deleted file mode 100644 index f0929e9..0000000 --- a/tests/rhbz_482491/main.fmf +++ /dev/null @@ -1,17 +0,0 @@ -summary: rhbz-482491 -test: "$WITH_SCL ./test.sh" -require: - - libgcc -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - when: "collection == llvm-toolset-14.0" \ No newline at end of file diff --git a/tests/rhbz_482491/test.sh b/tests/rhbz_482491/test.sh deleted file mode 100755 index 2360238..0000000 --- a/tests/rhbz_482491/test.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -eux - -find /usr -name 'libgcc_s.so*' && echo "int main(){}" | clang -v -x c - diff --git a/tests/toolchains/hello.c b/tests/toolchains/hello.c deleted file mode 100644 index f5c80a9..0000000 --- a/tests/toolchains/hello.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -int main(int argc, char **argv) { - printf("Hello World\n"); - return 0; -} diff --git a/tests/toolchains/hello.cpp b/tests/toolchains/hello.cpp deleted file mode 100644 index bda4087..0000000 --- a/tests/toolchains/hello.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include -int main(int argc, char **argv) { - std::cout << "Hello World\n"; - return 0; -} diff --git a/tests/toolchains/main.fmf b/tests/toolchains/main.fmf deleted file mode 100644 index 9b8975b..0000000 --- a/tests/toolchains/main.fmf +++ /dev/null @@ -1,55 +0,0 @@ -# TODO REVIEW: better summary -summary: "" -test: "$WITH_SCL ./test.sh" -require: - - glibc-static - - yum-utils - # This require EPEL/CRB to be enabled on RHEL - - libstdc++-static -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - - compiler-rt - - lld - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - - llvm-toolset-13.0-compiler-rt - - llvm-toolset-13.0-lld - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - - llvm-toolset-14.0-compiler-rt - - llvm-toolset-14.0-lld - when: "collection == llvm-toolset-14.0" - - # lld not supported in s390x or ppc64. If any lld package was added to - # requirements, remove it. - - require-: - - lld - - llvm-toolset-13.0-lld - - llvm-toolset-14.0-lld - when: arch == s390x or arch == ppc64 - - - environment+: - CXXLIBS: "libc++" - require+: - - libcxx-devel - - libcxx-static - when: "distro == fedora" - because: testing against libcxx package in Fedora - - - environment+: - CXXLIBS: "libstdc++" - require+: - - libstdc++ - when: >- - distro == rhel - or distro == centos - because: testing against libstdc++ package in RHEL as libcxx is not shipped with RHEL - -# TODO REVIEW: are these all requirements? test.sh seems to run quite a lot of stuff, looks like we -# need more packages from LLVM family. diff --git a/tests/toolchains/test.sh b/tests/toolchains/test.sh deleted file mode 100755 index 65594e6..0000000 --- a/tests/toolchains/test.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -eux - -set pipefail - -if [ -z "${CXXLIBS:-}" ]; then - echo "CXXLIBS variable is a required input but it's not specified!" - echo "Test metadata should have picked a proper value, depending on distro." - exit 1 -fi - -status=0 - -test_toolchain() { - - toolchain=$@ - args="" - - while [ $# -gt 0 ]; do - case $1 in - clang) - compiler=$1 - src=hello.c - ;; - clang++) - compiler=$1 - src=hello.cpp - ;; - compiler-rt) - args="$args -rtlib=$1" - ;; - libc++) - args="$args -stdlib=$1" - ;; - libstdc++) - args="$args -stdlib=$1" - ;; - lld) - args="$args -fuse-ld=$1" - ;; - *) - args="$args $1" - ;; - esac - shift - done - - cmd="$compiler $args $src" - rm -f a.out - echo "* $toolchain" - echo " command: $cmd" - if $cmd && ./a.out | grep -q 'Hello World'; then - echo " PASS" - else - echo " FAIL" - status=1 - fi -} - -clang --version -# Repoquery is needed instead yum info for compatibility with RHEL-7 -repoquery -i --installed $(rpm -qf $(which clang)) | grep ^Source -echo "" - -for compiler in clang clang++; do - for rtlib in "" compiler-rt; do - for linker in "" lld; do - for cxxlib in "" $CXXLIBS; do - if [ "$compiler" = "clang" -a -n "$cxxlib" ]; then - continue - fi - for args in "" -static; do - # Skip known failures - # TODO: Fix these - if [[ "$args" = "-static" && "$rtlib" = "compiler-rt" ]]; then - continue - fi - - # Static libc++ needs -pthread - if [[ "$args" = "-static" && "$cxxlib" = "libc++" ]]; then - args="$args -pthread" - fi - - # lld is not supported in s390x and ppc64 - if [[ "$(uname -m)" = "s390x" || "$(uname -m)" = "ppc64" ]] \ - && [[ "$linker" = "lld" ]]; - then - continue - fi - - # compiler-rt does not provide builtins for s390x - if [[ "$(uname -m)" = "s390x" && "$rtlib" = "compiler-rt" ]]; then - continue - fi - - test_toolchain $compiler $rtlib $linker $cxxlib $args - done - done - done - done -done - -exit $status diff --git a/tests/use-dwarf4-by-default/main.fmf b/tests/use-dwarf4-by-default/main.fmf deleted file mode 100644 index 3151d7e..0000000 --- a/tests/use-dwarf4-by-default/main.fmf +++ /dev/null @@ -1,20 +0,0 @@ -summary: Test that clang uses DWARFv4 by default -test: "$WITH_SCL ./test.sh" -require: - - libgcc -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - - llvm - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - - llvm-toolset-13.0-llvm - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - - llvm-toolset-14.0-llvm - when: "collection == llvm-toolset-14.0" diff --git a/tests/use-dwarf4-by-default/test.sh b/tests/use-dwarf4-by-default/test.sh deleted file mode 100755 index 5da8196..0000000 --- a/tests/use-dwarf4-by-default/test.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -eux - -echo "int main(){ return 0; }" | clang -g -v -x c - 2> build.log -# Make sure that clang is using the expected flag to use DWARF 4 -grep -q "\-dwarf-version=4" build.log -# Inspect the binary to double check expected DWARF version -llvm-dwarfdump a.out | grep -i version | grep 0x0004 From df64681647c170b670e8bcec3069d650ece9728e Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Fri, 9 Sep 2022 10:39:48 +0200 Subject: [PATCH 09/77] Improve integration of llvm's libunwind --- ...t-Fedora-Specific-install-dir-for-li.patch | 45 +++++++++++++++++++ clang.spec | 5 +++ 2 files changed, 50 insertions(+) create mode 100644 0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch diff --git a/0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch b/0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch new file mode 100644 index 0000000..4a8fda9 --- /dev/null +++ b/0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch @@ -0,0 +1,45 @@ +From a85305a801c39720d7ec1c9441a88fef1ac19435 Mon Sep 17 00:00:00 2001 +From: serge-sans-paille +Date: Fri, 9 Sep 2022 10:17:01 +0200 +Subject: [PATCH] Take into account Fedora Specific install dir for libunwind + +--- + clang/lib/Driver/ToolChains/CommonArgs.cpp | 8 +++++++- + clang/test/Driver/linux-ld.c | 2 +- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp +index 443725f..c1401a6 100644 +--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp ++++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp +@@ -1529,7 +1529,13 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D, + CmdArgs.push_back("-lgcc_s"); + break; + } +- case ToolChain::UNW_CompilerRT: ++ case ToolChain::UNW_CompilerRT: { ++ SmallString<256> DefaultLibPath = ++ llvm::sys::path::parent_path(TC.getDriver().Dir); ++ llvm::sys::path::append(DefaultLibPath, Twine("lib") + CLANG_LIBDIR_SUFFIX); ++ CmdArgs.push_back( ++ strdup(("-L" + DefaultLibPath + "/llvm-unwind").str().c_str())); ++ } + if (TC.getTriple().isOSAIX()) { + // AIX only has libunwind as a shared library. So do not pass + // anything in if -static is specified. +diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c +index e76b35d..dfb8eca 100644 +--- a/clang/test/Driver/linux-ld.c ++++ b/clang/test/Driver/linux-ld.c +@@ -299,7 +299,7 @@ + // RUN: --sysroot=%S/Inputs/basic_linux_tree \ + // RUN: | FileCheck --check-prefix=CHECK-CLANG-ANDROID-STATIC %s + // CHECK-CLANG-ANDROID-STATIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" +-// CHECK-CLANG-ANDROID-STATIC: "--start-group" "{{[^"]*}}{{/|\\\\}}libclang_rt.builtins-aarch64-android.a" "-l:libunwind.a" "-lc" "--end-group" ++// CHECK-CLANG-ANDROID-STATIC: "--start-group" "{{[^"]*}}{{/|\\\\}}libclang_rt.builtins-aarch64-android.a" "-L{{[^"]*}}{{/|\\\\}}llvm-unwind" "-l:libunwind.a" "-lc" "--end-group" + // + // RUN: %clang -### %s 2>&1 \ + // RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \ +-- +1.8.3.1 + diff --git a/clang.spec b/clang.spec index 56de2fd..3813230 100644 --- a/clang.spec +++ b/clang.spec @@ -72,6 +72,8 @@ Patch6: 0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch # TODO: Drop once updating to 15.0.1 or newer. Patch7: 0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch +Patch8: 0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch + %if %{without compat_build} # Patches for clang-tools-extra # See https://reviews.llvm.org/D120301 @@ -596,6 +598,9 @@ false %endif %changelog +* Sat Sep 17 2022 sguelton@redhat.com - 15.0.0-3 +- Improve integration of llvm's libunwind + * Wed Sep 14 2022 Nikita Popov - 15.0.0-2 - Downgrade implicit int and implicit function declaration to warning only From 14e25ec29a7439244f103ad3988496849eff5ab4 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 22 Sep 2022 10:12:07 +0200 Subject: [PATCH 10/77] Add patch for inline builtins with asm label --- ...ction-between-asm-labels-and-inline-.patch | 74 +++++++++++++++++++ clang.spec | 15 ++-- 2 files changed, 84 insertions(+), 5 deletions(-) create mode 100644 0001-clang-Fix-interaction-between-asm-labels-and-inline-.patch diff --git a/0001-clang-Fix-interaction-between-asm-labels-and-inline-.patch b/0001-clang-Fix-interaction-between-asm-labels-and-inline-.patch new file mode 100644 index 0000000..948d164 --- /dev/null +++ b/0001-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 3813230..d3b14b9 100644 --- a/clang.spec +++ b/clang.spec @@ -41,7 +41,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -64,15 +64,17 @@ Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch 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 Patch5: 0010-PATCH-clang-Produce-DWARF4-by-default.patch +Patch6: 0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch # TODO: Can be dropped in LLVM 16: https://reviews.llvm.org/D133316 -Patch6: 0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch +Patch7: 0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch + +# TODO: Can be dropped in LLVM 16: https://reviews.llvm.org/D134362 +Patch8: 0001-clang-Fix-interaction-between-asm-labels-and-inline-.patch # Backport of https://reviews.llvm.org/D133800 to the 15.0.0 release. # TODO: Drop once updating to 15.0.1 or newer. -Patch7: 0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch - -Patch8: 0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch +Patch9: 0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch %if %{without compat_build} # Patches for clang-tools-extra @@ -598,6 +600,9 @@ false %endif %changelog +* Thu Sep 22 2022 Nikita Popov - 15.0.0-3 +- Add patch for inline builtins with asm label + * Sat Sep 17 2022 sguelton@redhat.com - 15.0.0-3 - Improve integration of llvm's libunwind From 3169a3253ae1fd1dbeae6fdb8ecf1333810042c2 Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Wed, 5 Oct 2022 11:36:34 +0200 Subject: [PATCH 11/77] Package clang-tidy headers in clang-tools-extra-devel, fix rhbz#2123479 --- clang.spec | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/clang.spec b/clang.spec index d3b14b9..a26c41e 100644 --- a/clang.spec +++ b/clang.spec @@ -41,7 +41,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 3%{?dist} +Release: 4%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -226,6 +226,13 @@ Requires: emacs-filesystem %description tools-extra A set of extra tools built using Clang's tooling API. +%package tools-extra-devel +Summary: Development header files for clang tools +Requires: %{name}-tools-extra = %{version}-%{release} + +%description tools-extra-devel +Development header files for clang tools. + # Put git-clang-format in its own package, because it Requires git # and we don't want to force users to install all those dependenices if they # just want clang. @@ -457,9 +464,6 @@ popd mkdir -p %{buildroot}%{pkg_libdir}/clang/%{version}/{include,lib,share}/ -# Remove clang-tidy headers. We don't ship the libraries for these. -rm -Rvf %{buildroot}%{_includedir}/clang-tidy/ - %if %{without compat_build} # Add a symlink in /usr/bin to clang-format-diff ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format-diff @@ -591,6 +595,9 @@ false %{_datadir}/clang/run-find-all-symbols.py* %{_datadir}/clang/clang-rename.py* +%files tools-extra-devel +%{_includedir}/clang-tidy/ + %files -n git-clang-format %{_bindir}/git-clang-format @@ -600,6 +607,9 @@ false %endif %changelog +* Wed Oct 05 2022 sguelton@redhat.com - 15.0.0-4 +- Package clang-tidy headers in clang-tools-extra-devel, fix rhbz#2123479 + * Thu Sep 22 2022 Nikita Popov - 15.0.0-3 - Add patch for inline builtins with asm label From 4e042078712e231ec416ad49812c12f685e34bf0 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 13 Oct 2022 09:59:16 +0200 Subject: [PATCH 12/77] Default to non-pie, fix rhbz#2134146 --- clang.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clang.spec b/clang.spec index a26c41e..5cb2784 100644 --- a/clang.spec +++ b/clang.spec @@ -41,7 +41,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 4%{?dist} +Release: 5%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -318,12 +318,9 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py %define _find_debuginfo_dwz_opts %{nil} %endif -# TODO: Drop the HAVE_CXX_ATOMICS64_WITHOUT_LIB once clang15 is in the buildroot. It looks like -# previously clang emitted __atomic_load for std::atomic, which is not detected by cmake. +# We set CLANG_DEFAULT_PIE_ON_LINUX=OFF to match the default used by Fedora's GCC. %cmake -G Ninja \ -%ifarch %ix86 - -DHAVE_CXX_ATOMICS64_WITHOUT_LIB=OFF \ -%endif + -DCLANG_DEFAULT_PIE_ON_LINUX=OFF \ -DLLVM_PARALLEL_LINK_JOBS=1 \ -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ @@ -607,6 +604,9 @@ false %endif %changelog +* Thu Oct 13 2022 Nikita Popov - 15.0.0-5 +- Default to non-pie, fix rhbz#2134146 + * Wed Oct 05 2022 sguelton@redhat.com - 15.0.0-4 - Package clang-tidy headers in clang-tools-extra-devel, fix rhbz#2123479 From 54612cbb684f201ff16961595332405cb5ab50d0 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 19 Oct 2022 14:12:38 +0200 Subject: [PATCH 13/77] Enable ieeelongdouble for ppc64le, fix rhbz#2136099 --- clang.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/clang.spec b/clang.spec index 5cb2784..0391523 100644 --- a/clang.spec +++ b/clang.spec @@ -41,7 +41,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 5%{?dist} +Release: 6%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -318,9 +318,13 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py %define _find_debuginfo_dwz_opts %{nil} %endif -# We set CLANG_DEFAULT_PIE_ON_LINUX=OFF to match the default used by Fedora's GCC. +# We set CLANG_DEFAULT_PIE_ON_LINUX=OFF and PPC_LINUX_DEFAULT_IEEELONGDOUBLE=ON to match the +# defaults used by Fedora's GCC. %cmake -G Ninja \ -DCLANG_DEFAULT_PIE_ON_LINUX=OFF \ +%if 0%{?fedora} + -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=ON \ +%endif -DLLVM_PARALLEL_LINK_JOBS=1 \ -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ @@ -604,6 +608,9 @@ false %endif %changelog +* Wed Oct 19 2022 Nikita Popov - 15.0.0-6 +- Enable ieeelongdouble for ppc64le, fix rhbz#2136099 + * Thu Oct 13 2022 Nikita Popov - 15.0.0-5 - Default to non-pie, fix rhbz#2134146 From abec3da8de0240f36e49a5ee294ed2ded3ef66e9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 3 Nov 2022 17:11:40 +0100 Subject: [PATCH 14/77] Update to LLVM 15.0.4 --- .gitignore | 4 + ...ngrade-implicit-int-and-implicit-fun.patch | 1173 ----------------- clang.spec | 11 +- sources | 8 +- 4 files changed, 13 insertions(+), 1183 deletions(-) delete mode 100644 0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch diff --git a/.gitignore b/.gitignore index a6194c4..da3e479 100644 --- a/.gitignore +++ b/.gitignore @@ -223,3 +223,7 @@ /clang-tools-extra-15.0.0.src.tar.xz.sig /clang-15.0.0.src.tar.xz /clang-15.0.0.src.tar.xz.sig +/clang-tools-extra-15.0.4.src.tar.xz +/clang-tools-extra-15.0.4.src.tar.xz.sig +/clang-15.0.4.src.tar.xz +/clang-15.0.4.src.tar.xz.sig diff --git a/0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch b/0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch deleted file mode 100644 index fd5fd1f..0000000 --- a/0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch +++ /dev/null @@ -1,1173 +0,0 @@ -From 9a95c7e534a4f0e7e992ea62cf3efc75fbdc04ae Mon Sep 17 00:00:00 2001 -From: Aaron Ballman -Date: Wed, 14 Sep 2022 09:38:39 +0200 -Subject: [PATCH] [Clang 15.0.1] Downgrade implicit int and implicit function - declaration to warning only - -The changes in Clang 15.0.0 which enabled these diagnostics as a warning which defaulted to an error caused disruption for people working on distributions such as Gentoo. There was an explicit request to downgrade these to be warning-only in Clang 15.0.1 with the expectation that Clang 16 will default the diagnostics to an error. - -See https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213 for more details on the discussion. ---- - clang/docs/ReleaseNotes.rst | 21 +++++------ - .../clang/Basic/DiagnosticSemaKinds.td | 8 ++--- - clang/test/C/drs/dr0xx.c | 2 +- - clang/test/C/drs/dr1xx.c | 2 +- - .../CodeGen/PowerPC/builtins-ppc-p8vector.c | 28 +++++++-------- - .../CodeGen/builtins-arm-msvc-compat-only.c | 4 +-- - clang/test/CodeGen/neon-crypto.c | 2 +- - clang/test/Driver/cxx_for_opencl.clcpp | 2 +- - clang/test/FixIt/fixit.c | 2 +- - clang/test/Frontend/fixed_point_errors.c | 4 +-- - clang/test/Frontend/fixed_point_not_enabled.c | 2 +- - .../Frontend/system-header-line-directive.c | 2 +- - clang/test/Headers/arm-cmse-header-ns.c | 10 +++--- - clang/test/Modules/config_macros.m | 2 +- - clang/test/Modules/malformed-overload.m | 2 +- - clang/test/Modules/modulemap-locations.m | 6 ++-- - clang/test/OpenMP/declare_mapper_messages.c | 4 +-- - clang/test/PCH/chain-macro-override.c | 2 +- - clang/test/Parser/altivec.c | 4 +-- - clang/test/Parser/attributes.c | 10 +++--- - clang/test/Parser/declarators.c | 8 ++--- - clang/test/Parser/objc-forcollection-neg-2.m | 2 +- - .../Preprocessor/macro_paste_msextensions.c | 2 +- - clang/test/Sema/__try.c | 2 +- - clang/test/Sema/aarch64-tme-errors.c | 2 +- - clang/test/Sema/address_spaces.c | 2 +- - clang/test/Sema/auto-type.c | 2 +- - clang/test/Sema/bitfield.c | 2 +- - clang/test/Sema/block-args.c | 2 +- - clang/test/Sema/block-literal.c | 2 +- - clang/test/Sema/builtin-setjmp.c | 4 +-- - clang/test/Sema/builtins.c | 6 ++-- - clang/test/Sema/crash-invalid-builtin.c | 2 +- - clang/test/Sema/cxx-as-c.c | 2 +- - clang/test/Sema/function.c | 6 ++-- - clang/test/Sema/implicit-builtin-decl.c | 4 +-- - clang/test/Sema/implicit-decl.c | 35 +++++++++++-------- - clang/test/Sema/implicit-int.c | 12 +++---- - clang/test/Sema/implicit-intel-builtin-decl.c | 14 ++++---- - clang/test/Sema/implicit-ms-builtin-decl.c | 12 +++---- - clang/test/Sema/invalid-decl.c | 2 +- - clang/test/Sema/invalid-struct-init.c | 2 +- - clang/test/Sema/redefinition.c | 2 +- - clang/test/Sema/typo-correction.c | 6 ++-- - clang/test/Sema/varargs.c | 2 +- - clang/test/Sema/vla.c | 2 +- - .../SemaObjC/builtin_objc_lib_functions.m | 14 ++++---- - clang/test/SemaObjC/builtin_objc_nslog.m | 4 +-- - .../SemaObjC/ivar-lookup-resolution-builtin.m | 2 +- - clang/test/SemaObjC/protocols.m | 2 +- - clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl | 2 +- - 51 files changed, 141 insertions(+), 141 deletions(-) - -diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst -index cbf3f4b37b5f..a26846a3eac4 100644 ---- a/clang/docs/ReleaseNotes.rst -+++ b/clang/docs/ReleaseNotes.rst -@@ -245,18 +245,15 @@ Improvements to Clang's diagnostics - without a prototype and with no arguments is an invalid redeclaration of a - function with a prototype. e.g., ``void f(int); void f() {}`` is now properly - diagnosed. --- The ``-Wimplicit-function-declaration`` warning diagnostic now defaults to -- an error in C99 and later. Prior to C2x, it may be downgraded to a warning -- with ``-Wno-error=implicit-function-declaration``, or disabled entirely with -- ``-Wno-implicit-function-declaration``. As of C2x, support for implicit -- function declarations has been removed, and the warning options will have no -- effect. --- The ``-Wimplicit-int`` warning diagnostic now defaults to an error in C99 and -- later. Prior to C2x, it may be downgraded to a warning with -- ``-Wno-error=implicit-int``, or disabled entirely with ``-Wno-implicit-int``. -- As of C2x, support for implicit int has been removed, and the warning options -- will have no effect. Specifying ``-Wimplicit-int`` in C89 mode will now issue -- warnings instead of being a noop. -+- The ``-Wimplicit-function-declaration`` warning diagnostic is now enabled by -+ default in C99, C11, and C17. As of C2x, support for implicit function -+ declarations has been removed, and the warning options will have no effect. -+ *NOTE* this warning will default to an error in Clang 16. -+- The ``-Wimplicit-int`` warning diagnostic is now enabled by default in C99, -+ C11, and C17. As of C2x, support for implicit int has been removed, and the -+ warning option will have no effect. Specifying ``-Wimplicit-int`` in C89 mode -+ will now issue warnings instead of being a noop. -+ *NOTE* this warning will default to an error in Clang 16. - - No longer issue a "declaration specifiers missing, defaulting to int" - diagnostic in C89 mode because it is not an extension in C89, it was valid - code. The diagnostic has been removed entirely as it did not have a -diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td -index 6ff5b8de57fd..cb460401eb47 100644 ---- a/clang/include/clang/Basic/DiagnosticSemaKinds.td -+++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td -@@ -419,7 +419,7 @@ def warn_implicit_function_decl : Warning< - InGroup, DefaultIgnore; - def ext_implicit_function_decl_c99 : ExtWarn< - "call to undeclared function %0; ISO C99 and later do not support implicit " -- "function declarations">, InGroup, DefaultError; -+ "function declarations">, InGroup; - def note_function_suggestion : Note<"did you mean %0?">; - - def err_ellipsis_first_param : Error< -@@ -705,7 +705,7 @@ def ext_implicit_lib_function_decl : ExtWarn< - def ext_implicit_lib_function_decl_c99 : ExtWarn< - "call to undeclared library function '%0' with type %1; ISO C99 and later " - "do not support implicit function declarations">, -- InGroup, DefaultError; -+ InGroup; - def note_include_header_or_declare : Note< - "include the header <%0> or explicitly provide a declaration for '%1'">; - def note_previous_builtin_declaration : Note<"%0 is a builtin with type %1">; -@@ -4359,7 +4359,7 @@ def err_ident_list_in_fn_declaration : Error< - "a parameter list without types is only allowed in a function definition">; - def ext_param_not_declared : ExtWarn< - "parameter %0 was not declared, defaults to 'int'; ISO C99 and later do not " -- "support implicit int">, InGroup, DefaultError; -+ "support implicit int">, InGroup; - def err_param_default_argument : Error< - "C does not support default arguments">; - def err_param_default_argument_redefinition : Error< -@@ -10029,7 +10029,7 @@ def warn_receiver_forward_class : Warning< - def note_method_sent_forward_class : Note<"method %0 is used for the forward class">; - def ext_missing_type_specifier : ExtWarn< - "type specifier missing, defaults to 'int'; ISO C99 and later do not support " -- "implicit int">, InGroup, DefaultError; -+ "implicit int">, InGroup; - def err_missing_type_specifier : Error< - "a type specifier is required for all declarations">; - def err_decimal_unsupported : Error< -diff --git a/clang/test/C/drs/dr0xx.c b/clang/test/C/drs/dr0xx.c -index 183382406475..3bfad3637d26 100644 ---- a/clang/test/C/drs/dr0xx.c -+++ b/clang/test/C/drs/dr0xx.c -@@ -110,7 +110,7 @@ struct dr007_b; - * of treated as declaring a parameter of type 'int (*)(dr009_t);' - */ - typedef int dr009_t; --void dr009_f((dr009_t)); /* c99untilc2x-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} -+void dr009_f((dr009_t)); /* c99untilc2x-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} - c2xandup-error {{a type specifier is required for all declarations}} */ - - /* WG14 DR010: -diff --git a/clang/test/C/drs/dr1xx.c b/clang/test/C/drs/dr1xx.c -index 70435b523765..1e430c5fb395 100644 ---- a/clang/test/C/drs/dr1xx.c -+++ b/clang/test/C/drs/dr1xx.c -@@ -369,7 +369,7 @@ void dr163(void) { - int i; - i = undeclared; /* expected-error {{use of undeclared identifier 'undeclared'}} */ - sdfsdfsf = 1; /* expected-error {{use of undeclared identifier 'sdfsdfsf'}} */ -- i = also_undeclared(); /* c99untilc2x-error {{call to undeclared function 'also_undeclared'; ISO C99 and later do not support implicit function declarations}} -+ i = also_undeclared(); /* c99untilc2x-warning {{call to undeclared function 'also_undeclared'; ISO C99 and later do not support implicit function declarations}} - c2xandup-error {{use of undeclared identifier 'also_undeclared'}} - */ - } -diff --git a/clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c b/clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c -index af3d5c7d066b..54d2c70c0aa5 100644 ---- a/clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c -+++ b/clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c -@@ -143,7 +143,7 @@ void test1() { - res_vui = vec_mergee(vui, vui); - // CHECK: @llvm.ppc.altivec.vperm - // CHECK-LE: @llvm.ppc.altivec.vperm --// CHECK-PPC: error: call to undeclared function 'vec_mergee' -+// CHECK-PPC: warning: call to undeclared function 'vec_mergee' - - res_vbll = vec_mergee(vbll, vbll); - // CHECK: @llvm.ppc.altivec.vperm -@@ -177,7 +177,7 @@ void test1() { - res_vui = vec_mergeo(vui, vui); - // CHECK: @llvm.ppc.altivec.vperm - // CHECK-LE: @llvm.ppc.altivec.vperm --// CHECK-PPC: error: call to undeclared function 'vec_mergeo' -+// CHECK-PPC: warning: call to undeclared function 'vec_mergeo' - - /* vec_cmpeq */ - res_vbll = vec_cmpeq(vbll, vbll); -@@ -403,7 +403,7 @@ void test1() { - res_vsc = vec_cntlz(vsc); - // CHECK: call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %{{.+}}, i1 false) - // CHECK-LE: call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %{{.+}}, i1 false) --// CHECK-PPC: error: call to undeclared function 'vec_cntlz' -+// CHECK-PPC: warning: call to undeclared function 'vec_cntlz' - - res_vuc = vec_cntlz(vuc); - // CHECK: call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %{{.+}}, i1 false) -@@ -754,19 +754,19 @@ void test1() { - res_vsi = vec_vpksdss(vsll, vsll); - // CHECK: llvm.ppc.altivec.vpksdss - // CHECK-LE: llvm.ppc.altivec.vpksdss --// CHECK-PPC: error: call to undeclared function 'vec_vpksdss' -+// CHECK-PPC: warning: call to undeclared function 'vec_vpksdss' - - /* vec_vpksdus */ - res_vui = vec_vpksdus(vsll, vsll); - // CHECK: llvm.ppc.altivec.vpksdus - // CHECK-LE: llvm.ppc.altivec.vpksdus --// CHECK-PPC: error: call to undeclared function 'vec_vpksdus' -+// CHECK-PPC: warning: call to undeclared function 'vec_vpksdus' - - /* vec_vpkudum */ - res_vsi = vec_vpkudum(vsll, vsll); - // CHECK: vperm - // CHECK-LE: vperm --// CHECK-PPC: error: call to undeclared function 'vec_vpkudum' -+// CHECK-PPC: warning: call to undeclared function 'vec_vpkudum' - - res_vui = vec_vpkudum(vull, vull); - // CHECK: vperm -@@ -775,13 +775,13 @@ void test1() { - res_vui = vec_vpkudus(vull, vull); - // CHECK: llvm.ppc.altivec.vpkudus - // CHECK-LE: llvm.ppc.altivec.vpkudus --// CHECK-PPC: error: call to undeclared function 'vec_vpkudus' -+// CHECK-PPC: warning: call to undeclared function 'vec_vpkudus' - - /* vec_vupkhsw */ - res_vsll = vec_vupkhsw(vsi); - // CHECK: llvm.ppc.altivec.vupkhsw - // CHECK-LE: llvm.ppc.altivec.vupklsw --// CHECK-PPC: error: call to undeclared function 'vec_vupkhsw' -+// CHECK-PPC: warning: call to undeclared function 'vec_vupkhsw' - - res_vbll = vec_vupkhsw(vbi); - // CHECK: llvm.ppc.altivec.vupkhsw -@@ -791,7 +791,7 @@ void test1() { - res_vsll = vec_vupklsw(vsi); - // CHECK: llvm.ppc.altivec.vupklsw - // CHECK-LE: llvm.ppc.altivec.vupkhsw --// CHECK-PPC: error: call to undeclared function 'vec_vupklsw' -+// CHECK-PPC: warning: call to undeclared function 'vec_vupklsw' - - res_vbll = vec_vupklsw(vbi); - // CHECK: llvm.ppc.altivec.vupklsw -@@ -845,7 +845,7 @@ void test1() { - // CHECK: xor <16 x i8> [[T1]], - // CHECK-LE: [[T1:%.+]] = and <16 x i8> - // CHECK-LE: xor <16 x i8> [[T1]], --// CHECK-PPC: error: call to undeclared function 'vec_nand' -+// CHECK-PPC: warning: call to undeclared function 'vec_nand' - - res_vbc = vec_nand(vbc, vbc); - // CHECK: [[T1:%.+]] = and <16 x i8> -@@ -937,7 +937,7 @@ void test1() { - // CHECK: or <16 x i8> {{%.+}}, [[T1]] - // CHECK-LE: [[T1:%.+]] = xor <16 x i8> {{%.+}}, - // CHECK-LE: or <16 x i8> {{%.+}}, [[T1]] --// CHECK-PPC: error: call to undeclared function 'vec_orc' -+// CHECK-PPC: warning: call to undeclared function 'vec_orc' - - res_vsc = vec_orc(vsc, vbc); - // CHECK: [[T1:%.+]] = xor <16 x i8> {{%.+}}, -@@ -1166,7 +1166,7 @@ void test1() { - res_vsll = vec_vbpermq(vuc, vuc); - // CHECK: llvm.ppc.altivec.vbpermq - // CHECK-LE: llvm.ppc.altivec.vbpermq --// CHECK-PPC: error: call to undeclared function 'vec_vbpermq' -+// CHECK-PPC: warning: call to undeclared function 'vec_vbpermq' - - /* vec_vgbbd */ - res_vsc = vec_vgbbd(vsc); -@@ -1176,12 +1176,12 @@ void test1() { - res_vuc = vec_vgbbd(vuc); - // CHECK: llvm.ppc.altivec.vgbbd - // CHECK-LE: llvm.ppc.altivec.vgbbd --// CHECK-PPC: error: call to undeclared function 'vec_vgbbd' -+// CHECK-PPC: warning: call to undeclared function 'vec_vgbbd' - - res_vuc = vec_gb(vuc); - // CHECK: llvm.ppc.altivec.vgbbd - // CHECK-LE: llvm.ppc.altivec.vgbbd --// CHECK-PPC: error: call to undeclared function 'vec_gb' -+// CHECK-PPC: warning: call to undeclared function 'vec_gb' - - res_vsll = vec_gbb(vsll); - // CHECK: llvm.ppc.altivec.vgbbd -diff --git a/clang/test/CodeGen/builtins-arm-msvc-compat-only.c b/clang/test/CodeGen/builtins-arm-msvc-compat-only.c -index 42cc9d70a142..c2b021b31174 100644 ---- a/clang/test/CodeGen/builtins-arm-msvc-compat-only.c -+++ b/clang/test/CodeGen/builtins-arm-msvc-compat-only.c -@@ -1,6 +1,6 @@ - // RUN: %clang_cc1 -triple thumbv7-windows -fms-extensions -emit-llvm -o - %s \ - // RUN: | FileCheck %s -check-prefix CHECK-MSVC --// RUN: not %clang_cc1 -triple armv7-eabi -emit-llvm %s -o /dev/null 2>&1 \ -+// RUN: %clang_cc1 -triple armv7-eabi -emit-llvm %s -o /dev/null 2>&1 \ - // RUN: | FileCheck %s -check-prefix CHECK-EABI - // REQUIRES: arm-registered-target - -@@ -9,7 +9,7 @@ void emit() { - } - - // CHECK-MSVC: call void asm sideeffect ".inst.n 0xDEFE", ""() --// CHECK-EABI: error: call to undeclared function '__emit' -+// CHECK-EABI: warning: call to undeclared function '__emit' - - void emit_truncated() { - __emit(0x11110000); // movs r0, r0 -diff --git a/clang/test/CodeGen/neon-crypto.c b/clang/test/CodeGen/neon-crypto.c -index 916886574416..1b29b1a53096 100644 ---- a/clang/test/CodeGen/neon-crypto.c -+++ b/clang/test/CodeGen/neon-crypto.c -@@ -14,7 +14,7 @@ - - uint8x16_t test_vaeseq_u8(uint8x16_t data, uint8x16_t key) { - // CHECK-LABEL: @test_vaeseq_u8 -- // CHECK-NO-CRYPTO: error: call to undeclared function 'vaeseq_u8' -+ // CHECK-NO-CRYPTO: warning: call to undeclared function 'vaeseq_u8' - return vaeseq_u8(data, key); - // CHECK: call <16 x i8> @llvm.{{arm.neon|aarch64.crypto}}.aese(<16 x i8> %data, <16 x i8> %key) - } -diff --git a/clang/test/Driver/cxx_for_opencl.clcpp b/clang/test/Driver/cxx_for_opencl.clcpp -index fc2fc621791d..e3e89c53b888 100644 ---- a/clang/test/Driver/cxx_for_opencl.clcpp -+++ b/clang/test/Driver/cxx_for_opencl.clcpp -@@ -13,6 +13,6 @@ kernel void k(){ - auto a = get_local_id(1); - #ifndef __OPENCL_CPP_VERSION__ - //expected-error@-2{{OpenCL C version 2.0 does not support the 'auto' storage class specifier}} --//expected-error@-3{{type specifier missing, defaults to 'int'}} -+//expected-warning@-3{{type specifier missing, defaults to 'int'}} - #endif - } -diff --git a/clang/test/FixIt/fixit.c b/clang/test/FixIt/fixit.c -index eda00c35ccbb..c929b5abc5ee 100644 ---- a/clang/test/FixIt/fixit.c -+++ b/clang/test/FixIt/fixit.c -@@ -29,7 +29,7 @@ int array0[5] = { [3] 3 }; // expected-warning {{GNU 'missing ='}} - - // CHECK: int x - // CHECK: int y --void f1(x, y) // expected-error 2{{was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} -+void f1(x, y) // expected-warning 2{{was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} - { - } - -diff --git a/clang/test/Frontend/fixed_point_errors.c b/clang/test/Frontend/fixed_point_errors.c -index 6a711936f239..2d12a1ebb10b 100644 ---- a/clang/test/Frontend/fixed_point_errors.c -+++ b/clang/test/Frontend/fixed_point_errors.c -@@ -228,9 +228,9 @@ void CheckSuffixOnIntegerLiterals(void) { - - // Using auto - auto auto_fract = 0r; // expected-error{{invalid suffix 'r' on integer constant}} -- // expected-error@-1{{type specifier missing, defaults to 'int'}} -+ // expected-warning@-1{{type specifier missing, defaults to 'int'}} - auto auto_accum = 0k; // expected-error{{invalid suffix 'k' on integer constant}} -- // expected-error@-1{{type specifier missing, defaults to 'int'}} -+ // expected-warning@-1{{type specifier missing, defaults to 'int'}} - } - - // Ok conversions -diff --git a/clang/test/Frontend/fixed_point_not_enabled.c b/clang/test/Frontend/fixed_point_not_enabled.c -index a1a60c5a6fa8..e7522213f98d 100644 ---- a/clang/test/Frontend/fixed_point_not_enabled.c -+++ b/clang/test/Frontend/fixed_point_not_enabled.c -@@ -11,7 +11,7 @@ unsigned long _Accum u_long_accum; // expected-error{{compile with '-ffixed-p - // Aliased fixed point types - short _Accum short_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}} - _Accum accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}} -- // expected-error@-1{{type specifier missing, defaults to 'int'}} -+ // expected-warning@-1{{type specifier missing, defaults to 'int'}} - long _Accum long_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}} - - // Cannot use fixed point suffixes -diff --git a/clang/test/Frontend/system-header-line-directive.c b/clang/test/Frontend/system-header-line-directive.c -index d5705e028daa..0de69196d76e 100644 ---- a/clang/test/Frontend/system-header-line-directive.c -+++ b/clang/test/Frontend/system-header-line-directive.c -@@ -3,7 +3,7 @@ - #include - #include - --// expected-error@line-directive.h:* {{type specifier missing, defaults to 'int'}} -+// expected-warning@line-directive.h:* {{type specifier missing, defaults to 'int'}} - #include "line-directive.h" - - // This tests that "#line" directives in system headers preserve system -diff --git a/clang/test/Headers/arm-cmse-header-ns.c b/clang/test/Headers/arm-cmse-header-ns.c -index dfbef2c00291..b4112a4fc79a 100644 ---- a/clang/test/Headers/arm-cmse-header-ns.c -+++ b/clang/test/Headers/arm-cmse-header-ns.c -@@ -1,4 +1,4 @@ --// RUN: not %clang_cc1 -triple thumbv8m.base-eabi -fsyntax-only %s 2>&1 | FileCheck --check-prefix=CHECK-c %s -+// RUN: %clang_cc1 -triple thumbv8m.base-eabi -fsyntax-only %s 2>&1 | FileCheck --check-prefix=CHECK-c %s - // RUN: not %clang_cc1 -triple thumbv8m.base-eabi -fsyntax-only -x c++ %s 2>&1 | FileCheck --check-prefix=CHECK-cpp %s - - #include -@@ -16,10 +16,10 @@ void func(callback_t fptr, void *p) - cmse_TTAT(p); - cmse_TTA_fptr(fptr); - cmse_TTAT_fptr(fptr); --// CHECK-c: error: call to undeclared function 'cmse_TTA' --// CHECK-c: error: call to undeclared function 'cmse_TTAT' --// CHECK-c: error: call to undeclared function 'cmse_TTA_fptr' --// CHECK-c: error: call to undeclared function 'cmse_TTAT_fptr' -+// CHECK-c: warning: call to undeclared function 'cmse_TTA' -+// CHECK-c: warning: call to undeclared function 'cmse_TTAT' -+// CHECK-c: warning: call to undeclared function 'cmse_TTA_fptr' -+// CHECK-c: warning: call to undeclared function 'cmse_TTAT_fptr' - // CHECK-cpp: error: use of undeclared identifier 'cmse_TTA' - // CHECK-cpp: error: use of undeclared identifier 'cmse_TTAT' - // CHECK-cpp: error: use of undeclared identifier 'cmse_TTA_fptr' -diff --git a/clang/test/Modules/config_macros.m b/clang/test/Modules/config_macros.m -index dd071993809b..68ef6508afe6 100644 ---- a/clang/test/Modules/config_macros.m -+++ b/clang/test/Modules/config_macros.m -@@ -5,7 +5,7 @@ int *test_foo(void) { - } - - char *test_bar(void) { -- return bar(); // expected-error{{call to undeclared function 'bar'; ISO C99 and later do not support implicit function declarations}} \ -+ return bar(); // expected-warning{{call to undeclared function 'bar'; ISO C99 and later do not support implicit function declarations}} \ - // expected-error{{incompatible integer to pointer conversion}} - } - -diff --git a/clang/test/Modules/malformed-overload.m b/clang/test/Modules/malformed-overload.m -index fd5d2f4f696b..369de580c9d7 100644 ---- a/clang/test/Modules/malformed-overload.m -+++ b/clang/test/Modules/malformed-overload.m -@@ -1,6 +1,6 @@ - // RUN: rm -rf %t - // RUN: %clang_cc1 -fsyntax-only -I%S/Inputs/malformed-overload -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Wno-strict-prototypes -verify %s --NSLog(@"%@", path); // expected-error {{expected parameter declarator}} expected-error {{expected ')'}} expected-error {{type specifier missing}} expected-warning {{incompatible redeclaration}} expected-note {{to match this '('}} expected-note {{'NSLog' is a builtin with type}} -+NSLog(@"%@", path); // expected-error {{expected parameter declarator}} expected-error {{expected ')'}} expected-warning {{type specifier missing}} expected-warning {{incompatible redeclaration}} expected-note {{to match this '('}} expected-note {{'NSLog' is a builtin with type}} - #import "X.h" - - @class NSString; -diff --git a/clang/test/Modules/modulemap-locations.m b/clang/test/Modules/modulemap-locations.m -index e5738e105263..08e06f47f5c8 100644 ---- a/clang/test/Modules/modulemap-locations.m -+++ b/clang/test/Modules/modulemap-locations.m -@@ -12,9 +12,7 @@ - - void test(void) { - will_be_found1(); -- wont_be_found1(); // expected-error{{call to undeclared function 'wont_be_found1'; ISO C99 and later do not support implicit function declarations}} \ -- expected-note {{did you mean 'will_be_found1'?}} \ -- expected-note@Inputs/ModuleMapLocations/Module_ModuleMap/a.h:1 {{'will_be_found1' declared here}} -+ wont_be_found1(); // expected-warning{{call to undeclared function 'wont_be_found1'; ISO C99 and later do not support implicit function declarations}} - will_be_found2(); -- wont_be_found2(); // expected-error{{call to undeclared function 'wont_be_found2'; ISO C99 and later do not support implicit function declarations}} -+ wont_be_found2(); // expected-warning{{call to undeclared function 'wont_be_found2'; ISO C99 and later do not support implicit function declarations}} - } -diff --git a/clang/test/OpenMP/declare_mapper_messages.c b/clang/test/OpenMP/declare_mapper_messages.c -index ae95dc81caef..ab9e63ede450 100644 ---- a/clang/test/OpenMP/declare_mapper_messages.c -+++ b/clang/test/OpenMP/declare_mapper_messages.c -@@ -42,9 +42,9 @@ int fun(int arg) { - {} - #pragma omp target map(mapper:vv) // expected-error {{expected '(' after 'mapper'}} - {} --#pragma omp target map(mapper( :vv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-error {{call to undeclared function 'mapper'}} expected-note {{to match this '('}} -+#pragma omp target map(mapper( :vv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-warning {{call to undeclared function 'mapper'}} expected-note {{to match this '('}} - {} --#pragma omp target map(mapper(aa :vv) // expected-error {{use of undeclared identifier 'aa'}} expected-error {{expected ')'}} expected-error {{call to undeclared function 'mapper'}} expected-note {{to match this '('}} -+#pragma omp target map(mapper(aa :vv) // expected-error {{use of undeclared identifier 'aa'}} expected-error {{expected ')'}} expected-warning {{call to undeclared function 'mapper'}} expected-note {{to match this '('}} - {} - #pragma omp target map(mapper(ab) :vv) // expected-error {{missing map type}} expected-error {{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}} - {} -diff --git a/clang/test/PCH/chain-macro-override.c b/clang/test/PCH/chain-macro-override.c -index 26abae1cb9d5..62b05324ed44 100644 ---- a/clang/test/PCH/chain-macro-override.c -+++ b/clang/test/PCH/chain-macro-override.c -@@ -10,7 +10,7 @@ int foo(void) { - f(); - g(); - h(); -- h2(); // expected-error {{call to undeclared function 'h2'; ISO C99 and later do not support implicit function declarations}} -+ h2(); // expected-warning {{call to undeclared function 'h2'; ISO C99 and later do not support implicit function declarations}} - h3(); - return x; - } -diff --git a/clang/test/Parser/altivec.c b/clang/test/Parser/altivec.c -index 66d2ca33ed91..3f344e9c5a13 100644 ---- a/clang/test/Parser/altivec.c -+++ b/clang/test/Parser/altivec.c -@@ -97,8 +97,8 @@ vector unsigned long int v_uli; // nonaix-warning {{Use of 'long' with '__ve - // These should have warnings. - __vector long double vv_ld; // expected-error {{cannot use 'long double' with '__vector'}} - vector long double v_ld; // expected-error {{cannot use 'long double' with '__vector'}} --vector bool v_b; // expected-error {{type specifier missing, defaults to 'int'}} --vector __bool v___b; // expected-error {{type specifier missing, defaults to 'int'}} -+vector bool v_b; // expected-warning {{type specifier missing, defaults to 'int'}} -+vector __bool v___b; // expected-warning {{type specifier missing, defaults to 'int'}} - - // These should have errors. - #ifndef __VSX__ -diff --git a/clang/test/Parser/attributes.c b/clang/test/Parser/attributes.c -index fe22c7e98a53..3375c4bc3741 100644 ---- a/clang/test/Parser/attributes.c -+++ b/clang/test/Parser/attributes.c -@@ -7,7 +7,7 @@ foo(void) { - } - - --__attribute__(()) y; // expected-error {{type specifier missing, defaults to 'int'}} -+__attribute__(()) y; // expected-warning {{type specifier missing, defaults to 'int'}} - - // PR2796 - int (__attribute__(()) *z)(long y); -@@ -19,8 +19,8 @@ int f2(y, __attribute__(()) x); // expected-error {{expected identifier}} - - // This is parsed as a normal argument list (with two args that are implicit - // int) because the __attribute__ is a declspec. --void f3(__attribute__(()) x, // expected-error {{type specifier missing, defaults to 'int'}} -- y); // expected-error {{type specifier missing, defaults to 'int'}} -+void f3(__attribute__(()) x, // expected-warning {{type specifier missing, defaults to 'int'}} -+ y); // expected-warning {{type specifier missing, defaults to 'int'}} - - void f4(__attribute__(())); // expected-error {{expected parameter declarator}} - -@@ -30,14 +30,14 @@ int baz(int (__attribute__(()) *x)(long y)); - - void g1(void (*f1)(__attribute__(()) int x)); - void g2(int (*f2)(y, __attribute__(()) x)); // expected-error {{expected identifier}} --void g3(void (*f3)(__attribute__(()) x, int y)); // expected-error {{type specifier missing, defaults to 'int'}} -+void g3(void (*f3)(__attribute__(()) x, int y)); // expected-warning {{type specifier missing, defaults to 'int'}} - void g4(void (*f4)(__attribute__(()))); // expected-error {{expected parameter declarator}} - - - void (*h1)(void (*f1)(__attribute__(()) int x)); - void (*h2)(int (*f2)(y, __attribute__(()) x)); // expected-error {{expected identifier}} - --void (*h3)(void (*f3)(__attribute__(()) x)); // expected-error {{type specifier missing, defaults to 'int'}} -+void (*h3)(void (*f3)(__attribute__(()) x)); // expected-warning {{type specifier missing, defaults to 'int'}} - void (*h4)(void (*f4)(__attribute__(()))); // expected-error {{expected parameter declarator}} - - -diff --git a/clang/test/Parser/declarators.c b/clang/test/Parser/declarators.c -index c294bd085366..92cba09cdbbf 100644 ---- a/clang/test/Parser/declarators.c -+++ b/clang/test/Parser/declarators.c -@@ -6,7 +6,7 @@ void f0(); /* expected-warning {{a function declaration without a prototype is d - void f1(int [*]); - void f2(int [const *]); - void f3(int [volatile const*]); --int f4(*XX)(void); /* expected-error {{cannot return}} expected-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} */ -+int f4(*XX)(void); /* expected-error {{cannot return}} expected-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} */ - int f5(int [static]); /* expected-error {{'static' may not be used without an array size}} */ - - char ((((*X)))); -@@ -64,9 +64,9 @@ struct xyz test8(void) { return a; } // a should be be marked invalid, no diag. - - - // Verify that implicit int still works. --static f; // expected-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} --static g = 4; // expected-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} --static h // expected-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} -+static f; // expected-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} -+static g = 4; // expected-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} -+static h // expected-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} - __asm__("foo"); - - -diff --git a/clang/test/Parser/objc-forcollection-neg-2.m b/clang/test/Parser/objc-forcollection-neg-2.m -index e28b74f3f442..f95dd1356bc3 100644 ---- a/clang/test/Parser/objc-forcollection-neg-2.m -+++ b/clang/test/Parser/objc-forcollection-neg-2.m -@@ -24,7 +24,7 @@ typedef struct objc_object { - - @implementation MyList (BasicTest) - - (void)compilerTestAgainst { -- static i;// expected-error {{type specifier missing, defaults to 'int'}} -+ static i;// expected-warning {{type specifier missing, defaults to 'int'}} - for (id el, elem in self) // expected-error {{only one element declaration is allowed}} - ++i; - for (id el in self) -diff --git a/clang/test/Preprocessor/macro_paste_msextensions.c b/clang/test/Preprocessor/macro_paste_msextensions.c -index 1549ff5e5562..dcc5336b91c1 100644 ---- a/clang/test/Preprocessor/macro_paste_msextensions.c -+++ b/clang/test/Preprocessor/macro_paste_msextensions.c -@@ -32,7 +32,7 @@ nested(baz) rise of the dead tokens - // rdar://8197149 - VC++ allows invalid token pastes: (##baz - #define foo(x) abc(x) - #define bar(y) foo(##baz(y)) --bar(q) // expected-error {{type specifier missing}} expected-error {{invalid preprocessing token}} expected-error {{parameter list without types}} -+bar(q) // expected-warning {{type specifier missing}} expected-error {{invalid preprocessing token}} expected-error {{parameter list without types}} - - // CHECK: abc(baz(q)) - -diff --git a/clang/test/Sema/__try.c b/clang/test/Sema/__try.c -index 9bfd914c013c..d0b2164198a2 100644 ---- a/clang/test/Sema/__try.c -+++ b/clang/test/Sema/__try.c -@@ -50,7 +50,7 @@ void TEST(void) { - } // expected-error{{expected '__except' or '__finally' block}} - - void TEST(void) { -- __except (FilterExpression()) { // expected-error{{call to undeclared function '__except'; ISO C99 and later do not support implicit function declarations}} \ -+ __except (FilterExpression()) { // expected-warning{{call to undeclared function '__except'; ISO C99 and later do not support implicit function declarations}} \ - // expected-error{{too few arguments to function call, expected 1, have 0}} \ - // expected-error{{expected ';' after expression}} - } -diff --git a/clang/test/Sema/aarch64-tme-errors.c b/clang/test/Sema/aarch64-tme-errors.c -index 26e931b62bcb..63ce87f3dc6b 100644 ---- a/clang/test/Sema/aarch64-tme-errors.c -+++ b/clang/test/Sema/aarch64-tme-errors.c -@@ -3,6 +3,6 @@ - #include "arm_acle.h" - - void test_no_tme_funcs(void) { -- __tstart(); // expected-error{{call to undeclared function '__tstart'; ISO C99 and later do not support implicit function declarations}} -+ __tstart(); // expected-warning{{call to undeclared function '__tstart'; ISO C99 and later do not support implicit function declarations}} - __builtin_tstart(); // expected-error{{use of unknown builtin '__builtin_tstart'}} - } -diff --git a/clang/test/Sema/address_spaces.c b/clang/test/Sema/address_spaces.c -index ff7a134e04eb..085bef9b72d3 100644 ---- a/clang/test/Sema/address_spaces.c -+++ b/clang/test/Sema/address_spaces.c -@@ -9,7 +9,7 @@ void bar(_AS2 int a); // expected-error {{parameter may not be qualified with an - void foo(_AS3 float *a, - _AS1 float b) // expected-error {{parameter may not be qualified with an address space}} - { -- _AS2 *x;// expected-error {{type specifier missing, defaults to 'int'}} -+ _AS2 *x;// expected-warning {{type specifier missing, defaults to 'int'}} - _AS1 float * _AS2 *B; - - int _AS1 _AS2 *Y; // expected-error {{multiple address spaces specified for type}} -diff --git a/clang/test/Sema/auto-type.c b/clang/test/Sema/auto-type.c -index 1170c687c96a..bc845e37c2ae 100644 ---- a/clang/test/Sema/auto-type.c -+++ b/clang/test/Sema/auto-type.c -@@ -37,7 +37,7 @@ void Issue53652(void) { - - // GCC does not accept this either, for the same reason. - _Atomic(__auto_type) aat2 = a; // expected-error {{'__auto_type' not allowed here}} \ -- // expected-error {{type specifier missing, defaults to 'int'}} -+ // expected-warning {{type specifier missing, defaults to 'int'}} - - // Ensure the types are what we expect them to be, regardless of order we - // pass the types. -diff --git a/clang/test/Sema/bitfield.c b/clang/test/Sema/bitfield.c -index 468fe93485cc..b2982515da4d 100644 ---- a/clang/test/Sema/bitfield.c -+++ b/clang/test/Sema/bitfield.c -@@ -84,5 +84,5 @@ struct Test6 { - }; - - struct PR36157 { -- int n : 1 ? 1 : implicitly_declare_function(); // expected-error {{call to undeclared function 'implicitly_declare_function'; ISO C99 and later do not support implicit function declarations}} -+ int n : 1 ? 1 : implicitly_declare_function(); // expected-warning {{call to undeclared function 'implicitly_declare_function'; ISO C99 and later do not support implicit function declarations}} - }; -diff --git a/clang/test/Sema/block-args.c b/clang/test/Sema/block-args.c -index 1e000abf4b36..245b2c02b806 100644 ---- a/clang/test/Sema/block-args.c -+++ b/clang/test/Sema/block-args.c -@@ -37,7 +37,7 @@ void f0(void) { - - // rdar://problem/8962770 - void test4(void) { -- int (^f)(void) = ^((x)) { }; // expected-error {{type specifier missing}} expected-error {{type-id cannot have a name}} -+ int (^f)(void) = ^((x)) { }; // expected-warning {{type specifier missing}} expected-error {{type-id cannot have a name}} - } - - // rdar://problem/9170609 -diff --git a/clang/test/Sema/block-literal.c b/clang/test/Sema/block-literal.c -index b760c647f0d1..4cb96fb49092 100644 ---- a/clang/test/Sema/block-literal.c -+++ b/clang/test/Sema/block-literal.c -@@ -41,7 +41,7 @@ void test2(void) { - - foo: - takeblock(^{ x = 4; }); // expected-error {{variable is not assignable (missing __block type specifier)}} -- __block y = 7; // expected-error {{type specifier missing, defaults to 'int'}} -+ __block y = 7; // expected-warning {{type specifier missing, defaults to 'int'}} - takeblock(^{ y = 8; }); - } - -diff --git a/clang/test/Sema/builtin-setjmp.c b/clang/test/Sema/builtin-setjmp.c -index 5092d1665c19..94cd2652d0ab 100644 ---- a/clang/test/Sema/builtin-setjmp.c -+++ b/clang/test/Sema/builtin-setjmp.c -@@ -35,10 +35,10 @@ void use(void) { - setjmp(0); - #if NO_SETJMP - // cxx-error@-2 {{undeclared identifier 'setjmp'}} -- // c-error@-3 {{call to undeclared function 'setjmp'; ISO C99 and later do not support implicit function declarations}} -+ // c-warning@-3 {{call to undeclared function 'setjmp'; ISO C99 and later do not support implicit function declarations}} - #elif ONLY_JMP_BUF - // cxx-error@-5 {{undeclared identifier 'setjmp'}} -- // c-error@-6 {{call to undeclared library function 'setjmp' with type 'int (jmp_buf)' (aka 'int (int *)'); ISO C99 and later do not support implicit function declarations}} -+ // c-warning@-6 {{call to undeclared library function 'setjmp' with type 'int (jmp_buf)' (aka 'int (int *)'); ISO C99 and later do not support implicit function declarations}} - // c-note@-7 {{include the header or explicitly provide a declaration for 'setjmp'}} - #else - // cxx-no-diagnostics -diff --git a/clang/test/Sema/builtins.c b/clang/test/Sema/builtins.c -index 702b40c63767..b3ef004bec0f 100644 ---- a/clang/test/Sema/builtins.c -+++ b/clang/test/Sema/builtins.c -@@ -206,9 +206,9 @@ void test18(void) { - } - - void no_ms_builtins(void) { -- __assume(1); // expected-error {{call to undeclared function '__assume'; ISO C99 and later do not support implicit function declarations}} -- __noop(1); // expected-error {{call to undeclared function '__noop'; ISO C99 and later do not support implicit function declarations}} -- __debugbreak(); // expected-error {{call to undeclared function '__debugbreak'; ISO C99 and later do not support implicit function declarations}} -+ __assume(1); // expected-warning {{call to undeclared function '__assume'; ISO C99 and later do not support implicit function declarations}} -+ __noop(1); // expected-warning {{call to undeclared function '__noop'; ISO C99 and later do not support implicit function declarations}} -+ __debugbreak(); // expected-warning {{call to undeclared function '__debugbreak'; ISO C99 and later do not support implicit function declarations}} - } - - void unavailable(void) { -diff --git a/clang/test/Sema/crash-invalid-builtin.c b/clang/test/Sema/crash-invalid-builtin.c -index 26e5888a9e30..8f749f7b32bb 100644 ---- a/clang/test/Sema/crash-invalid-builtin.c -+++ b/clang/test/Sema/crash-invalid-builtin.c -@@ -1,4 +1,4 @@ - // RUN: %clang_cc1 -triple=x86_64-apple-darwin -fsyntax-only -verify %s - // PR23086 - --__builtin_isinf(...); // expected-error {{type specifier missing, defaults to 'int'}} expected-error {{ISO C requires a named parameter before '...'}} // expected-error {{cannot redeclare builtin function '__builtin_isinf'}} // expected-note {{'__builtin_isinf' is a builtin with type 'int ()'}} -+__builtin_isinf(...); // expected-warning {{type specifier missing, defaults to 'int'}} expected-error {{ISO C requires a named parameter before '...'}} // expected-error {{cannot redeclare builtin function '__builtin_isinf'}} // expected-note {{'__builtin_isinf' is a builtin with type 'int ()'}} -diff --git a/clang/test/Sema/cxx-as-c.c b/clang/test/Sema/cxx-as-c.c -index a5d1a4944c95..41d7350d1f15 100644 ---- a/clang/test/Sema/cxx-as-c.c -+++ b/clang/test/Sema/cxx-as-c.c -@@ -2,7 +2,7 @@ - - // PR36157 - struct Foo { -- Foo(int n) : n_(n) {} // expected-error 1+{{}} -+ Foo(int n) : n_(n) {} // expected-error 1+{{}} expected-warning 1+{{}} - private: - int n; - }; -diff --git a/clang/test/Sema/function.c b/clang/test/Sema/function.c -index 1143fe8f50d5..43c8a6c8662b 100644 ---- a/clang/test/Sema/function.c -+++ b/clang/test/Sema/function.c -@@ -18,7 +18,7 @@ void h (const char *fmt, ...) {} // expected-error{{conflicting types for 'h'}} - - // PR1965 - int t5(b); // expected-error {{parameter list without types}} --int t6(int x, g); // expected-error {{type specifier missing, defaults to 'int'}} -+int t6(int x, g); // expected-warning {{type specifier missing, defaults to 'int'}} - - int t7(, ); // expected-error {{expected parameter declarator}} expected-error {{expected parameter declarator}} - int t8(, int a); // expected-error {{expected parameter declarator}} -@@ -41,8 +41,8 @@ int t14() { - } - - // --y(y) { return y; } // expected-error{{parameter 'y' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} \ -- // expected-error{{type specifier missing, defaults to 'int'}} -+y(y) { return y; } // expected-warning{{parameter 'y' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} \ -+ // expected-warning{{type specifier missing, defaults to 'int'}} - - - // PR3137, -diff --git a/clang/test/Sema/implicit-builtin-decl.c b/clang/test/Sema/implicit-builtin-decl.c -index 055ba7e70eb1..a54e652556c3 100644 ---- a/clang/test/Sema/implicit-builtin-decl.c -+++ b/clang/test/Sema/implicit-builtin-decl.c -@@ -1,7 +1,7 @@ - // RUN: %clang_cc1 -fsyntax-only -Wno-strict-prototypes -verify %s - - void f() { -- int *ptr = malloc(sizeof(int) * 10); // expected-error{{call to undeclared library function 'malloc' with type}} \ -+ int *ptr = malloc(sizeof(int) * 10); // expected-warning{{call to undeclared library function 'malloc' with type}} \ - // expected-note{{include the header or explicitly provide a declaration for 'malloc'}} \ - // expected-note{{'malloc' is a builtin with type 'void *}} - } -@@ -24,7 +24,7 @@ void h() { - - void f2() { - fprintf(0, "foo"); // expected-warning{{declaration of built-in function 'fprintf' requires inclusion of the header }} \ -- expected-error {{call to undeclared function 'fprintf'; ISO C99 and later do not support implicit function declarations}} -+ expected-warning {{call to undeclared function 'fprintf'; ISO C99 and later do not support implicit function declarations}} - } - - // PR2892 -diff --git a/clang/test/Sema/implicit-decl.c b/clang/test/Sema/implicit-decl.c -index 351f70ea3366..ce26dcd3a122 100644 ---- a/clang/test/Sema/implicit-decl.c -+++ b/clang/test/Sema/implicit-decl.c -@@ -1,55 +1,60 @@ --// RUN: %clang_cc1 %s -verify -fsyntax-only -Werror=implicit-function-declaration -std=c99 --// RUN: %clang_cc1 %s -verify -fsyntax-only -std=c11 -+// RUN: %clang_cc1 %s -verify=werror,both -fsyntax-only -Werror=implicit-function-declaration -std=c99 -+// RUN: %clang_cc1 %s -verify=expected,both -fsyntax-only -std=c11 - // RUN: %clang_cc1 %s -verify=c2x -fsyntax-only -std=c2x - - /// -Werror-implicit-function-declaration is a deprecated alias used by many projects. --// RUN: %clang_cc1 %s -verify -fsyntax-only -Werror-implicit-function-declaration -+// RUN: %clang_cc1 %s -verify=werror,both -fsyntax-only -Werror-implicit-function-declaration - - // c2x-note@*:* {{'__builtin_va_list' declared here}} - - typedef int int32_t; - typedef unsigned char Boolean; - --extern int printf(__const char *__restrict __format, ...); // expected-note{{'printf' declared here}} \ -+extern int printf(__const char *__restrict __format, ...); // werror-note{{'printf' declared here}} \ - c2x-note {{'printf' declared here}} - - void func(void) { - int32_t *vector[16]; - const char compDesc[16 + 1]; - int32_t compCount = 0; -- if (_CFCalendarDecomposeAbsoluteTimeV(compDesc, vector, compCount)) { // expected-error {{call to undeclared function '_CFCalendarDecomposeAbsoluteTimeV'; ISO C99 and later do not support implicit function declarations}} \ -- expected-note {{previous implicit declaration}} \ -+ if (_CFCalendarDecomposeAbsoluteTimeV(compDesc, vector, compCount)) { // werror-error {{call to undeclared function '_CFCalendarDecomposeAbsoluteTimeV'; ISO C99 and later do not support implicit function declarations}} \ -+ both-note {{previous implicit declaration}} \ -+ expected-warning {{call to undeclared function '_CFCalendarDecomposeAbsoluteTimeV'; ISO C99 and later do not support implicit function declarations}} \ - c2x-error {{use of undeclared identifier '_CFCalendarDecomposeAbsoluteTimeV'}} - } - -- printg("Hello, World!\n"); // expected-error{{call to undeclared function 'printg'; ISO C99 and later do not support implicit function declarations}} \ -- expected-note{{did you mean 'printf'?}} \ -+ printg("Hello, World!\n"); // werror-error{{call to undeclared function 'printg'; ISO C99 and later do not support implicit function declarations}} \ -+ werror-note{{did you mean 'printf'?}} \ -+ expected-warning{{call to undeclared function 'printg'; ISO C99 and later do not support implicit function declarations}} \ - c2x-error {{use of undeclared identifier 'printg'; did you mean 'printf'?}} - -- __builtin_is_les(1, 3); // expected-error{{use of unknown builtin '__builtin_is_les'}} \ -+ __builtin_is_les(1, 3); // both-error{{use of unknown builtin '__builtin_is_les'}} \ - c2x-error {{unknown type name '__builtin_is_les'; did you mean '__builtin_va_list'?}} \ - c2x-error {{expected identifier or '('}} \ - c2x-error {{expected ')'}} \ - c2x-note {{to match this '('}} - } --Boolean _CFCalendarDecomposeAbsoluteTimeV(const char *componentDesc, int32_t **vector, int32_t count) { // expected-error {{conflicting types}} -+Boolean _CFCalendarDecomposeAbsoluteTimeV(const char *componentDesc, int32_t **vector, int32_t count) { // both-error {{conflicting types}} - return 0; - } - - - // Test the typo-correction callback in Sema::ImplicitlyDefineFunction --extern int sformatf(char *str, __const char *__restrict __format, ...); // expected-note{{'sformatf' declared here}} -+extern int sformatf(char *str, __const char *__restrict __format, ...); // werror-note{{'sformatf' declared here}} - void test_implicit(void) { - int formats = 0; // c2x-note {{'formats' declared here}} -- formatd("Hello, World!\n"); // expected-error{{call to undeclared function 'formatd'; ISO C99 and later do not support implicit function declarations}} \ -- expected-note{{did you mean 'sformatf'?}} \ -+ formatd("Hello, World!\n"); // werror-error{{call to undeclared function 'formatd'; ISO C99 and later do not support implicit function declarations}} \ -+ werror-note{{did you mean 'sformatf'?}} \ -+ expected-warning{{call to undeclared function 'formatd'; ISO C99 and later do not support implicit function declarations}} \ - c2x-error {{use of undeclared identifier 'formatd'; did you mean 'formats'?}} \ - c2x-error {{called object type 'int' is not a function or function pointer}} - } - - void test_suggestion(void) { -- bark(); // expected-error {{call to undeclared function 'bark'; ISO C99 and later do not support implicit function declarations}} \ -+ bark(); // werror-error {{call to undeclared function 'bark'; ISO C99 and later do not support implicit function declarations}} \ -+ expected-warning {{call to undeclared function 'bark'; ISO C99 and later do not support implicit function declarations}} \ - c2x-error {{use of undeclared identifier 'bark'}} -- bork(); // expected-error {{call to undeclared function 'bork'; ISO C99 and later do not support implicit function declarations}} \ -+ bork(); // werror-error {{call to undeclared function 'bork'; ISO C99 and later do not support implicit function declarations}} \ -+ expected-warning {{call to undeclared function 'bork'; ISO C99 and later do not support implicit function declarations}} \ - c2x-error {{use of undeclared identifier 'bork'}} - } -diff --git a/clang/test/Sema/implicit-int.c b/clang/test/Sema/implicit-int.c -index 477cd6977375..a5578cd0f65b 100644 ---- a/clang/test/Sema/implicit-int.c -+++ b/clang/test/Sema/implicit-int.c -@@ -4,18 +4,18 @@ - */ - - foo(void) { /* expected-warning {{type specifier missing, defaults to 'int'}} \ -- ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ -+ ext-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ - unsupported-error {{a type specifier is required for all declarations}} */ - return 0; - } - - y; /* expected-warning {{type specifier missing, defaults to 'int'}} \ -- ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ -+ ext-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ - unsupported-error {{a type specifier is required for all declarations}} */ - - /* rdar://6131634 */ - void f((x)); /* expected-warning {{type specifier missing, defaults to 'int'}} \ -- ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ -+ ext-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ - unsupported-error {{a type specifier is required for all declarations}} */ - - /* PR3702 */ -@@ -26,18 +26,18 @@ void f((x)); /* expected-warning {{type specifier missing, defaults to 'int'}} - #define ILPAD() PAD((NROW - tt.tt_row) * 10) /* 1 ms per char */ - - void --h19_insline(n) /* ext-error {{parameter 'n' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} \ -+h19_insline(n) /* ext-warning {{parameter 'n' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} \ - unsupported-error {{unknown type name 'n'}} */ - { - ILPAD(); /* expected-warning {{type specifier missing, defaults to 'int'}} \ -- ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ -+ ext-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ - unsupported-error {{a type specifier is required for all declarations}} */ - - } - - struct foo { - __extension__ __attribute__((packed)) x : 4; /* expected-warning {{type specifier missing, defaults to 'int'}} \ -- ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ -+ ext-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ - unsupported-error {{unknown type name 'x'}} */ - - }; -diff --git a/clang/test/Sema/implicit-intel-builtin-decl.c b/clang/test/Sema/implicit-intel-builtin-decl.c -index e7d17d9f19b9..1015d9bfe026 100644 ---- a/clang/test/Sema/implicit-intel-builtin-decl.c -+++ b/clang/test/Sema/implicit-intel-builtin-decl.c -@@ -3,26 +3,26 @@ - - void f(void) { - (void)_mm_getcsr(); // cxx-warning{{implicitly declaring library function '_mm_getcsr'}} \ -- c-error{{call to undeclared library function '_mm_getcsr'}} \ -+ c-warning{{call to undeclared library function '_mm_getcsr'}} \ - expected-note{{include the header or explicitly provide a declaration for '_mm_getcsr'}} - _mm_setcsr(1); // cxx-warning{{implicitly declaring library function '_mm_setcsr'}} \ -- c-error{{call to undeclared library function '_mm_setcsr'}} \ -+ c-warning{{call to undeclared library function '_mm_setcsr'}} \ - expected-note{{include the header or explicitly provide a declaration for '_mm_setcsr'}} - _mm_sfence(); // cxx-warning{{implicitly declaring library function '_mm_sfence'}} \ -- c-error{{call to undeclared library function '_mm_sfence'}} \ -+ c-warning{{call to undeclared library function '_mm_sfence'}} \ - expected-note{{include the header or explicitly provide a declaration for '_mm_sfence'}} - - _mm_clflush((void*)0); // cxx-warning{{implicitly declaring library function '_mm_clflush'}} \ -- c-error{{call to undeclared library function '_mm_clflush'}} \ -+ c-warning{{call to undeclared library function '_mm_clflush'}} \ - expected-note{{include the header or explicitly provide a declaration for '_mm_clflush'}} - _mm_lfence(); // cxx-warning{{implicitly declaring library function '_mm_lfence'}} \ -- c-error{{call to undeclared library function '_mm_lfence'}} \ -+ c-warning{{call to undeclared library function '_mm_lfence'}} \ - expected-note{{include the header or explicitly provide a declaration for '_mm_lfence'}} - _mm_mfence(); // cxx-warning{{implicitly declaring library function '_mm_mfence'}} \ -- c-error{{call to undeclared library function '_mm_mfence'}} \ -+ c-warning{{call to undeclared library function '_mm_mfence'}} \ - expected-note{{include the header or explicitly provide a declaration for '_mm_mfence'}} - _mm_pause(); // cxx-warning{{implicitly declaring library function '_mm_pause'}} \ -- c-error{{call to undeclared library function '_mm_pause'}} \ -+ c-warning{{call to undeclared library function '_mm_pause'}} \ - expected-note{{include the header or explicitly provide a declaration for '_mm_pause'}} - } - -diff --git a/clang/test/Sema/implicit-ms-builtin-decl.c b/clang/test/Sema/implicit-ms-builtin-decl.c -index 1294bb6aa9aa..6bb2f6e3b8e2 100644 ---- a/clang/test/Sema/implicit-ms-builtin-decl.c -+++ b/clang/test/Sema/implicit-ms-builtin-decl.c -@@ -2,9 +2,9 @@ - // RUN: %clang_cc1 -triple i386-unknown-unknown -fsyntax-only -verify %s -fms-extensions - - void f(void) { -- (void)_byteswap_ushort(42); // expected-error{{call to undeclared library function '_byteswap_ushort'}} \ -+ (void)_byteswap_ushort(42); // expected-warning{{call to undeclared library function '_byteswap_ushort'}} \ - // expected-note{{include the header or explicitly provide a declaration for '_byteswap_ushort'}} -- (void)_byteswap_uint64(42LL); // expected-error{{call to undeclared library function '_byteswap_uint64'}} \ -+ (void)_byteswap_uint64(42LL); // expected-warning{{call to undeclared library function '_byteswap_uint64'}} \ - // expected-note{{include the header or explicitly provide a declaration for '_byteswap_uint64'}} - } - -@@ -21,9 +21,9 @@ void g(void) { - - #if defined(__x86_64__) - void h(void) { -- (void)__mulh(21, 2); // expected-error{{call to undeclared library function '__mulh'}} \ -+ (void)__mulh(21, 2); // expected-warning{{call to undeclared library function '__mulh'}} \ - // expected-note{{include the header or explicitly provide a declaration for '__mulh'}} -- (void)__umulh(21, 2); // expected-error{{call to undeclared library function '__umulh'}} \ -+ (void)__umulh(21, 2); // expected-warning{{call to undeclared library function '__umulh'}} \ - // expected-note{{include the header or explicitly provide a declaration for '__umulh'}} - } - -@@ -38,7 +38,7 @@ void i(void) { - - #if defined(i386) - void h(void) { -- (void)__mulh(21LL, 2LL); // expected-error{{call to undeclared function '__mulh'; ISO C99 and later do not support implicit function declarations}} -- (void)__umulh(21ULL, 2ULL); // expected-error{{call to undeclared function '__umulh'; ISO C99 and later do not support implicit function declarations}} -+ (void)__mulh(21LL, 2LL); // expected-warning{{call to undeclared function '__mulh'; ISO C99 and later do not support implicit function declarations}} -+ (void)__umulh(21ULL, 2ULL); // expected-warning{{call to undeclared function '__umulh'; ISO C99 and later do not support implicit function declarations}} - } - #endif -diff --git a/clang/test/Sema/invalid-decl.c b/clang/test/Sema/invalid-decl.c -index 4f2680074dcd..ca5fa124e802 100644 ---- a/clang/test/Sema/invalid-decl.c -+++ b/clang/test/Sema/invalid-decl.c -@@ -6,7 +6,7 @@ void test(void) { - - - // PR2400 --typedef xtype (*x)(void* handle); // expected-error {{function cannot return function type}} expected-error 2{{type specifier missing, defaults to 'int'}} -+typedef xtype (*x)(void* handle); // expected-error {{function cannot return function type}} expected-warning 2{{type specifier missing, defaults to 'int'}} - - typedef void ytype(); - -diff --git a/clang/test/Sema/invalid-struct-init.c b/clang/test/Sema/invalid-struct-init.c -index 72f6bbae12ab..0dd00b55ea21 100644 ---- a/clang/test/Sema/invalid-struct-init.c -+++ b/clang/test/Sema/invalid-struct-init.c -@@ -3,7 +3,7 @@ - typedef struct _zend_module_entry zend_module_entry; - struct _zend_module_entry { - _efree((p)); // expected-error{{type name requires a specifier or qualifier}} \ -- expected-error {{type specifier missing, defaults to 'int'}} -+ expected-warning {{type specifier missing, defaults to 'int'}} - - }; - typedef struct _zend_function_entry { } zend_function_entry; -diff --git a/clang/test/Sema/redefinition.c b/clang/test/Sema/redefinition.c -index 7e690e1a917d..28f7f02bb251 100644 ---- a/clang/test/Sema/redefinition.c -+++ b/clang/test/Sema/redefinition.c -@@ -4,7 +4,7 @@ int f(int); - int f(int a) { return 0; } // expected-error {{redefinition of 'f'}} - - // --int foo(x) { // expected-error {{parameter 'x' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} -+int foo(x) { // expected-warning {{parameter 'x' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} - return 0; - } - int x = 1; -diff --git a/clang/test/Sema/typo-correction.c b/clang/test/Sema/typo-correction.c -index ceab0e2634c5..4048488528d4 100644 ---- a/clang/test/Sema/typo-correction.c -+++ b/clang/test/Sema/typo-correction.c -@@ -10,11 +10,11 @@ void PR21656(void) { - x = (float)arst; // expected-error-re {{use of undeclared identifier 'arst'{{$}}}} - } - --a = b ? : 0; // expected-error {{type specifier missing, defaults to 'int'}} \ -+a = b ? : 0; // expected-warning {{type specifier missing, defaults to 'int'}} \ - // expected-error {{use of undeclared identifier 'b'}} - - int foobar; // expected-note {{'foobar' declared here}} --new_a = goobar ?: 4; // expected-error {{type specifier missing, defaults to 'int'}} \ -+new_a = goobar ?: 4; // expected-warning {{type specifier missing, defaults to 'int'}} \ - // expected-error {{use of undeclared identifier 'goobar'; did you mean 'foobar'?}} \ - // expected-error {{initializer element is not a compile-time constant}} - -@@ -37,7 +37,7 @@ int c11Generic(int arg) { - - typedef long long __m128i __attribute__((__vector_size__(16))); - int PR23101(__m128i __x) { -- return foo((__v2di)__x); // expected-error {{call to undeclared function 'foo'; ISO C99 and later do not support implicit function declarations}} \ -+ return foo((__v2di)__x); // expected-warning {{call to undeclared function 'foo'; ISO C99 and later do not support implicit function declarations}} \ - // expected-error {{use of undeclared identifier '__v2di'}} - } - -diff --git a/clang/test/Sema/varargs.c b/clang/test/Sema/varargs.c -index 2cb7270f604a..ebab2c9cd8b5 100644 ---- a/clang/test/Sema/varargs.c -+++ b/clang/test/Sema/varargs.c -@@ -114,7 +114,7 @@ void f13(enum E1 e, ...) { - } - - void f14(int e, ...) { -- // expected-error@+3 {{call to undeclared library function 'va_start'}} -+ // expected-warning@+3 {{call to undeclared library function 'va_start'}} - // expected-note@+2 {{include the header }} - // expected-error@+1 {{too few arguments to function call}} - va_start(); -diff --git a/clang/test/Sema/vla.c b/clang/test/Sema/vla.c -index c6d61aac4515..73e24e90beea 100644 ---- a/clang/test/Sema/vla.c -+++ b/clang/test/Sema/vla.c -@@ -72,7 +72,7 @@ int TransformBug(int a) { - // PR36157 - struct { - int a[ // expected-error {{variable length array in struct}} -- implicitly_declared() // expected-error {{call to undeclared function 'implicitly_declared'; ISO C99 and later do not support implicit function declarations}} -+ implicitly_declared() // expected-warning {{call to undeclared function 'implicitly_declared'; ISO C99 and later do not support implicit function declarations}} - ]; - }; - int (*use_implicitly_declared)(void) = implicitly_declared; // ok, was implicitly declared at file scope -diff --git a/clang/test/SemaObjC/builtin_objc_lib_functions.m b/clang/test/SemaObjC/builtin_objc_lib_functions.m -index 211c47246460..bda2f62678c0 100644 ---- a/clang/test/SemaObjC/builtin_objc_lib_functions.m -+++ b/clang/test/SemaObjC/builtin_objc_lib_functions.m -@@ -1,29 +1,29 @@ - // RUN: %clang_cc1 -x objective-c %s -fsyntax-only -verify - // rdar://8592641 --Class f0(void) { return objc_getClass("a"); } // expected-error {{call to undeclared library function 'objc_getClass' with type 'id (const char *)'}} \ -+Class f0(void) { return objc_getClass("a"); } // expected-warning {{call to undeclared library function 'objc_getClass' with type 'id (const char *)'}} \ - // expected-note {{include the header or explicitly provide a declaration for 'objc_getClass'}} - - // rdar://8735023 --Class f1(void) { return objc_getMetaClass("a"); } // expected-error {{call to undeclared library function 'objc_getMetaClass' with type 'id (const char *)'}} \ -+Class f1(void) { return objc_getMetaClass("a"); } // expected-warning {{call to undeclared library function 'objc_getMetaClass' with type 'id (const char *)'}} \ - // expected-note {{include the header or explicitly provide a declaration for 'objc_getMetaClass'}} - --void f2(id val) { objc_enumerationMutation(val); } // expected-error {{call to undeclared library function 'objc_enumerationMutation' with type 'void (id)'}} \ -+void f2(id val) { objc_enumerationMutation(val); } // expected-warning {{call to undeclared library function 'objc_enumerationMutation' with type 'void (id)'}} \ - // expected-note {{include the header or explicitly provide a declaration for 'objc_enumerationMutation'}} - --long double f3(id self, SEL op) { return objc_msgSend_fpret(self, op); } // expected-error {{call to undeclared library function 'objc_msgSend_fpret' with type 'long double (id, SEL, ...)'}} \ -+long double f3(id self, SEL op) { return objc_msgSend_fpret(self, op); } // expected-warning {{call to undeclared library function 'objc_msgSend_fpret' with type 'long double (id, SEL, ...)'}} \ - // expected-note {{include the header or explicitly provide a declaration for 'objc_msgSend_fpret'}} - - id f4(struct objc_super *super, SEL op) { // expected-warning {{declaration of 'struct objc_super' will not be visible outside of this function}} -- return objc_msgSendSuper(super, op); // expected-error {{call to undeclared library function 'objc_msgSendSuper' with type 'id (struct objc_super *, SEL, ...)'}} \ -+ return objc_msgSendSuper(super, op); // expected-warning {{call to undeclared library function 'objc_msgSendSuper' with type 'id (struct objc_super *, SEL, ...)'}} \ - // expected-note {{include the header or explicitly provide a declaration for 'objc_msgSendSuper'}} - } - - id f5(id val, id *dest) { -- return objc_assign_strongCast(val, dest); // expected-error {{call to undeclared library function 'objc_assign_strongCast' with type 'id (id, id *)'}} \ -+ return objc_assign_strongCast(val, dest); // expected-warning {{call to undeclared library function 'objc_assign_strongCast' with type 'id (id, id *)'}} \ - // expected-note {{include the header or explicitly provide a declaration for 'objc_assign_strongCast'}} - } - - int f6(Class exceptionClass, id exception) { -- return objc_exception_match(exceptionClass, exception); // expected-error {{call to undeclared library function 'objc_exception_match' with type 'int (id, id)'}} \ -+ return objc_exception_match(exceptionClass, exception); // expected-warning {{call to undeclared library function 'objc_exception_match' with type 'int (id, id)'}} \ - // expected-note {{include the header or explicitly provide a declaration for 'objc_exception_match'}} - } -diff --git a/clang/test/SemaObjC/builtin_objc_nslog.m b/clang/test/SemaObjC/builtin_objc_nslog.m -index 3c35a02d9b8a..ad7873fe1d47 100644 ---- a/clang/test/SemaObjC/builtin_objc_nslog.m -+++ b/clang/test/SemaObjC/builtin_objc_nslog.m -@@ -3,11 +3,11 @@ - #include - - void f1(id arg) { -- NSLog(@"%@", arg); // expected-error {{call to undeclared library function 'NSLog' with type 'void (id, ...)'}} \ -+ NSLog(@"%@", arg); // expected-warning {{call to undeclared library function 'NSLog' with type 'void (id, ...)'}} \ - // expected-note {{include the header or explicitly provide a declaration for 'NSLog'}} - } - - void f2(id str, va_list args) { -- NSLogv(@"%@", args); // expected-error {{call to undeclared library function 'NSLogv' with type }} \ -+ NSLogv(@"%@", args); // expected-warning {{call to undeclared library function 'NSLogv' with type }} \ - // expected-note {{include the header or explicitly provide a declaration for 'NSLogv'}} - } -diff --git a/clang/test/SemaObjC/ivar-lookup-resolution-builtin.m b/clang/test/SemaObjC/ivar-lookup-resolution-builtin.m -index 09d69aca9f93..bbb1b4f6a168 100644 ---- a/clang/test/SemaObjC/ivar-lookup-resolution-builtin.m -+++ b/clang/test/SemaObjC/ivar-lookup-resolution-builtin.m -@@ -28,7 +28,7 @@ - @implementation Test1 - - (int) InstMethod - { -- return index; // expected-error {{call to undeclared library function 'index'}} \ -+ return index; // expected-warning {{call to undeclared library function 'index'}} \ - // expected-note {{include the header or explicitly provide a declaration for 'index'}} \ - // expected-error {{incompatible pointer to integer conversion returning}} - } -diff --git a/clang/test/SemaObjC/protocols.m b/clang/test/SemaObjC/protocols.m -index ebb9b634b4b6..eb2734100769 100644 ---- a/clang/test/SemaObjC/protocols.m -+++ b/clang/test/SemaObjC/protocols.m -@@ -62,6 +62,6 @@ - @end - - @protocol P --- (int)test:(int)param, ..; // expected-error{{type specifier missing}} \ -+- (int)test:(int)param, ..; // expected-warning{{type specifier missing}} \ - // expected-error{{expected ';' after method prototype}} - @end -diff --git a/clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl b/clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl -index 2ea6d3bc4862..9e2869af87b4 100644 ---- a/clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl -+++ b/clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl -@@ -10,7 +10,7 @@ void foo(read_only pipe int p); - // expected-error@-5 {{C++ for OpenCL version 2021 does not support the 'pipe' type qualifier}} - // expected-error@-6 {{access qualifier can only be used for pipe and image type}} - #else --// expected-error@-8 {{type specifier missing, defaults to 'int'}} -+// expected-warning@-8 {{type specifier missing, defaults to 'int'}} - // expected-error@-9 {{access qualifier can only be used for pipe and image type}} - // expected-error@-10 {{expected ')'}} expected-note@-10 {{to match this '('}} - #endif --- -2.37.2 - diff --git a/clang.spec b/clang.spec index 0391523..11164c7 100644 --- a/clang.spec +++ b/clang.spec @@ -5,7 +5,7 @@ %global maj_ver 15 %global min_ver 0 -%global patch_ver 0 +%global patch_ver 4 #global rc_ver 3 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} @@ -41,7 +41,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 6%{?dist} +Release: 1%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -72,10 +72,6 @@ Patch7: 0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch # TODO: Can be dropped in LLVM 16: https://reviews.llvm.org/D134362 Patch8: 0001-clang-Fix-interaction-between-asm-labels-and-inline-.patch -# Backport of https://reviews.llvm.org/D133800 to the 15.0.0 release. -# TODO: Drop once updating to 15.0.1 or newer. -Patch9: 0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch - %if %{without compat_build} # Patches for clang-tools-extra # See https://reviews.llvm.org/D120301 @@ -608,6 +604,9 @@ false %endif %changelog +* Thu Nov 03 2022 Nikita Popov - 15.0.4-1 +- Update to LLVM 15.0.4 + * Wed Oct 19 2022 Nikita Popov - 15.0.0-6 - Enable ieeelongdouble for ppc64le, fix rhbz#2136099 diff --git a/sources b/sources index 4ace6b5..d222b90 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-tools-extra-15.0.0.src.tar.xz) = 74e42df5a5496eacb69f172ac77a33fdf19be63cdab22c6bf5f7a9acdf9742bd48f8ee791cdf8bb14c17df9ba1e3b07c6e95ac68c62e4180acbd510fa971da49 -SHA512 (clang-tools-extra-15.0.0.src.tar.xz.sig) = b6adbffa21483f125fbe2712d7d20df9be2d05ea354f170b5d08f80499fdcf2eb37a4f2e5781dfdce124687fb94935f535aea37ff2d5ab6d81ffe88324a9272f -SHA512 (clang-15.0.0.src.tar.xz) = cf6eab1bd4623e0bcf844839f5008ec49f83c9b4eb145de21798125a2c8798909007ed7c74a2ade1eed4b210a62750411b8dcad37263148a5ffca81988cf7dc4 -SHA512 (clang-15.0.0.src.tar.xz.sig) = 6c15f4783512c402079af42f1ae55a9d3e03f622bbda5bd789e8902ef03a365d75d3765d4bf50975a75f116e72e780a5226ab2ad3e145c83a1cbf65fdee8d271 +SHA512 (clang-tools-extra-15.0.4.src.tar.xz) = a9969a55449a6d6eecab5bda071304c0cb804674795b643a53ad113b96bf5382678270bde47f1cd061b88156e3477ab2932f1c8e8926b7eb84dc7683341ce6e9 +SHA512 (clang-tools-extra-15.0.4.src.tar.xz.sig) = 561bd572e8ce702e558bda37bd9739ceabc61865c65419ab8f575e45f75f4c244eb9617a1595b2379625c2a5649a3dd52aa66662505b294731f02663e303a7dd +SHA512 (clang-15.0.4.src.tar.xz) = 408061a0331799e8d6313dea75ba8f811daea43277b3d3f078daa694bc7e9eb9dbe9060824f6281417ca6804498359c5a8195f5a6c1949eaa3a9bab0e8c11649 +SHA512 (clang-15.0.4.src.tar.xz.sig) = 7c41fcf79218e30b6f37114bcb0b778c62de8e4fefe9889143de9a689d422b4ee50de49b7a50109cd21daea056e4eefb6f6de121889dfe40f4ef9a593758dde3 From 71aa74debd07c6b2c1db6687133b33e9b12a83d5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 4 Nov 2022 16:04:45 +0100 Subject: [PATCH 15/77] Build test deps separately to avoid LD_LIBRARY_PATH interference Otherwise invocations of host clang will use the newly built libraries, which will use a non-existent resource directory, and thus cause headers like stddef.h not to be found. --- clang.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clang.spec b/clang.spec index 11164c7..5927730 100644 --- a/clang.spec +++ b/clang.spec @@ -469,6 +469,10 @@ ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format %check %if %{without compat_build} %if %{with check} +# Build test dependencies separately, to prevent invocations of host clang from being affected +# by LD_LIBRARY_PATH below. +%cmake_build --target clang-test-depends \ + ExtraToolsUnitTests ClangdUnitTests ClangIncludeCleanerUnitTests ClangPseudoUnitTests # requires lit.py from LLVM utilities # FIXME: Fix failing ARM tests LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} check-all -C %{__cmake_builddir} || \ From 5af8b98903e37e7c838cda0d192ce8ac93398d01 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Mon, 28 Nov 2022 12:23:26 +0100 Subject: [PATCH 16/77] build-gating.fmf: add brp-llvm-compile-lto-elf test from redhat-rpm-config to gating test plan --- tests/build-gating.fmf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/build-gating.fmf b/tests/build-gating.fmf index ae4fdb3..573c843 100644 --- a/tests/build-gating.fmf +++ b/tests/build-gating.fmf @@ -58,6 +58,11 @@ discover: url: https://src.fedoraproject.org/tests/llvm.git ref: main test: integration-test-suite + - name: redhat-rpm-config + how: fmf + url: https://src.fedoraproject.org/rpms/redhat-rpm-config.git + ref: rawhide + test: brp-llvm-compile-lto-elf execute: how: tmt provision: From e132ea80d7fd98e89ebcb9acc7075172dc5159de Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 5 Dec 2022 13:05:14 +0100 Subject: [PATCH 17/77] Update to LLVM 15.0.6 --- .gitignore | 4 ++++ clang.spec | 5 ++++- sources | 8 ++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index da3e479..3d7469c 100644 --- a/.gitignore +++ b/.gitignore @@ -227,3 +227,7 @@ /clang-tools-extra-15.0.4.src.tar.xz.sig /clang-15.0.4.src.tar.xz /clang-15.0.4.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/clang.spec b/clang.spec index 5927730..955ef40 100644 --- a/clang.spec +++ b/clang.spec @@ -5,7 +5,7 @@ %global maj_ver 15 %global min_ver 0 -%global patch_ver 4 +%global patch_ver 6 #global rc_ver 3 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} @@ -608,6 +608,9 @@ false %endif %changelog +* Mon Dec 05 2022 Nikita Popov - 15.0.6-1 +- Update to LLVM 15.0.6 + * Thu Nov 03 2022 Nikita Popov - 15.0.4-1 - Update to LLVM 15.0.4 diff --git a/sources b/sources index d222b90..26e1efa 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-tools-extra-15.0.4.src.tar.xz) = a9969a55449a6d6eecab5bda071304c0cb804674795b643a53ad113b96bf5382678270bde47f1cd061b88156e3477ab2932f1c8e8926b7eb84dc7683341ce6e9 -SHA512 (clang-tools-extra-15.0.4.src.tar.xz.sig) = 561bd572e8ce702e558bda37bd9739ceabc61865c65419ab8f575e45f75f4c244eb9617a1595b2379625c2a5649a3dd52aa66662505b294731f02663e303a7dd -SHA512 (clang-15.0.4.src.tar.xz) = 408061a0331799e8d6313dea75ba8f811daea43277b3d3f078daa694bc7e9eb9dbe9060824f6281417ca6804498359c5a8195f5a6c1949eaa3a9bab0e8c11649 -SHA512 (clang-15.0.4.src.tar.xz.sig) = 7c41fcf79218e30b6f37114bcb0b778c62de8e4fefe9889143de9a689d422b4ee50de49b7a50109cd21daea056e4eefb6f6de121889dfe40f4ef9a593758dde3 +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 From 64ea1d4d0ff9e66ec6c00739b1bb25bf9965f089 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Tue, 6 Dec 2022 10:01:09 +0100 Subject: [PATCH 18/77] explicitly define directories for compat builds --- clang.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index 955ef40..e9d883c 100644 --- a/clang.spec +++ b/clang.spec @@ -332,7 +332,7 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py %endif %if %{with compat_build} -DCLANG_BUILD_TOOLS:BOOL=OFF \ - -DLLVM_CONFIG:FILEPATH=%{pkg_bindir}/llvm-config-%{maj_ver}-%{__isa_bits} \ + -DLLVM_CMAKE_DIR=%{install_libdir}/cmake/llvm \ -DCMAKE_INSTALL_PREFIX=%{install_prefix} \ -DCLANG_INCLUDE_TESTS:BOOL=OFF \ %else From daa332df14291ad12d5978283ea9071a07a45529 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 12 Dec 2022 10:50:36 +0100 Subject: [PATCH 19/77] Backport patches for ucrt64 toolchain detection --- ...ove-extend-the-gcc-sysroot-detection.patch | 280 ++++++++++++++++++ ...ove-detection-of-libstdc-headers-on-.patch | 139 +++++++++ clang.spec | 9 +- 3 files changed, 427 insertions(+), 1 deletion(-) create mode 100644 0001-clang-MinGW-Improve-extend-the-gcc-sysroot-detection.patch create mode 100644 0002-clang-MinGW-Improve-detection-of-libstdc-headers-on-.patch diff --git a/0001-clang-MinGW-Improve-extend-the-gcc-sysroot-detection.patch b/0001-clang-MinGW-Improve-extend-the-gcc-sysroot-detection.patch new file mode 100644 index 0000000..7f54d32 --- /dev/null +++ b/0001-clang-MinGW-Improve-extend-the-gcc-sysroot-detection.patch @@ -0,0 +1,280 @@ +From efe3686d4a519b357cecb5aaf715f1e1b6f2d025 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Martin=20Storsj=C3=B6?= +Date: Tue, 22 Nov 2022 14:38:54 +0200 +Subject: [PATCH 1/2] [clang] [MinGW] Improve/extend the gcc/sysroot detection + logic + +There are three functions that try to detect the right implicit +sysroot and libgcc directory setup to use +- One which looks for mingw sysroots located in + /../ +- One which looks for a mingw-targeting gcc executables in the PATH +- One which looks in the /lib/gcc directory to find the + right one to use, and the right specific triple used for arch + specific directories in the gcc/libstdc++ install + +These have mostly tried to look for executables named +"-w64-mingw32-gcc" or "mingw32-gcc" or subdirectories +named "-w64-mingw32" or "mingw32". + +In the case of findClangRelativeSysroot, it also has looked +for directories with the name of the actual triple. This +was added in deff7536278d355977171726124f83aa4bb95419, +with the intent of looking for a directory matching exactly +the user provided literal triple - however the triple here +is the normalized one, not the one provided by the user on +the command line. + +Improve and unify this logic somewhat: +- Always first look for things based on the literal triple + provided by the user. +- Secondly look for things based on the normalized triple + (which usually ends up as e.g. x86_64-w64-windows-gnu), + accessed via the Triple which is passed to the constructor +- Then look for the common triple form -w64-mingw32 + +The literal triple provided by the user is available via +Driver::getTargetTriple(), but computeTargetTriple() may +change e.g. the architecture of it, so we need to +reapply the effective architecture on the literal triple +spelling from Driver::getTargetTriple(). + +Do this consistently for all of findGcc, findClangRelativeSysroot +and findGccLibDir (while keeping the existing plain "mingw32" +cases in findGcc and findGccLibDir too). + +Fedora 37 started shipping mingw sysroots targeting UCRT, +in addition to the traditional msvcrt.dll, and these use +triples in the form -w64-mingw32ucrt - see +https://fedoraproject.org/wiki/Changes/F37MingwUCRT. + +Thus, in addition to the existing default tested triples, +try looking for triples in the form -w64-mingw32ucrt, +to automatically find the UCRT sysroots on Fedora 37. +By explicitly setting a specific target on the Clang command +line, the user can be more explicit with which flavour is +to be preferred. + +This should fix the main issue in +https://github.com/llvm/llvm-project/issues/59001. + +Differential Revision: https://reviews.llvm.org/D138692 +--- + clang/lib/Driver/ToolChains/MinGW.cpp | 68 ++++++++++++++----- + clang/lib/Driver/ToolChains/MinGW.h | 2 +- + .../12.2.1/include-fixed/.keep | 0 + .../sys-root/mingw/include/.keep | 0 + .../sys-root/mingw/include/c++/backward/.keep | 0 + .../include/c++/x86_64-w64-mingw32ucrt/.keep | 0 + clang/test/Driver/mingw-sysroot.cpp | 13 ++++ + clang/test/Driver/mingw.cpp | 4 ++ + 8 files changed, 68 insertions(+), 19 deletions(-) + create mode 100644 clang/test/Driver/Inputs/mingw_fedora_tree/usr/lib/gcc/x86_64-w64-mingw32ucrt/12.2.1/include-fixed/.keep + create mode 100644 clang/test/Driver/Inputs/mingw_fedora_tree/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/.keep + create mode 100644 clang/test/Driver/Inputs/mingw_fedora_tree/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/backward/.keep + create mode 100644 clang/test/Driver/Inputs/mingw_fedora_tree/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/x86_64-w64-mingw32ucrt/.keep + +diff --git a/clang/lib/Driver/ToolChains/MinGW.cpp b/clang/lib/Driver/ToolChains/MinGW.cpp +index ae7c4c56bf9e..0ebacea6e87f 100644 +--- a/clang/lib/Driver/ToolChains/MinGW.cpp ++++ b/clang/lib/Driver/ToolChains/MinGW.cpp +@@ -359,13 +359,26 @@ static bool findGccVersion(StringRef LibDir, std::string &GccLibDir, + return Ver.size(); + } + +-void toolchains::MinGW::findGccLibDir() { +- llvm::SmallVector, 2> SubdirNames; ++static llvm::Triple getLiteralTriple(const Driver &D, const llvm::Triple &T) { ++ llvm::Triple LiteralTriple(D.getTargetTriple()); ++ // The arch portion of the triple may be overridden by -m32/-m64. ++ LiteralTriple.setArchName(T.getArchName()); ++ return LiteralTriple; ++} ++ ++void toolchains::MinGW::findGccLibDir(const llvm::Triple &LiteralTriple) { ++ llvm::SmallVector, 5> SubdirNames; ++ SubdirNames.emplace_back(LiteralTriple.str()); ++ SubdirNames.emplace_back(getTriple().str()); + SubdirNames.emplace_back(getTriple().getArchName()); +- SubdirNames[0] += "-w64-mingw32"; ++ SubdirNames.back() += "-w64-mingw32"; ++ SubdirNames.emplace_back(getTriple().getArchName()); ++ SubdirNames.back() += "-w64-mingw32ucrt"; + SubdirNames.emplace_back("mingw32"); +- if (SubdirName.empty()) +- SubdirName = std::string(SubdirNames[0].str()); ++ if (SubdirName.empty()) { ++ SubdirName = getTriple().getArchName(); ++ SubdirName += "-w64-mingw32"; ++ } + // lib: Arch Linux, Ubuntu, Windows + // lib64: openSUSE Linux + for (StringRef CandidateLib : {"lib", "lib64"}) { +@@ -380,10 +393,17 @@ void toolchains::MinGW::findGccLibDir() { + } + } + +-static llvm::ErrorOr findGcc(const llvm::Triple &T) { +- llvm::SmallVector, 2> Gccs; ++static llvm::ErrorOr findGcc(const llvm::Triple &LiteralTriple, ++ const llvm::Triple &T) { ++ llvm::SmallVector, 5> Gccs; ++ Gccs.emplace_back(LiteralTriple.str()); ++ Gccs.back() += "-gcc"; ++ Gccs.emplace_back(T.str()); ++ Gccs.back() += "-gcc"; + Gccs.emplace_back(T.getArchName()); +- Gccs[0] += "-w64-mingw32-gcc"; ++ Gccs.back() += "-w64-mingw32-gcc"; ++ Gccs.emplace_back(T.getArchName()); ++ Gccs.back() += "-w64-mingw32ucrt-gcc"; + Gccs.emplace_back("mingw32-gcc"); + // Please do not add "gcc" here + for (StringRef CandidateGcc : Gccs) +@@ -393,12 +413,15 @@ static llvm::ErrorOr findGcc(const llvm::Triple &T) { + } + + static llvm::ErrorOr +-findClangRelativeSysroot(const Driver &D, const llvm::Triple &T, +- std::string &SubdirName) { +- llvm::SmallVector, 2> Subdirs; ++findClangRelativeSysroot(const Driver &D, const llvm::Triple &LiteralTriple, ++ const llvm::Triple &T, std::string &SubdirName) { ++ llvm::SmallVector, 4> Subdirs; ++ Subdirs.emplace_back(LiteralTriple.str()); + Subdirs.emplace_back(T.str()); + Subdirs.emplace_back(T.getArchName()); +- Subdirs[1] += "-w64-mingw32"; ++ Subdirs.back() += "-w64-mingw32"; ++ Subdirs.emplace_back(T.getArchName()); ++ Subdirs.back() += "-w64-mingw32ucrt"; + StringRef ClangRoot = llvm::sys::path::parent_path(D.getInstalledDir()); + StringRef Sep = llvm::sys::path::get_separator(); + for (StringRef CandidateSubdir : Subdirs) { +@@ -418,14 +441,16 @@ toolchains::MinGW::MinGW(const Driver &D, const llvm::Triple &Triple, + + // The sequence for detecting a sysroot here should be kept in sync with + // the testTriple function below. ++ llvm::Triple LiteralTriple = getLiteralTriple(D, getTriple()); + if (getDriver().SysRoot.size()) + Base = getDriver().SysRoot; + // Look for /../; if found, use /.. as the + // base as it could still be a base for a gcc setup with libgcc. +- else if (llvm::ErrorOr TargetSubdir = +- findClangRelativeSysroot(getDriver(), getTriple(), SubdirName)) ++ else if (llvm::ErrorOr TargetSubdir = findClangRelativeSysroot( ++ getDriver(), LiteralTriple, getTriple(), SubdirName)) + Base = std::string(llvm::sys::path::parent_path(TargetSubdir.get())); +- else if (llvm::ErrorOr GPPName = findGcc(getTriple())) ++ else if (llvm::ErrorOr GPPName = ++ findGcc(LiteralTriple, getTriple())) + Base = std::string(llvm::sys::path::parent_path( + llvm::sys::path::parent_path(GPPName.get()))); + else +@@ -433,7 +458,7 @@ toolchains::MinGW::MinGW(const Driver &D, const llvm::Triple &Triple, + llvm::sys::path::parent_path(getDriver().getInstalledDir())); + + Base += llvm::sys::path::get_separator(); +- findGccLibDir(); ++ findGccLibDir(LiteralTriple); + // GccLibDir must precede Base/lib so that the + // correct crtbegin.o ,cetend.o would be found. + getFilePaths().push_back(GccLibDir); +@@ -576,6 +601,12 @@ void toolchains::MinGW::printVerboseInfo(raw_ostream &OS) const { + // /usr/include/c++/4.8/backward + // /usr/x86_64-w64-mingw32/include + ++// Fedora ++// /usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/x86_64-w64-mingw32ucrt ++// /usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/backward ++// /usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include ++// /usr/lib/gcc/x86_64-w64-mingw32ucrt/12.2.1/include-fixed ++ + void toolchains::MinGW::AddClangSystemIncludeArgs(const ArgList &DriverArgs, + ArgStringList &CC1Args) const { + if (DriverArgs.hasArg(options::OPT_nostdinc)) +@@ -667,10 +698,11 @@ static bool testTriple(const Driver &D, const llvm::Triple &Triple, + std::string SubdirName; + if (D.SysRoot.size()) + return true; ++ llvm::Triple LiteralTriple = getLiteralTriple(D, Triple); + if (llvm::ErrorOr TargetSubdir = +- findClangRelativeSysroot(D, Triple, SubdirName)) ++ findClangRelativeSysroot(D, LiteralTriple, Triple, SubdirName)) + return true; +- if (llvm::ErrorOr GPPName = findGcc(Triple)) ++ if (llvm::ErrorOr GPPName = findGcc(LiteralTriple, Triple)) + return true; + // If we neither found a colocated sysroot or a matching gcc executable, + // conclude that we can't know if this is the correct spelling of the triple. +diff --git a/clang/lib/Driver/ToolChains/MinGW.h b/clang/lib/Driver/ToolChains/MinGW.h +index f15f99dc8a8c..bc17d273e776 100644 +--- a/clang/lib/Driver/ToolChains/MinGW.h ++++ b/clang/lib/Driver/ToolChains/MinGW.h +@@ -108,7 +108,7 @@ private: + std::string SubdirName; + mutable std::unique_ptr Preprocessor; + mutable std::unique_ptr Compiler; +- void findGccLibDir(); ++ void findGccLibDir(const llvm::Triple &LiteralTriple); + + bool NativeLLVMSupport; + }; +diff --git a/clang/test/Driver/Inputs/mingw_fedora_tree/usr/lib/gcc/x86_64-w64-mingw32ucrt/12.2.1/include-fixed/.keep b/clang/test/Driver/Inputs/mingw_fedora_tree/usr/lib/gcc/x86_64-w64-mingw32ucrt/12.2.1/include-fixed/.keep +new file mode 100644 +index 000000000000..e69de29bb2d1 +diff --git a/clang/test/Driver/Inputs/mingw_fedora_tree/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/.keep b/clang/test/Driver/Inputs/mingw_fedora_tree/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/.keep +new file mode 100644 +index 000000000000..e69de29bb2d1 +diff --git a/clang/test/Driver/Inputs/mingw_fedora_tree/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/backward/.keep b/clang/test/Driver/Inputs/mingw_fedora_tree/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/backward/.keep +new file mode 100644 +index 000000000000..e69de29bb2d1 +diff --git a/clang/test/Driver/Inputs/mingw_fedora_tree/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/x86_64-w64-mingw32ucrt/.keep b/clang/test/Driver/Inputs/mingw_fedora_tree/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/x86_64-w64-mingw32ucrt/.keep +new file mode 100644 +index 000000000000..e69de29bb2d1 +diff --git a/clang/test/Driver/mingw-sysroot.cpp b/clang/test/Driver/mingw-sysroot.cpp +index 1cb51b3aea2d..985be9e5f2ac 100644 +--- a/clang/test/Driver/mingw-sysroot.cpp ++++ b/clang/test/Driver/mingw-sysroot.cpp +@@ -14,6 +14,11 @@ + // RUN: ln -s %S/Inputs/mingw_ubuntu_posix_tree/usr/x86_64-w64-mingw32 %T/testroot-clang/x86_64-w64-mingw32 + // RUN: ln -s %S/Inputs/mingw_arch_tree/usr/i686-w64-mingw32 %T/testroot-clang/i686-w64-mingw32 + ++// RUN: rm -rf %T/testroot-custom-triple ++// RUN: mkdir -p %T/testroot-custom-triple/bin ++// RUN: ln -s %clang %T/testroot-custom-triple/bin/x86_64-w64-mingw32foo-clang ++// RUN: ln -s %clang %T/testroot-custom-triple/bin/clang ++// RUN: ln -s %S/Inputs/mingw_ubuntu_posix_tree/usr/x86_64-w64-mingw32 %T/testroot-custom-triple/x86_64-w64-mingw32foo + + // If we find a gcc in the path with the right triplet prefix, pick that as + // sysroot: +@@ -51,3 +56,11 @@ + + // RUN: env "PATH=%T/testroot-gcc/bin:%PATH%" %T/testroot-clang/bin/x86_64-w64-mingw32-clang --target=x86_64-w64-mingw32 -m32 -rtlib=compiler-rt -stdlib=libstdc++ --sysroot="" -c -### %s 2>&1 | FileCheck -check-prefix=CHECK_TESTROOT_CLANG_I686 %s + // CHECK_TESTROOT_CLANG_I686: "{{[^"]+}}/testroot-clang{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include" ++ ++ ++// If the user calls clang with a custom literal triple, make sure this maps ++// to sysroots with the matching spelling. ++ ++// RUN: %T/testroot-custom-triple/bin/x86_64-w64-mingw32foo-clang -rtlib=compiler-rt -stdlib=libstdc++ --sysroot="" -c -### %s 2>&1 | FileCheck -check-prefix=CHECK_TESTROOT_CUSTOM_TRIPLE %s ++// RUN: %T/testroot-custom-triple/bin/clang --target=x86_64-w64-mingw32foo -rtlib=compiler-rt -stdlib=libstdc++ --sysroot="" -c -### %s 2>&1 | FileCheck -check-prefix=CHECK_TESTROOT_CUSTOM_TRIPLE %s ++// CHECK_TESTROOT_CUSTOM_TRIPLE: "{{[^"]+}}/testroot-custom-triple{{/|\\\\}}x86_64-w64-mingw32foo{{/|\\\\}}include" +diff --git a/clang/test/Driver/mingw.cpp b/clang/test/Driver/mingw.cpp +index b37503e475d8..bde952fb3565 100644 +--- a/clang/test/Driver/mingw.cpp ++++ b/clang/test/Driver/mingw.cpp +@@ -39,6 +39,10 @@ + // CHECK_MINGW_OPENSUSE_TREE: "[[BASE]]/Inputs/mingw_opensuse_tree/usr{{/|\\\\}}x86_64-w64-mingw32/sys-root/mingw/include" + + ++// RUN: %clang -target x86_64-pc-windows-gnu -rtlib=platform -stdlib=libstdc++ -c -### --sysroot=%S/Inputs/mingw_fedora_tree/usr %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_FEDORA_TREE %s ++// CHECK_MINGW_FEDORA_TREE: "[[BASE:[^"]+]]/Inputs/mingw_fedora_tree/usr{{/|\\\\}}x86_64-w64-mingw32ucrt/sys-root/mingw/include" ++ ++ + // RUN: %clang -target i686-pc-windows-gnu -rtlib=platform -stdlib=libstdc++ -c -### --sysroot=%S/Inputs/mingw_arch_tree/usr %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_ARCH_TREE %s + // CHECK_MINGW_ARCH_TREE: "[[BASE:[^"]+]]/Inputs/mingw_arch_tree/usr{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}5.1.0" + // CHECK_MINGW_ARCH_TREE: "[[BASE]]/Inputs/mingw_arch_tree/usr{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}5.1.0{{/|\\\\}}i686-w64-mingw32" +-- +2.38.1 + diff --git a/0002-clang-MinGW-Improve-detection-of-libstdc-headers-on-.patch b/0002-clang-MinGW-Improve-detection-of-libstdc-headers-on-.patch new file mode 100644 index 0000000..7376d7f --- /dev/null +++ b/0002-clang-MinGW-Improve-detection-of-libstdc-headers-on-.patch @@ -0,0 +1,139 @@ +From d3b79c2950d590cb272648f1c6a9dd7646f57beb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Martin=20Storsj=C3=B6?= +Date: Tue, 22 Nov 2022 14:39:39 +0200 +Subject: [PATCH 2/2] [clang] [MinGW] Improve detection of libstdc++ headers on + Fedora + +There's some variation in where different toolchain distributions +(and linux distributions) package the mingw sysroots - this is +so far handled by adding specific known subdirectory paths +to the include and lib directory lists. + +There are multiple degrees of combinatorics involved here though; +the distros may use different locations such as +/usr/x86_64-w64-mingw32/include or +/usr/x86_64-w64-mingw32/sys-root/mingw/include. + +So far, this setup has been treated as base=/usr, subdir=x86_64-w64-mingw32, +and the driver tries to add further subdirectories such as +//include, //sys-root/mingw/include. + +When it comes to libstdc++ (and libc++), each of these come with +a large number of potential subdirectories. Instead of further +exploding the combinatorics another step by adding all combinations +of all paths, check whether //sys-root/mingw/include +exists, and if it does, append that subpath into the subdir variable. + +This allows finding libstdc++ headers in e.g. +/usr/x86_64-w64-mingw32/sys-root/mingw/include/c++/x86_64-w64-mingw32 +on Fedora. + +The same logic (where everything belonging to this target fits +under one expanded path, with just /include and /lib +under it) doesn't seem to apply on Gentoo, where the includes +are found in //usr/include while the libraries +are in //mingw/lib (see +8e218026f8d5eabfdef9141ae5e26aa91d1933e6). But apparently +the libstdc++ headers aren't installed under +//usr/include, so that path hierarchy quirk doesn't +need to be taken into account in AddClangCXXStdlibIncludeArgs. + +Differential Revision: https://reviews.llvm.org/D138693 +--- + clang/lib/Driver/ToolChains/MinGW.cpp | 19 +++++++++---------- + clang/lib/Driver/ToolChains/MinGW.h | 1 + + clang/test/Driver/mingw.cpp | 5 ++++- + 3 files changed, 14 insertions(+), 11 deletions(-) + +diff --git a/clang/lib/Driver/ToolChains/MinGW.cpp b/clang/lib/Driver/ToolChains/MinGW.cpp +index 0ebacea6e87f..2a9bf4b18f19 100644 +--- a/clang/lib/Driver/ToolChains/MinGW.cpp ++++ b/clang/lib/Driver/ToolChains/MinGW.cpp +@@ -376,7 +376,7 @@ void toolchains::MinGW::findGccLibDir(const llvm::Triple &LiteralTriple) { + SubdirNames.back() += "-w64-mingw32ucrt"; + SubdirNames.emplace_back("mingw32"); + if (SubdirName.empty()) { +- SubdirName = getTriple().getArchName(); ++ SubdirName = getTriple().getArchName().str(); + SubdirName += "-w64-mingw32"; + } + // lib: Arch Linux, Ubuntu, Windows +@@ -459,9 +459,16 @@ toolchains::MinGW::MinGW(const Driver &D, const llvm::Triple &Triple, + + Base += llvm::sys::path::get_separator(); + findGccLibDir(LiteralTriple); ++ TripleDirName = SubdirName; + // GccLibDir must precede Base/lib so that the + // correct crtbegin.o ,cetend.o would be found. + getFilePaths().push_back(GccLibDir); ++ ++ // openSUSE/Fedora ++ std::string CandidateSubdir = SubdirName + "/sys-root/mingw"; ++ if (getDriver().getVFS().exists(Base + CandidateSubdir)) ++ SubdirName = CandidateSubdir; ++ + getFilePaths().push_back( + (Base + SubdirName + llvm::sys::path::get_separator() + "lib").str()); + +@@ -470,8 +477,6 @@ toolchains::MinGW::MinGW(const Driver &D, const llvm::Triple &Triple, + (Base + SubdirName + llvm::sys::path::get_separator() + "mingw/lib").str()); + + getFilePaths().push_back(Base + "lib"); +- // openSUSE +- getFilePaths().push_back(Base + SubdirName + "/sys-root/mingw/lib"); + + NativeLLVMSupport = + Args.getLastArgValue(options::OPT_fuse_ld_EQ, CLANG_DEFAULT_LINKER) +@@ -621,12 +626,6 @@ void toolchains::MinGW::AddClangSystemIncludeArgs(const ArgList &DriverArgs, + if (DriverArgs.hasArg(options::OPT_nostdlibinc)) + return; + +- if (GetRuntimeLibType(DriverArgs) == ToolChain::RLT_Libgcc) { +- // openSUSE +- addSystemInclude(DriverArgs, CC1Args, +- Base + SubdirName + "/sys-root/mingw/include"); +- } +- + addSystemInclude(DriverArgs, CC1Args, + Base + SubdirName + llvm::sys::path::get_separator() + + "include"); +@@ -684,7 +683,7 @@ void toolchains::MinGW::AddClangCXXStdlibIncludeArgs( + for (auto &CppIncludeBase : CppIncludeBases) { + addSystemInclude(DriverArgs, CC1Args, CppIncludeBase); + CppIncludeBase += Slash; +- addSystemInclude(DriverArgs, CC1Args, CppIncludeBase + SubdirName); ++ addSystemInclude(DriverArgs, CC1Args, CppIncludeBase + TripleDirName); + addSystemInclude(DriverArgs, CC1Args, CppIncludeBase + "backward"); + } + break; +diff --git a/clang/lib/Driver/ToolChains/MinGW.h b/clang/lib/Driver/ToolChains/MinGW.h +index bc17d273e776..ef9bfb29e175 100644 +--- a/clang/lib/Driver/ToolChains/MinGW.h ++++ b/clang/lib/Driver/ToolChains/MinGW.h +@@ -106,6 +106,7 @@ private: + clang::driver::toolchains::Generic_GCC::GCCVersion GccVer; + std::string Ver; + std::string SubdirName; ++ std::string TripleDirName; + mutable std::unique_ptr Preprocessor; + mutable std::unique_ptr Compiler; + void findGccLibDir(const llvm::Triple &LiteralTriple); +diff --git a/clang/test/Driver/mingw.cpp b/clang/test/Driver/mingw.cpp +index bde952fb3565..46ea55b9500d 100644 +--- a/clang/test/Driver/mingw.cpp ++++ b/clang/test/Driver/mingw.cpp +@@ -40,7 +40,10 @@ + + + // RUN: %clang -target x86_64-pc-windows-gnu -rtlib=platform -stdlib=libstdc++ -c -### --sysroot=%S/Inputs/mingw_fedora_tree/usr %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_FEDORA_TREE %s +-// CHECK_MINGW_FEDORA_TREE: "[[BASE:[^"]+]]/Inputs/mingw_fedora_tree/usr{{/|\\\\}}x86_64-w64-mingw32ucrt/sys-root/mingw/include" ++// CHECK_MINGW_FEDORA_TREE: "[[BASE:[^"]+]]/Inputs/mingw_fedora_tree/usr{{/|\\\\}}x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++" ++// CHECK_MINGW_FEDORA_TREE: "[[BASE]]/Inputs/mingw_fedora_tree/usr{{/|\\\\}}x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/x86_64-w64-mingw32ucrt" ++// CHECK_MINGW_FEDORA_TREE: "[[BASE]]/Inputs/mingw_fedora_tree/usr{{/|\\\\}}x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/backward" ++// CHECK_MINGW_FEDORA_TREE: "[[BASE]]/Inputs/mingw_fedora_tree/usr{{/|\\\\}}x86_64-w64-mingw32ucrt/sys-root/mingw/include" + + + // RUN: %clang -target i686-pc-windows-gnu -rtlib=platform -stdlib=libstdc++ -c -### --sysroot=%S/Inputs/mingw_arch_tree/usr %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_ARCH_TREE %s +-- +2.38.1 + diff --git a/clang.spec b/clang.spec index e9d883c..9b80ad6 100644 --- a/clang.spec +++ b/clang.spec @@ -41,7 +41,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -72,6 +72,10 @@ Patch7: 0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch # TODO: Can be dropped in LLVM 16: https://reviews.llvm.org/D134362 Patch8: 0001-clang-Fix-interaction-between-asm-labels-and-inline-.patch +# TODO: Can be dropped in LLVM 16. +Patch9: 0001-clang-MinGW-Improve-extend-the-gcc-sysroot-detection.patch +Patch10: 0002-clang-MinGW-Improve-detection-of-libstdc-headers-on-.patch + %if %{without compat_build} # Patches for clang-tools-extra # See https://reviews.llvm.org/D120301 @@ -608,6 +612,9 @@ false %endif %changelog +* Mon Dec 12 2022 Nikita Popov - 15.0.6-2 +- Backport patches for ucrt64 toolchain detection + * Mon Dec 05 2022 Nikita Popov - 15.0.6-1 - Update to LLVM 15.0.6 From a969e612e9691343d9d06fa05adee761ac05294b Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 21 Dec 2022 05:36:08 +0000 Subject: [PATCH 20/77] Use -mabi=ieeelongdouble in ELN --- clang.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index 9b80ad6..c088def 100644 --- a/clang.spec +++ b/clang.spec @@ -322,7 +322,7 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py # defaults used by Fedora's GCC. %cmake -G Ninja \ -DCLANG_DEFAULT_PIE_ON_LINUX=OFF \ -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?rhel} > 9 -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=ON \ %endif -DLLVM_PARALLEL_LINK_JOBS=1 \ From be819276e8915d636a180282e13901e03045ff6d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 21 Dec 2022 16:37:05 +0100 Subject: [PATCH 21/77] Add clang-devel dep to python3-clang python3-clang requires libclang.so, which is part of clang-devel. --- clang.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clang.spec b/clang.spec index c088def..2959a62 100644 --- a/clang.spec +++ b/clang.spec @@ -41,7 +41,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -248,7 +248,7 @@ clang-format integration for git. %package -n python3-clang Summary: Python3 bindings for clang -Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} Requires: python3 %description -n python3-clang %{summary}. @@ -612,6 +612,9 @@ false %endif %changelog +* Wed Dec 21 2022 Nikita Popov - 15.0.6-3 +- Add clang-devel dep to python3-clang + * Mon Dec 12 2022 Nikita Popov - 15.0.6-2 - Backport patches for ucrt64 toolchain detection From 573860f707a2949e8772af8ec404cd83d9d7e83a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 4 Jan 2023 15:30:20 +0100 Subject: [PATCH 22/77] Remove abi_revision handling We no longer ship RCs in Fedora, so this is no longer necessary. This was already done for the llvm package, do it for clang as well. --- ...ed-libraries-to-customize-the-soname.patch | 39 ------------------- clang.spec | 6 --- 2 files changed, 45 deletions(-) delete mode 100644 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch diff --git a/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch b/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch deleted file mode 100644 index e425475..0000000 --- a/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 3dc5722d5c7673a879f2b4680369d3ac8b6b64b6 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Wed, 4 Aug 2021 14:05:38 -0700 -Subject: [PATCH] cmake: Allow shared libraries to customize the soname using - LLVM_ABI_REVISION - -The LLVM_ABI_REVISION variable is intended to be used for release -candidates which introduce an ABI change to a shared library. This -variable can be specified per library, so there is not one global value -for all of LLVM. - -For example, if we LLVM X.0.0-rc2 introduces an ABI change for a library -compared with LLVM X.0.0-rc1, then the LLVM_ABI_REVISION number for -library will be incremented by 1. - -In the main branch, LLVM_ABI_REVISION should always be 0, it is only -meant to be used in the release branch. - -Differential Revision: https://reviews.llvm.org/D105594 ---- - clang/tools/clang-shlib/CMakeLists.txt | 5 +++++ - 3 files changed, 19 insertions(+), 2 deletions(-) - -diff --git a/clang/tools/clang-shlib/CMakeLists.txt b/clang/tools/clang-shlib/CMakeLists.txt -index 9c1f8ea452b3..4d785924e4bb 100644 ---- a/clang/tools/clang-shlib/CMakeLists.txt -+++ b/clang/tools/clang-shlib/CMakeLists.txt -@@ -1,3 +1,8 @@ -+# In the main branch, LLVM_ABI_REVISION should always be 0. In the release -+# branches, this should be incremented before each release candidate every -+# time the ABI of libclang-cpp.so changes. -+set(LLVM_ABI_REVISION 0) -+ - # Building libclang-cpp.so fails if LLVM_ENABLE_PIC=Off - if (NOT LLVM_ENABLE_PIC) - return() --- -2.27.0 - diff --git a/clang.spec b/clang.spec index 2959a62..34a13e6 100644 --- a/clang.spec +++ b/clang.spec @@ -35,10 +35,6 @@ %global clang_srcdir clang-%{clang_version}%{?rc_ver:rc%{rc_ver}}.src %global clang_tools_srcdir clang-tools-extra-%{clang_version}%{?rc_ver:rc%{rc_ver}}.src -%if !%{maj_ver} && 0%{?rc_ver} -%global abi_revision 2 -%endif - Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} Release: 3%{?dist} @@ -62,7 +58,6 @@ Patch0: 0001-PATCH-clang-Reorganize-gtest-integration.patch Patch1: 0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch 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 Patch5: 0010-PATCH-clang-Produce-DWARF4-by-default.patch Patch6: 0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch @@ -367,7 +362,6 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py -DLLVM_BUILD_DOCS=ON \ -DLLVM_ENABLE_SPHINX=ON \ -DCLANG_LINK_CLANG_DYLIB=ON \ - %{?abi_revision:-DLLVM_ABI_REVISION=%{abi_revision}} \ -DSPHINX_WARNINGS_AS_ERRORS=OFF \ \ -DCLANG_BUILD_EXAMPLES:BOOL=OFF \ From 3fcf35e97c18d70089f825b1d310611c7aa63541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 9 Dec 2022 13:56:56 +0100 Subject: [PATCH 23/77] Pass -vv to lit So it prints all the executed test cases. --- clang.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/clang.spec b/clang.spec index 34a13e6..3049451 100644 --- a/clang.spec +++ b/clang.spec @@ -339,6 +339,7 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py -DLLVM_BUILD_UTILS:BOOL=ON \ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=../%{clang_tools_srcdir} \ -DLLVM_EXTERNAL_LIT=%{_bindir}/lit \ + -DLLVM_LIT_ARGS="-vv" \ -DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \ %if 0%{?__isa_bits} == 64 -DLLVM_LIBDIR_SUFFIX=64 \ From c54c083a33ff6e5fa8107fcb86e36ceb9cf5b7e8 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 9 Jan 2023 20:35:55 +0000 Subject: [PATCH 24/77] Omit frame pointers when building --- clang.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index 3049451..1a1b129 100644 --- a/clang.spec +++ b/clang.spec @@ -1,5 +1,9 @@ %global toolchain clang +# Opt out of https://fedoraproject.org/wiki/Changes/fno-omit-frame-pointer +# https://bugzilla.redhat.com/show_bug.cgi?id=2158587 +%undefine _include_frame_pointers + %bcond_with compat_build %bcond_without check @@ -37,7 +41,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 3%{?dist} +Release: 4%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -607,6 +611,9 @@ false %endif %changelog +* Mon Jan 09 2023 Tom Stellard - 15.0.6-4 +- Omit frame pointers when building + * Wed Dec 21 2022 Nikita Popov - 15.0.6-3 - Add clang-devel dep to python3-clang From d59ff31f265acdf16ce2a4bdb43be0405811b4e1 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 19 Dec 2022 16:17:34 +0100 Subject: [PATCH 25/77] Fix resource-filesystem ownership conflict Fix rbhz#2100122. --- clang.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/clang.spec b/clang.spec index 1a1b129..03ba345 100644 --- a/clang.spec +++ b/clang.spec @@ -41,7 +41,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 4%{?dist} +Release: 5%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -505,11 +505,11 @@ false %files libs %if %{without compat_build} -%{_libdir}/clang/ +%{_libdir}/clang/%{version}/include/* %{_libdir}/*.so.* %else %{pkg_libdir}/*.so.* -%{pkg_libdir}/clang/%{version} +%{pkg_libdir}/clang/%{version}/include/* %endif %files devel @@ -529,6 +529,7 @@ false %endif %files resource-filesystem +%dir %{pkg_libdir}/clang/ %dir %{pkg_libdir}/clang/%{version}/ %dir %{pkg_libdir}/clang/%{version}/include/ %dir %{pkg_libdir}/clang/%{version}/lib/ @@ -611,6 +612,9 @@ false %endif %changelog +* Thu Jan 12 2022 Nikita Popov - 15.0.6-5 +- Fix resource-filesystem ownership conflict + * Mon Jan 09 2023 Tom Stellard - 15.0.6-4 - Omit frame pointers when building From 26eb3b048d3cfbdf7d30c00728f2820c5d5eac19 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 12 Jan 2023 16:25:10 +0100 Subject: [PATCH 26/77] Update to LLVM 15.0.7 --- .gitignore | 4 ++++ clang.spec | 9 ++++++--- sources | 8 ++++---- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 3d7469c..10fb754 100644 --- a/.gitignore +++ b/.gitignore @@ -231,3 +231,7 @@ /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 diff --git a/clang.spec b/clang.spec index 03ba345..8b852a7 100644 --- a/clang.spec +++ b/clang.spec @@ -9,7 +9,7 @@ %global maj_ver 15 %global min_ver 0 -%global patch_ver 6 +%global patch_ver 7 #global rc_ver 3 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} @@ -41,7 +41,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 5%{?dist} +Release: 1%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -612,7 +612,10 @@ false %endif %changelog -* Thu Jan 12 2022 Nikita Popov - 15.0.6-5 +* Thu Jan 12 2023 Nikita Popov - 15.0.7-1 +- Update to LLVM 15.0.7 + +* Thu Jan 12 2023 Nikita Popov - 15.0.6-5 - Fix resource-filesystem ownership conflict * Mon Jan 09 2023 Tom Stellard - 15.0.6-4 diff --git a/sources b/sources index 26e1efa..217a12d 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -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 +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 From 4d3ffb7f8beed6c96b1117ce21c103eb53c1b41f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 18 Jan 2023 23:56:02 +0000 Subject: [PATCH 27/77] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- clang.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index 8b852a7..1fe3bac 100644 --- a/clang.spec +++ b/clang.spec @@ -41,7 +41,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -612,6 +612,9 @@ false %endif %changelog +* Wed Jan 18 2023 Fedora Release Engineering - 15.0.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Jan 12 2023 Nikita Popov - 15.0.7-1 - Update to LLVM 15.0.7 From 809237e79bf73d107732e933205d576522823627 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Thu, 19 Jan 2023 15:48:40 -0300 Subject: [PATCH 28/77] Adopt SPDX identifiers in license Also make it clear that Apache 2.0 with LLVM exceptions was adopted in 2019. --- clang.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/clang.spec b/clang.spec index 1fe3bac..3b10edf 100644 --- a/clang.spec +++ b/clang.spec @@ -41,10 +41,10 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 2%{?dist} +Release: 3%{?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 Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_srcdir}.tar.xz.sig @@ -207,7 +207,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} @@ -612,6 +612,10 @@ false %endif %changelog +* Thu Jan 19 2023 Tulio Magno Quites Machado Filho - 15.0.7-3 +- Update license to SPDX identifiers. +- Include the Apache license adopted in 2019. + * Wed Jan 18 2023 Fedora Release Engineering - 15.0.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From e1ea575c359fa0636554543d711d7324893fcff0 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Mon, 6 Feb 2023 10:29:03 -0300 Subject: [PATCH 29/77] Update to LLVM 16.0.0 RC1 --- ...p-implicit-rpath-as-NoArgumentUnused.patch | 29 -- ...H-clang-Reorganize-gtest-integration.patch | 26 +- ...ction-between-asm-labels-and-inline-.patch | 74 ----- ...ove-extend-the-gcc-sysroot-detection.patch | 280 ------------------ ...a-Make-test-dependency-on-LLVMHello-.patch | 5 +- ...ove-detection-of-libstdc-headers-on-.patch | 139 --------- ...wind-tables-the-default-on-all-archs.patch | 21 +- ...ATCH-clang-Produce-DWARF4-by-default.patch | 100 ------- clang.spec | 17 +- 9 files changed, 30 insertions(+), 661 deletions(-) delete mode 100644 0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch delete mode 100644 0001-clang-Fix-interaction-between-asm-labels-and-inline-.patch delete mode 100644 0001-clang-MinGW-Improve-extend-the-gcc-sysroot-detection.patch delete mode 100644 0002-clang-MinGW-Improve-detection-of-libstdc-headers-on-.patch delete mode 100644 0010-PATCH-clang-Produce-DWARF4-by-default.patch diff --git a/0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch b/0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch deleted file mode 100644 index 87c9b93..0000000 --- a/0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 537e325f180d3d82bbef64aac71efcb0256d6916 Mon Sep 17 00:00:00 2001 -From: Nikita Popov -Date: Fri, 2 Sep 2022 16:30:15 +0200 -Subject: [PATCH] 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 d921ea5d5da9..d883fd3a8f04 100644 ---- a/clang/include/clang/Driver/Options.td -+++ b/clang/include/clang/Driver/Options.td -@@ -4118,7 +4118,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.2 - diff --git a/0001-PATCH-clang-Reorganize-gtest-integration.patch b/0001-PATCH-clang-Reorganize-gtest-integration.patch index e854f01..c63aaf1 100644 --- a/0001-PATCH-clang-Reorganize-gtest-integration.patch +++ b/0001-PATCH-clang-Reorganize-gtest-integration.patch @@ -1,42 +1,42 @@ -From c6b921c8d833546946b70a8c2640032fd7c62461 Mon Sep 17 00:00:00 2001 +From cfd535d718631c1266baa628904ddfa95284427d Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 25 Feb 2021 14:04:52 +0100 -Subject: [PATCH 1/6] [PATCH][clang] Reorganize gtest integration +Subject: [PATCH] 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 9e74014..0185276 100644 +index be59c199f05f..3f882f7aca59 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt -@@ -153,12 +153,6 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) +@@ -118,12 +118,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) +- 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} utils/unittest) +- add_subdirectory(${UNITTEST_DIR} third-party/unittest) - endif() - else() - # Seek installed Lit. - find_program(LLVM_LIT -@@ -537,7 +531,11 @@ endif() + endif() + + if(LLVM_LIT) +@@ -506,7 +500,11 @@ endif() if( CLANG_INCLUDE_TESTS ) -- if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include/gtest/gtest.h) +- if(EXISTS ${LLVM_THIRD_PARTY_DIR}/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(${UNITTEST_DIR} third-party/unittest) add_subdirectory(unittests) list(APPEND CLANG_TEST_DEPS ClangUnitTests) list(APPEND CLANG_TEST_PARAMS -- -1.8.3.1 +2.39.1 diff --git a/0001-clang-Fix-interaction-between-asm-labels-and-inline-.patch b/0001-clang-Fix-interaction-between-asm-labels-and-inline-.patch deleted file mode 100644 index 948d164..0000000 --- a/0001-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/0001-clang-MinGW-Improve-extend-the-gcc-sysroot-detection.patch b/0001-clang-MinGW-Improve-extend-the-gcc-sysroot-detection.patch deleted file mode 100644 index 7f54d32..0000000 --- a/0001-clang-MinGW-Improve-extend-the-gcc-sysroot-detection.patch +++ /dev/null @@ -1,280 +0,0 @@ -From efe3686d4a519b357cecb5aaf715f1e1b6f2d025 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Martin=20Storsj=C3=B6?= -Date: Tue, 22 Nov 2022 14:38:54 +0200 -Subject: [PATCH 1/2] [clang] [MinGW] Improve/extend the gcc/sysroot detection - logic - -There are three functions that try to detect the right implicit -sysroot and libgcc directory setup to use -- One which looks for mingw sysroots located in - /../ -- One which looks for a mingw-targeting gcc executables in the PATH -- One which looks in the /lib/gcc directory to find the - right one to use, and the right specific triple used for arch - specific directories in the gcc/libstdc++ install - -These have mostly tried to look for executables named -"-w64-mingw32-gcc" or "mingw32-gcc" or subdirectories -named "-w64-mingw32" or "mingw32". - -In the case of findClangRelativeSysroot, it also has looked -for directories with the name of the actual triple. This -was added in deff7536278d355977171726124f83aa4bb95419, -with the intent of looking for a directory matching exactly -the user provided literal triple - however the triple here -is the normalized one, not the one provided by the user on -the command line. - -Improve and unify this logic somewhat: -- Always first look for things based on the literal triple - provided by the user. -- Secondly look for things based on the normalized triple - (which usually ends up as e.g. x86_64-w64-windows-gnu), - accessed via the Triple which is passed to the constructor -- Then look for the common triple form -w64-mingw32 - -The literal triple provided by the user is available via -Driver::getTargetTriple(), but computeTargetTriple() may -change e.g. the architecture of it, so we need to -reapply the effective architecture on the literal triple -spelling from Driver::getTargetTriple(). - -Do this consistently for all of findGcc, findClangRelativeSysroot -and findGccLibDir (while keeping the existing plain "mingw32" -cases in findGcc and findGccLibDir too). - -Fedora 37 started shipping mingw sysroots targeting UCRT, -in addition to the traditional msvcrt.dll, and these use -triples in the form -w64-mingw32ucrt - see -https://fedoraproject.org/wiki/Changes/F37MingwUCRT. - -Thus, in addition to the existing default tested triples, -try looking for triples in the form -w64-mingw32ucrt, -to automatically find the UCRT sysroots on Fedora 37. -By explicitly setting a specific target on the Clang command -line, the user can be more explicit with which flavour is -to be preferred. - -This should fix the main issue in -https://github.com/llvm/llvm-project/issues/59001. - -Differential Revision: https://reviews.llvm.org/D138692 ---- - clang/lib/Driver/ToolChains/MinGW.cpp | 68 ++++++++++++++----- - clang/lib/Driver/ToolChains/MinGW.h | 2 +- - .../12.2.1/include-fixed/.keep | 0 - .../sys-root/mingw/include/.keep | 0 - .../sys-root/mingw/include/c++/backward/.keep | 0 - .../include/c++/x86_64-w64-mingw32ucrt/.keep | 0 - clang/test/Driver/mingw-sysroot.cpp | 13 ++++ - clang/test/Driver/mingw.cpp | 4 ++ - 8 files changed, 68 insertions(+), 19 deletions(-) - create mode 100644 clang/test/Driver/Inputs/mingw_fedora_tree/usr/lib/gcc/x86_64-w64-mingw32ucrt/12.2.1/include-fixed/.keep - create mode 100644 clang/test/Driver/Inputs/mingw_fedora_tree/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/.keep - create mode 100644 clang/test/Driver/Inputs/mingw_fedora_tree/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/backward/.keep - create mode 100644 clang/test/Driver/Inputs/mingw_fedora_tree/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/x86_64-w64-mingw32ucrt/.keep - -diff --git a/clang/lib/Driver/ToolChains/MinGW.cpp b/clang/lib/Driver/ToolChains/MinGW.cpp -index ae7c4c56bf9e..0ebacea6e87f 100644 ---- a/clang/lib/Driver/ToolChains/MinGW.cpp -+++ b/clang/lib/Driver/ToolChains/MinGW.cpp -@@ -359,13 +359,26 @@ static bool findGccVersion(StringRef LibDir, std::string &GccLibDir, - return Ver.size(); - } - --void toolchains::MinGW::findGccLibDir() { -- llvm::SmallVector, 2> SubdirNames; -+static llvm::Triple getLiteralTriple(const Driver &D, const llvm::Triple &T) { -+ llvm::Triple LiteralTriple(D.getTargetTriple()); -+ // The arch portion of the triple may be overridden by -m32/-m64. -+ LiteralTriple.setArchName(T.getArchName()); -+ return LiteralTriple; -+} -+ -+void toolchains::MinGW::findGccLibDir(const llvm::Triple &LiteralTriple) { -+ llvm::SmallVector, 5> SubdirNames; -+ SubdirNames.emplace_back(LiteralTriple.str()); -+ SubdirNames.emplace_back(getTriple().str()); - SubdirNames.emplace_back(getTriple().getArchName()); -- SubdirNames[0] += "-w64-mingw32"; -+ SubdirNames.back() += "-w64-mingw32"; -+ SubdirNames.emplace_back(getTriple().getArchName()); -+ SubdirNames.back() += "-w64-mingw32ucrt"; - SubdirNames.emplace_back("mingw32"); -- if (SubdirName.empty()) -- SubdirName = std::string(SubdirNames[0].str()); -+ if (SubdirName.empty()) { -+ SubdirName = getTriple().getArchName(); -+ SubdirName += "-w64-mingw32"; -+ } - // lib: Arch Linux, Ubuntu, Windows - // lib64: openSUSE Linux - for (StringRef CandidateLib : {"lib", "lib64"}) { -@@ -380,10 +393,17 @@ void toolchains::MinGW::findGccLibDir() { - } - } - --static llvm::ErrorOr findGcc(const llvm::Triple &T) { -- llvm::SmallVector, 2> Gccs; -+static llvm::ErrorOr findGcc(const llvm::Triple &LiteralTriple, -+ const llvm::Triple &T) { -+ llvm::SmallVector, 5> Gccs; -+ Gccs.emplace_back(LiteralTriple.str()); -+ Gccs.back() += "-gcc"; -+ Gccs.emplace_back(T.str()); -+ Gccs.back() += "-gcc"; - Gccs.emplace_back(T.getArchName()); -- Gccs[0] += "-w64-mingw32-gcc"; -+ Gccs.back() += "-w64-mingw32-gcc"; -+ Gccs.emplace_back(T.getArchName()); -+ Gccs.back() += "-w64-mingw32ucrt-gcc"; - Gccs.emplace_back("mingw32-gcc"); - // Please do not add "gcc" here - for (StringRef CandidateGcc : Gccs) -@@ -393,12 +413,15 @@ static llvm::ErrorOr findGcc(const llvm::Triple &T) { - } - - static llvm::ErrorOr --findClangRelativeSysroot(const Driver &D, const llvm::Triple &T, -- std::string &SubdirName) { -- llvm::SmallVector, 2> Subdirs; -+findClangRelativeSysroot(const Driver &D, const llvm::Triple &LiteralTriple, -+ const llvm::Triple &T, std::string &SubdirName) { -+ llvm::SmallVector, 4> Subdirs; -+ Subdirs.emplace_back(LiteralTriple.str()); - Subdirs.emplace_back(T.str()); - Subdirs.emplace_back(T.getArchName()); -- Subdirs[1] += "-w64-mingw32"; -+ Subdirs.back() += "-w64-mingw32"; -+ Subdirs.emplace_back(T.getArchName()); -+ Subdirs.back() += "-w64-mingw32ucrt"; - StringRef ClangRoot = llvm::sys::path::parent_path(D.getInstalledDir()); - StringRef Sep = llvm::sys::path::get_separator(); - for (StringRef CandidateSubdir : Subdirs) { -@@ -418,14 +441,16 @@ toolchains::MinGW::MinGW(const Driver &D, const llvm::Triple &Triple, - - // The sequence for detecting a sysroot here should be kept in sync with - // the testTriple function below. -+ llvm::Triple LiteralTriple = getLiteralTriple(D, getTriple()); - if (getDriver().SysRoot.size()) - Base = getDriver().SysRoot; - // Look for /../; if found, use /.. as the - // base as it could still be a base for a gcc setup with libgcc. -- else if (llvm::ErrorOr TargetSubdir = -- findClangRelativeSysroot(getDriver(), getTriple(), SubdirName)) -+ else if (llvm::ErrorOr TargetSubdir = findClangRelativeSysroot( -+ getDriver(), LiteralTriple, getTriple(), SubdirName)) - Base = std::string(llvm::sys::path::parent_path(TargetSubdir.get())); -- else if (llvm::ErrorOr GPPName = findGcc(getTriple())) -+ else if (llvm::ErrorOr GPPName = -+ findGcc(LiteralTriple, getTriple())) - Base = std::string(llvm::sys::path::parent_path( - llvm::sys::path::parent_path(GPPName.get()))); - else -@@ -433,7 +458,7 @@ toolchains::MinGW::MinGW(const Driver &D, const llvm::Triple &Triple, - llvm::sys::path::parent_path(getDriver().getInstalledDir())); - - Base += llvm::sys::path::get_separator(); -- findGccLibDir(); -+ findGccLibDir(LiteralTriple); - // GccLibDir must precede Base/lib so that the - // correct crtbegin.o ,cetend.o would be found. - getFilePaths().push_back(GccLibDir); -@@ -576,6 +601,12 @@ void toolchains::MinGW::printVerboseInfo(raw_ostream &OS) const { - // /usr/include/c++/4.8/backward - // /usr/x86_64-w64-mingw32/include - -+// Fedora -+// /usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/x86_64-w64-mingw32ucrt -+// /usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/backward -+// /usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include -+// /usr/lib/gcc/x86_64-w64-mingw32ucrt/12.2.1/include-fixed -+ - void toolchains::MinGW::AddClangSystemIncludeArgs(const ArgList &DriverArgs, - ArgStringList &CC1Args) const { - if (DriverArgs.hasArg(options::OPT_nostdinc)) -@@ -667,10 +698,11 @@ static bool testTriple(const Driver &D, const llvm::Triple &Triple, - std::string SubdirName; - if (D.SysRoot.size()) - return true; -+ llvm::Triple LiteralTriple = getLiteralTriple(D, Triple); - if (llvm::ErrorOr TargetSubdir = -- findClangRelativeSysroot(D, Triple, SubdirName)) -+ findClangRelativeSysroot(D, LiteralTriple, Triple, SubdirName)) - return true; -- if (llvm::ErrorOr GPPName = findGcc(Triple)) -+ if (llvm::ErrorOr GPPName = findGcc(LiteralTriple, Triple)) - return true; - // If we neither found a colocated sysroot or a matching gcc executable, - // conclude that we can't know if this is the correct spelling of the triple. -diff --git a/clang/lib/Driver/ToolChains/MinGW.h b/clang/lib/Driver/ToolChains/MinGW.h -index f15f99dc8a8c..bc17d273e776 100644 ---- a/clang/lib/Driver/ToolChains/MinGW.h -+++ b/clang/lib/Driver/ToolChains/MinGW.h -@@ -108,7 +108,7 @@ private: - std::string SubdirName; - mutable std::unique_ptr Preprocessor; - mutable std::unique_ptr Compiler; -- void findGccLibDir(); -+ void findGccLibDir(const llvm::Triple &LiteralTriple); - - bool NativeLLVMSupport; - }; -diff --git a/clang/test/Driver/Inputs/mingw_fedora_tree/usr/lib/gcc/x86_64-w64-mingw32ucrt/12.2.1/include-fixed/.keep b/clang/test/Driver/Inputs/mingw_fedora_tree/usr/lib/gcc/x86_64-w64-mingw32ucrt/12.2.1/include-fixed/.keep -new file mode 100644 -index 000000000000..e69de29bb2d1 -diff --git a/clang/test/Driver/Inputs/mingw_fedora_tree/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/.keep b/clang/test/Driver/Inputs/mingw_fedora_tree/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/.keep -new file mode 100644 -index 000000000000..e69de29bb2d1 -diff --git a/clang/test/Driver/Inputs/mingw_fedora_tree/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/backward/.keep b/clang/test/Driver/Inputs/mingw_fedora_tree/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/backward/.keep -new file mode 100644 -index 000000000000..e69de29bb2d1 -diff --git a/clang/test/Driver/Inputs/mingw_fedora_tree/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/x86_64-w64-mingw32ucrt/.keep b/clang/test/Driver/Inputs/mingw_fedora_tree/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/x86_64-w64-mingw32ucrt/.keep -new file mode 100644 -index 000000000000..e69de29bb2d1 -diff --git a/clang/test/Driver/mingw-sysroot.cpp b/clang/test/Driver/mingw-sysroot.cpp -index 1cb51b3aea2d..985be9e5f2ac 100644 ---- a/clang/test/Driver/mingw-sysroot.cpp -+++ b/clang/test/Driver/mingw-sysroot.cpp -@@ -14,6 +14,11 @@ - // RUN: ln -s %S/Inputs/mingw_ubuntu_posix_tree/usr/x86_64-w64-mingw32 %T/testroot-clang/x86_64-w64-mingw32 - // RUN: ln -s %S/Inputs/mingw_arch_tree/usr/i686-w64-mingw32 %T/testroot-clang/i686-w64-mingw32 - -+// RUN: rm -rf %T/testroot-custom-triple -+// RUN: mkdir -p %T/testroot-custom-triple/bin -+// RUN: ln -s %clang %T/testroot-custom-triple/bin/x86_64-w64-mingw32foo-clang -+// RUN: ln -s %clang %T/testroot-custom-triple/bin/clang -+// RUN: ln -s %S/Inputs/mingw_ubuntu_posix_tree/usr/x86_64-w64-mingw32 %T/testroot-custom-triple/x86_64-w64-mingw32foo - - // If we find a gcc in the path with the right triplet prefix, pick that as - // sysroot: -@@ -51,3 +56,11 @@ - - // RUN: env "PATH=%T/testroot-gcc/bin:%PATH%" %T/testroot-clang/bin/x86_64-w64-mingw32-clang --target=x86_64-w64-mingw32 -m32 -rtlib=compiler-rt -stdlib=libstdc++ --sysroot="" -c -### %s 2>&1 | FileCheck -check-prefix=CHECK_TESTROOT_CLANG_I686 %s - // CHECK_TESTROOT_CLANG_I686: "{{[^"]+}}/testroot-clang{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include" -+ -+ -+// If the user calls clang with a custom literal triple, make sure this maps -+// to sysroots with the matching spelling. -+ -+// RUN: %T/testroot-custom-triple/bin/x86_64-w64-mingw32foo-clang -rtlib=compiler-rt -stdlib=libstdc++ --sysroot="" -c -### %s 2>&1 | FileCheck -check-prefix=CHECK_TESTROOT_CUSTOM_TRIPLE %s -+// RUN: %T/testroot-custom-triple/bin/clang --target=x86_64-w64-mingw32foo -rtlib=compiler-rt -stdlib=libstdc++ --sysroot="" -c -### %s 2>&1 | FileCheck -check-prefix=CHECK_TESTROOT_CUSTOM_TRIPLE %s -+// CHECK_TESTROOT_CUSTOM_TRIPLE: "{{[^"]+}}/testroot-custom-triple{{/|\\\\}}x86_64-w64-mingw32foo{{/|\\\\}}include" -diff --git a/clang/test/Driver/mingw.cpp b/clang/test/Driver/mingw.cpp -index b37503e475d8..bde952fb3565 100644 ---- a/clang/test/Driver/mingw.cpp -+++ b/clang/test/Driver/mingw.cpp -@@ -39,6 +39,10 @@ - // CHECK_MINGW_OPENSUSE_TREE: "[[BASE]]/Inputs/mingw_opensuse_tree/usr{{/|\\\\}}x86_64-w64-mingw32/sys-root/mingw/include" - - -+// RUN: %clang -target x86_64-pc-windows-gnu -rtlib=platform -stdlib=libstdc++ -c -### --sysroot=%S/Inputs/mingw_fedora_tree/usr %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_FEDORA_TREE %s -+// CHECK_MINGW_FEDORA_TREE: "[[BASE:[^"]+]]/Inputs/mingw_fedora_tree/usr{{/|\\\\}}x86_64-w64-mingw32ucrt/sys-root/mingw/include" -+ -+ - // RUN: %clang -target i686-pc-windows-gnu -rtlib=platform -stdlib=libstdc++ -c -### --sysroot=%S/Inputs/mingw_arch_tree/usr %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_ARCH_TREE %s - // CHECK_MINGW_ARCH_TREE: "[[BASE:[^"]+]]/Inputs/mingw_arch_tree/usr{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}5.1.0" - // CHECK_MINGW_ARCH_TREE: "[[BASE]]/Inputs/mingw_arch_tree/usr{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}5.1.0{{/|\\\\}}i686-w64-mingw32" --- -2.38.1 - 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 8f30ef4..a0b8cb0 100644 --- a/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch +++ b/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch @@ -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 diff --git a/0002-clang-MinGW-Improve-detection-of-libstdc-headers-on-.patch b/0002-clang-MinGW-Improve-detection-of-libstdc-headers-on-.patch deleted file mode 100644 index 7376d7f..0000000 --- a/0002-clang-MinGW-Improve-detection-of-libstdc-headers-on-.patch +++ /dev/null @@ -1,139 +0,0 @@ -From d3b79c2950d590cb272648f1c6a9dd7646f57beb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Martin=20Storsj=C3=B6?= -Date: Tue, 22 Nov 2022 14:39:39 +0200 -Subject: [PATCH 2/2] [clang] [MinGW] Improve detection of libstdc++ headers on - Fedora - -There's some variation in where different toolchain distributions -(and linux distributions) package the mingw sysroots - this is -so far handled by adding specific known subdirectory paths -to the include and lib directory lists. - -There are multiple degrees of combinatorics involved here though; -the distros may use different locations such as -/usr/x86_64-w64-mingw32/include or -/usr/x86_64-w64-mingw32/sys-root/mingw/include. - -So far, this setup has been treated as base=/usr, subdir=x86_64-w64-mingw32, -and the driver tries to add further subdirectories such as -//include, //sys-root/mingw/include. - -When it comes to libstdc++ (and libc++), each of these come with -a large number of potential subdirectories. Instead of further -exploding the combinatorics another step by adding all combinations -of all paths, check whether //sys-root/mingw/include -exists, and if it does, append that subpath into the subdir variable. - -This allows finding libstdc++ headers in e.g. -/usr/x86_64-w64-mingw32/sys-root/mingw/include/c++/x86_64-w64-mingw32 -on Fedora. - -The same logic (where everything belonging to this target fits -under one expanded path, with just /include and /lib -under it) doesn't seem to apply on Gentoo, where the includes -are found in //usr/include while the libraries -are in //mingw/lib (see -8e218026f8d5eabfdef9141ae5e26aa91d1933e6). But apparently -the libstdc++ headers aren't installed under -//usr/include, so that path hierarchy quirk doesn't -need to be taken into account in AddClangCXXStdlibIncludeArgs. - -Differential Revision: https://reviews.llvm.org/D138693 ---- - clang/lib/Driver/ToolChains/MinGW.cpp | 19 +++++++++---------- - clang/lib/Driver/ToolChains/MinGW.h | 1 + - clang/test/Driver/mingw.cpp | 5 ++++- - 3 files changed, 14 insertions(+), 11 deletions(-) - -diff --git a/clang/lib/Driver/ToolChains/MinGW.cpp b/clang/lib/Driver/ToolChains/MinGW.cpp -index 0ebacea6e87f..2a9bf4b18f19 100644 ---- a/clang/lib/Driver/ToolChains/MinGW.cpp -+++ b/clang/lib/Driver/ToolChains/MinGW.cpp -@@ -376,7 +376,7 @@ void toolchains::MinGW::findGccLibDir(const llvm::Triple &LiteralTriple) { - SubdirNames.back() += "-w64-mingw32ucrt"; - SubdirNames.emplace_back("mingw32"); - if (SubdirName.empty()) { -- SubdirName = getTriple().getArchName(); -+ SubdirName = getTriple().getArchName().str(); - SubdirName += "-w64-mingw32"; - } - // lib: Arch Linux, Ubuntu, Windows -@@ -459,9 +459,16 @@ toolchains::MinGW::MinGW(const Driver &D, const llvm::Triple &Triple, - - Base += llvm::sys::path::get_separator(); - findGccLibDir(LiteralTriple); -+ TripleDirName = SubdirName; - // GccLibDir must precede Base/lib so that the - // correct crtbegin.o ,cetend.o would be found. - getFilePaths().push_back(GccLibDir); -+ -+ // openSUSE/Fedora -+ std::string CandidateSubdir = SubdirName + "/sys-root/mingw"; -+ if (getDriver().getVFS().exists(Base + CandidateSubdir)) -+ SubdirName = CandidateSubdir; -+ - getFilePaths().push_back( - (Base + SubdirName + llvm::sys::path::get_separator() + "lib").str()); - -@@ -470,8 +477,6 @@ toolchains::MinGW::MinGW(const Driver &D, const llvm::Triple &Triple, - (Base + SubdirName + llvm::sys::path::get_separator() + "mingw/lib").str()); - - getFilePaths().push_back(Base + "lib"); -- // openSUSE -- getFilePaths().push_back(Base + SubdirName + "/sys-root/mingw/lib"); - - NativeLLVMSupport = - Args.getLastArgValue(options::OPT_fuse_ld_EQ, CLANG_DEFAULT_LINKER) -@@ -621,12 +626,6 @@ void toolchains::MinGW::AddClangSystemIncludeArgs(const ArgList &DriverArgs, - if (DriverArgs.hasArg(options::OPT_nostdlibinc)) - return; - -- if (GetRuntimeLibType(DriverArgs) == ToolChain::RLT_Libgcc) { -- // openSUSE -- addSystemInclude(DriverArgs, CC1Args, -- Base + SubdirName + "/sys-root/mingw/include"); -- } -- - addSystemInclude(DriverArgs, CC1Args, - Base + SubdirName + llvm::sys::path::get_separator() + - "include"); -@@ -684,7 +683,7 @@ void toolchains::MinGW::AddClangCXXStdlibIncludeArgs( - for (auto &CppIncludeBase : CppIncludeBases) { - addSystemInclude(DriverArgs, CC1Args, CppIncludeBase); - CppIncludeBase += Slash; -- addSystemInclude(DriverArgs, CC1Args, CppIncludeBase + SubdirName); -+ addSystemInclude(DriverArgs, CC1Args, CppIncludeBase + TripleDirName); - addSystemInclude(DriverArgs, CC1Args, CppIncludeBase + "backward"); - } - break; -diff --git a/clang/lib/Driver/ToolChains/MinGW.h b/clang/lib/Driver/ToolChains/MinGW.h -index bc17d273e776..ef9bfb29e175 100644 ---- a/clang/lib/Driver/ToolChains/MinGW.h -+++ b/clang/lib/Driver/ToolChains/MinGW.h -@@ -106,6 +106,7 @@ private: - clang::driver::toolchains::Generic_GCC::GCCVersion GccVer; - std::string Ver; - std::string SubdirName; -+ std::string TripleDirName; - mutable std::unique_ptr Preprocessor; - mutable std::unique_ptr Compiler; - void findGccLibDir(const llvm::Triple &LiteralTriple); -diff --git a/clang/test/Driver/mingw.cpp b/clang/test/Driver/mingw.cpp -index bde952fb3565..46ea55b9500d 100644 ---- a/clang/test/Driver/mingw.cpp -+++ b/clang/test/Driver/mingw.cpp -@@ -40,7 +40,10 @@ - - - // RUN: %clang -target x86_64-pc-windows-gnu -rtlib=platform -stdlib=libstdc++ -c -### --sysroot=%S/Inputs/mingw_fedora_tree/usr %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_FEDORA_TREE %s --// CHECK_MINGW_FEDORA_TREE: "[[BASE:[^"]+]]/Inputs/mingw_fedora_tree/usr{{/|\\\\}}x86_64-w64-mingw32ucrt/sys-root/mingw/include" -+// CHECK_MINGW_FEDORA_TREE: "[[BASE:[^"]+]]/Inputs/mingw_fedora_tree/usr{{/|\\\\}}x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++" -+// CHECK_MINGW_FEDORA_TREE: "[[BASE]]/Inputs/mingw_fedora_tree/usr{{/|\\\\}}x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/x86_64-w64-mingw32ucrt" -+// CHECK_MINGW_FEDORA_TREE: "[[BASE]]/Inputs/mingw_fedora_tree/usr{{/|\\\\}}x86_64-w64-mingw32ucrt/sys-root/mingw/include/c++/backward" -+// CHECK_MINGW_FEDORA_TREE: "[[BASE]]/Inputs/mingw_fedora_tree/usr{{/|\\\\}}x86_64-w64-mingw32ucrt/sys-root/mingw/include" - - - // RUN: %clang -target i686-pc-windows-gnu -rtlib=platform -stdlib=libstdc++ -c -### --sysroot=%S/Inputs/mingw_arch_tree/usr %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_ARCH_TREE %s --- -2.38.1 - diff --git a/0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch b/0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch index e6671f9..ce920f9 100644 --- a/0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch +++ b/0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch @@ -1,18 +1,17 @@ -From c87abee7356b8fde81512ffceadd520776c465d2 Mon Sep 17 00:00:00 2001 +From d95d3fbff661c0390072ed0bb4544d5e2aae5c9a Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 25 Feb 2021 14:09:29 +0100 -Subject: [PATCH] [PATCH][clang] Make -funwind-tables the default on all archs +Subject: [PATCH] Make -funwind-tables the default on all archs --- - clang/lib/Driver/ToolChains/Gnu.cpp | 6 ++++++ - 1 file changed, 6 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 d0808d061c82..de9c9743cd38 100644 +diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp +index c8006f3d8412..6ed03adb7702 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2701,6 +2701,11 @@ 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: @@ -21,9 +20,9 @@ index d0808d061c82..de9c9743cd38 100644 + // rhbz#1655546 + case llvm::Triple::systemz: + case llvm::Triple::arm: - return true; + return UnwindTableLevel::Asynchronous; default: - return false; + return UnwindTableLevel::None; -- -2.27.0 +2.39.1 diff --git a/0010-PATCH-clang-Produce-DWARF4-by-default.patch b/0010-PATCH-clang-Produce-DWARF4-by-default.patch deleted file mode 100644 index 2d698c5..0000000 --- a/0010-PATCH-clang-Produce-DWARF4-by-default.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 1f68d73910ddee1beaf3582480b8a9738c941a43 Mon Sep 17 00:00:00 2001 -From: Konrad Kleine -Date: Thu, 24 Mar 2022 09:44:21 +0100 -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: - -https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8f5b4?diff=unified ---- - clang/include/clang/Driver/ToolChain.h | 2 +- - clang/test/CodeGen/dwarf-version.c | 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(-) - -diff --git a/clang/include/clang/Driver/ToolChain.h b/clang/include/clang/Driver/ToolChain.h -index f20ab164531b..53c86ee82936 100644 ---- a/clang/include/clang/Driver/ToolChain.h -+++ b/clang/include/clang/Driver/ToolChain.h -@@ -535,7 +535,7 @@ public: - - // Return the DWARF version to emit, in the absence of arguments - // to the contrary. -- virtual unsigned GetDefaultDwarfVersion() const { return 5; } -+ virtual unsigned GetDefaultDwarfVersion() const { return 4; } - - // Some toolchains may have different restrictions on the DWARF version and - // may need to adjust it. E.g. NVPTX may need to enforce DWARF2 even when host -diff --git a/clang/test/CodeGen/dwarf-version.c b/clang/test/CodeGen/dwarf-version.c -index 0a6fa4768026..96f01749d0d8 100644 ---- a/clang/test/CodeGen/dwarf-version.c -+++ b/clang/test/CodeGen/dwarf-version.c -@@ -2,8 +2,8 @@ - // RUN: %clang -target x86_64-linux-gnu -gdwarf-3 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER3 - // RUN: %clang -target x86_64-linux-gnu -gdwarf-4 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 - // RUN: %clang -target x86_64-linux-gnu -gdwarf-5 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 --// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 --// RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 -+// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 -+// RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 - - // 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/cl-options.c b/clang/test/Driver/cl-options.c -index a2e350a0a835..01889ba0bf9b 100644 ---- a/clang/test/Driver/cl-options.c -+++ b/clang/test/Driver/cl-options.c -@@ -570,7 +570,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 -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 -+++ b/clang/test/Driver/clang-g-opts.c -@@ -32,7 +32,7 @@ - - // CHECK-WITHOUT-G-NOT: -debug-info-kind - // CHECK-WITH-G: "-debug-info-kind=constructor" --// CHECK-WITH-G: "-dwarf-version=5" -+// CHECK-WITH-G: "-dwarf-version=4" - // CHECK-WITH-G-DWARF2: "-dwarf-version=2" - - // CHECK-WITH-G-STANDALONE: "-debug-info-kind=standalone" -diff --git a/clang/test/Driver/ve-toolchain.c b/clang/test/Driver/ve-toolchain.c -index 32e25769b6da..b8a2852daba8 100644 ---- a/clang/test/Driver/ve-toolchain.c -+++ b/clang/test/Driver/ve-toolchain.c -@@ -6,7 +6,7 @@ - /// Checking dwarf-version - - // RUN: %clang -### -g --target=ve %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s --// DWARF_VER: "-dwarf-version=5" -+// DWARF_VER: "-dwarf-version=4" - - ///----------------------------------------------------------------------------- - /// Checking include-path -diff --git a/clang/test/Driver/ve-toolchain.cpp b/clang/test/Driver/ve-toolchain.cpp -index 5a33d5eceb61..cedf895b36dc 100644 ---- a/clang/test/Driver/ve-toolchain.cpp -+++ b/clang/test/Driver/ve-toolchain.cpp -@@ -7,7 +7,7 @@ - - // RUN: %clangxx -### -g --target=ve-unknown-linux-gnu \ - // RUN: %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s --// DWARF_VER: "-dwarf-version=5" -+// DWARF_VER: "-dwarf-version=4" - - ///----------------------------------------------------------------------------- - /// Checking include-path --- -2.37.1 - diff --git a/clang.spec b/clang.spec index 3b10edf..d4a52b2 100644 --- a/clang.spec +++ b/clang.spec @@ -7,10 +7,10 @@ %bcond_with compat_build %bcond_without check -%global maj_ver 15 +%global maj_ver 16 %global min_ver 0 -%global patch_ver 7 -#global rc_ver 3 +%global patch_ver 0 +%global rc_ver 1 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} %if %{with compat_build} @@ -62,19 +62,8 @@ Patch0: 0001-PATCH-clang-Reorganize-gtest-integration.patch Patch1: 0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch Patch3: 0001-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch -Patch5: 0010-PATCH-clang-Produce-DWARF4-by-default.patch Patch6: 0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch -# TODO: Can be dropped in LLVM 16: https://reviews.llvm.org/D133316 -Patch7: 0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch - -# TODO: Can be dropped in LLVM 16: https://reviews.llvm.org/D134362 -Patch8: 0001-clang-Fix-interaction-between-asm-labels-and-inline-.patch - -# TODO: Can be dropped in LLVM 16. -Patch9: 0001-clang-MinGW-Improve-extend-the-gcc-sysroot-detection.patch -Patch10: 0002-clang-MinGW-Improve-detection-of-libstdc-headers-on-.patch - %if %{without compat_build} # Patches for clang-tools-extra # See https://reviews.llvm.org/D120301 From 1919c1aeccf8243bcc788f7dc46eeebe8fc190b6 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 20 Jan 2023 19:35:39 +0000 Subject: [PATCH 30/77] Manually apply https://reviews.llvm.org/D141581 --- D141581.diff | 25 +++++++++++++++++++++++++ clang.spec | 4 ++++ 2 files changed, 29 insertions(+) create mode 100644 D141581.diff 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 d4a52b2..e8e3f38 100644 --- a/clang.spec +++ b/clang.spec @@ -64,6 +64,10 @@ Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch Patch3: 0001-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch Patch6: 0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch +# Make clangBasic and clangDriver depend on LLVMTargetParser +# See https://reviews.llvm.org/D141581 +Patch7: D141581.diff + %if %{without compat_build} # Patches for clang-tools-extra # See https://reviews.llvm.org/D120301 From 0d77a0c30a54b0a45cba3b8f42e9cc3411a82f49 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 23 Jan 2023 10:44:28 +0000 Subject: [PATCH 31/77] adjust /lib/ to /%{_lib}/ fixes this error: ``` mv: cannot stat '/builddir/build/BUILDROOT/clang-16.0.0~pre20230122.g6aaac4c144572d-1.fc36.x86_64/usr/lib/libear': No such file or directory mv: cannot stat '/builddir/build/BUILDROOT/clang-16.0.0~pre20230122.g6aaac4c144572d-1.fc36.x86_64/usr/lib/libscanbuild': No such file or directory ``` --- clang.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index e8e3f38..75138a7 100644 --- a/clang.spec +++ b/clang.spec @@ -402,7 +402,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 From 7ac824879587512c838596712fbff4fb5d4feed0 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 23 Jan 2023 12:48:50 +0000 Subject: [PATCH 32/77] Remove third party stuff and use gtest patch --- D138472.diff | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ clang.spec | 3 +++ 2 files changed, 56 insertions(+) create mode 100644 D138472.diff diff --git a/D138472.diff b/D138472.diff new file mode 100644 index 0000000..729d74c --- /dev/null +++ b/D138472.diff @@ -0,0 +1,53 @@ +From 04ee57212326f872b6f9402eff438220396ca763 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..69652733e2f2 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) ++ 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/clang.spec b/clang.spec index 75138a7..83d057f 100644 --- a/clang.spec +++ b/clang.spec @@ -67,6 +67,9 @@ Patch6: 0001-Take-into-account-Fedora-Specific-install-dir-for-li.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 %if %{without compat_build} # Patches for clang-tools-extra From 0f9040cc955061b4c45c1598322fef906f5a6438 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 23 Jan 2023 15:13:31 +0000 Subject: [PATCH 33/77] Assist find_package(LLVMGTest by setting hint dir to LLVM_CMAKE_DIR --- D138472.diff | 6 +++--- clang.spec | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/D138472.diff b/D138472.diff index 729d74c..5d3cd60 100644 --- a/D138472.diff +++ b/D138472.diff @@ -1,4 +1,4 @@ -From 04ee57212326f872b6f9402eff438220396ca763 Mon Sep 17 00:00:00 2001 +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 @@ -8,7 +8,7 @@ Subject: [PATCH] Rebased D138472 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt -index 090cfa352078..69652733e2f2 100644 +index 090cfa352078..f87838776c32 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -118,12 +118,11 @@ if(CLANG_BUILT_STANDALONE) @@ -23,7 +23,7 @@ index 090cfa352078..69652733e2f2 100644 - endif() + endif() + -+ find_package(LLVMGTest) ++ 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() diff --git a/clang.spec b/clang.spec index 83d057f..dd32292 100644 --- a/clang.spec +++ b/clang.spec @@ -341,6 +341,7 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py -DLLVM_EXTERNAL_LIT=%{_bindir}/lit \ -DLLVM_LIT_ARGS="-vv" \ -DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \ + -DLLVM_CMAKE_DIR=/usr/%{_lib}/cmake/llvm \ %if 0%{?__isa_bits} == 64 -DLLVM_LIBDIR_SUFFIX=64 \ %else From 9a7b4ac902c2719d81e4f60b22683803096c35f3 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 24 Jan 2023 22:38:21 +0000 Subject: [PATCH 34/77] Add back 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch --- ...ed-libraries-to-customize-the-soname.patch | 39 +++++++++++++++++++ clang.spec | 1 + 2 files changed, 40 insertions(+) create mode 100644 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch diff --git a/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch b/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch new file mode 100644 index 0000000..e425475 --- /dev/null +++ b/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch @@ -0,0 +1,39 @@ +From 3dc5722d5c7673a879f2b4680369d3ac8b6b64b6 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Wed, 4 Aug 2021 14:05:38 -0700 +Subject: [PATCH] cmake: Allow shared libraries to customize the soname using + LLVM_ABI_REVISION + +The LLVM_ABI_REVISION variable is intended to be used for release +candidates which introduce an ABI change to a shared library. This +variable can be specified per library, so there is not one global value +for all of LLVM. + +For example, if we LLVM X.0.0-rc2 introduces an ABI change for a library +compared with LLVM X.0.0-rc1, then the LLVM_ABI_REVISION number for +library will be incremented by 1. + +In the main branch, LLVM_ABI_REVISION should always be 0, it is only +meant to be used in the release branch. + +Differential Revision: https://reviews.llvm.org/D105594 +--- + clang/tools/clang-shlib/CMakeLists.txt | 5 +++++ + 3 files changed, 19 insertions(+), 2 deletions(-) + +diff --git a/clang/tools/clang-shlib/CMakeLists.txt b/clang/tools/clang-shlib/CMakeLists.txt +index 9c1f8ea452b3..4d785924e4bb 100644 +--- a/clang/tools/clang-shlib/CMakeLists.txt ++++ b/clang/tools/clang-shlib/CMakeLists.txt +@@ -1,3 +1,8 @@ ++# In the main branch, LLVM_ABI_REVISION should always be 0. In the release ++# branches, this should be incremented before each release candidate every ++# time the ABI of libclang-cpp.so changes. ++set(LLVM_ABI_REVISION 0) ++ + # Building libclang-cpp.so fails if LLVM_ENABLE_PIC=Off + if (NOT LLVM_ENABLE_PIC) + return() +-- +2.27.0 + diff --git a/clang.spec b/clang.spec index dd32292..99bf5f9 100644 --- a/clang.spec +++ b/clang.spec @@ -62,6 +62,7 @@ Patch0: 0001-PATCH-clang-Reorganize-gtest-integration.patch Patch1: 0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch 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 Patch6: 0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch # Make clangBasic and clangDriver depend on LLVMTargetParser From e9eca7e27360715cf2ac4661d0be89636c8f9965 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Thu, 16 Feb 2023 16:15:28 -0300 Subject: [PATCH 35/77] Add more fixes to clang 16.0 1. Remove patches that are not necessary. 2. Re-add a patch that generates DWARF4 by default. 3. Add a patch fixing IEEE 128-bit long double tests on ppc64le. 4. Include cmake code. 5. Other minor issues. Part of these changes are heavily based on or copied from the work from Konrad Kleine in branch upstream-snapshot. --- ...H-clang-Reorganize-gtest-integration.patch | 42 ------ ...t-Fedora-Specific-install-dir-for-li.patch | 45 ------- ...ATCH-clang-Produce-DWARF4-by-default.patch | 123 ++++++++++++++++++ clang.spec | 55 ++++---- fix-ieee128-cross.diff | 16 +++ 5 files changed, 167 insertions(+), 114 deletions(-) delete mode 100644 0001-PATCH-clang-Reorganize-gtest-integration.patch delete mode 100644 0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch create mode 100644 0010-PATCH-clang-Produce-DWARF4-by-default.patch create mode 100644 fix-ieee128-cross.diff diff --git a/0001-PATCH-clang-Reorganize-gtest-integration.patch b/0001-PATCH-clang-Reorganize-gtest-integration.patch deleted file mode 100644 index c63aaf1..0000000 --- a/0001-PATCH-clang-Reorganize-gtest-integration.patch +++ /dev/null @@ -1,42 +0,0 @@ -From cfd535d718631c1266baa628904ddfa95284427d Mon Sep 17 00:00:00 2001 -From: serge-sans-paille -Date: Thu, 25 Feb 2021 14:04:52 +0100 -Subject: [PATCH] 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 be59c199f05f..3f882f7aca59 100644 ---- a/clang/CMakeLists.txt -+++ b/clang/CMakeLists.txt -@@ -118,12 +118,6 @@ 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() - - if(LLVM_LIT) -@@ -506,7 +500,11 @@ endif() - - - if( CLANG_INCLUDE_TESTS ) -- if(EXISTS ${LLVM_THIRD_PARTY_DIR}/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} third-party/unittest) - add_subdirectory(unittests) - list(APPEND CLANG_TEST_DEPS ClangUnitTests) - list(APPEND CLANG_TEST_PARAMS --- -2.39.1 - diff --git a/0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch b/0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch deleted file mode 100644 index 4a8fda9..0000000 --- a/0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch +++ /dev/null @@ -1,45 +0,0 @@ -From a85305a801c39720d7ec1c9441a88fef1ac19435 Mon Sep 17 00:00:00 2001 -From: serge-sans-paille -Date: Fri, 9 Sep 2022 10:17:01 +0200 -Subject: [PATCH] Take into account Fedora Specific install dir for libunwind - ---- - clang/lib/Driver/ToolChains/CommonArgs.cpp | 8 +++++++- - clang/test/Driver/linux-ld.c | 2 +- - 2 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp -index 443725f..c1401a6 100644 ---- a/clang/lib/Driver/ToolChains/CommonArgs.cpp -+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp -@@ -1529,7 +1529,13 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D, - CmdArgs.push_back("-lgcc_s"); - break; - } -- case ToolChain::UNW_CompilerRT: -+ case ToolChain::UNW_CompilerRT: { -+ SmallString<256> DefaultLibPath = -+ llvm::sys::path::parent_path(TC.getDriver().Dir); -+ llvm::sys::path::append(DefaultLibPath, Twine("lib") + CLANG_LIBDIR_SUFFIX); -+ CmdArgs.push_back( -+ strdup(("-L" + DefaultLibPath + "/llvm-unwind").str().c_str())); -+ } - if (TC.getTriple().isOSAIX()) { - // AIX only has libunwind as a shared library. So do not pass - // anything in if -static is specified. -diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c -index e76b35d..dfb8eca 100644 ---- a/clang/test/Driver/linux-ld.c -+++ b/clang/test/Driver/linux-ld.c -@@ -299,7 +299,7 @@ - // RUN: --sysroot=%S/Inputs/basic_linux_tree \ - // RUN: | FileCheck --check-prefix=CHECK-CLANG-ANDROID-STATIC %s - // CHECK-CLANG-ANDROID-STATIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" --// CHECK-CLANG-ANDROID-STATIC: "--start-group" "{{[^"]*}}{{/|\\\\}}libclang_rt.builtins-aarch64-android.a" "-l:libunwind.a" "-lc" "--end-group" -+// CHECK-CLANG-ANDROID-STATIC: "--start-group" "{{[^"]*}}{{/|\\\\}}libclang_rt.builtins-aarch64-android.a" "-L{{[^"]*}}{{/|\\\\}}llvm-unwind" "-l:libunwind.a" "-lc" "--end-group" - // - // RUN: %clang -### %s 2>&1 \ - // RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \ --- -1.8.3.1 - diff --git a/0010-PATCH-clang-Produce-DWARF4-by-default.patch b/0010-PATCH-clang-Produce-DWARF4-by-default.patch new file mode 100644 index 0000000..ea81f74 --- /dev/null +++ b/0010-PATCH-clang-Produce-DWARF4-by-default.patch @@ -0,0 +1,123 @@ +From 4ea62faaaac1aad0fe496cabe9674c809c91c49a Mon Sep 17 00:00:00 2001 +From: Konrad Kleine +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: + +https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8f5b4?diff=unified +--- + 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 +- + 7 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/clang/include/clang/Driver/ToolChain.h b/clang/include/clang/Driver/ToolChain.h +index f75f35dc9e65..a70ae2b17833 100644 +--- a/clang/include/clang/Driver/ToolChain.h ++++ b/clang/include/clang/Driver/ToolChain.h +@@ -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; } ++ virtual unsigned GetDefaultDwarfVersion() const { return 4; } + + // Some toolchains may have different restrictions on the DWARF version and + // may need to adjust it. E.g. NVPTX may need to enforce DWARF2 even when host +diff --git a/clang/test/CodeGen/dwarf-version.c b/clang/test/CodeGen/dwarf-version.c +index 0a6fa4768026..96f01749d0d8 100644 +--- a/clang/test/CodeGen/dwarf-version.c ++++ b/clang/test/CodeGen/dwarf-version.c +@@ -2,8 +2,8 @@ + // RUN: %clang -target x86_64-linux-gnu -gdwarf-3 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER3 + // RUN: %clang -target x86_64-linux-gnu -gdwarf-4 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 + // RUN: %clang -target x86_64-linux-gnu -gdwarf-5 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 +-// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 +-// RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 ++// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 ++// RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 + + // 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 1d588bdfc1b0..1ad57aedc3a4 100644 +--- a/clang/test/Driver/cl-options.c ++++ b/clang/test/Driver/cl-options.c +@@ -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 /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 ++++ b/clang/test/Driver/clang-g-opts.c +@@ -32,7 +32,7 @@ + + // CHECK-WITHOUT-G-NOT: -debug-info-kind + // CHECK-WITH-G: "-debug-info-kind=constructor" +-// CHECK-WITH-G: "-dwarf-version=5" ++// CHECK-WITH-G: "-dwarf-version=4" + // CHECK-WITH-G-DWARF2: "-dwarf-version=2" + + // CHECK-WITH-G-STANDALONE: "-debug-info-kind=standalone" +diff --git a/clang/test/Driver/ve-toolchain.c b/clang/test/Driver/ve-toolchain.c +index 32e25769b6da..b8a2852daba8 100644 +--- a/clang/test/Driver/ve-toolchain.c ++++ b/clang/test/Driver/ve-toolchain.c +@@ -6,7 +6,7 @@ + /// Checking dwarf-version + + // RUN: %clang -### -g --target=ve %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s +-// DWARF_VER: "-dwarf-version=5" ++// DWARF_VER: "-dwarf-version=4" + + ///----------------------------------------------------------------------------- + /// Checking include-path +diff --git a/clang/test/Driver/ve-toolchain.cpp b/clang/test/Driver/ve-toolchain.cpp +index 5a33d5eceb61..cedf895b36dc 100644 +--- a/clang/test/Driver/ve-toolchain.cpp ++++ b/clang/test/Driver/ve-toolchain.cpp +@@ -7,7 +7,7 @@ + + // RUN: %clangxx -### -g --target=ve-unknown-linux-gnu \ + // RUN: %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s +-// DWARF_VER: "-dwarf-version=5" ++// DWARF_VER: "-dwarf-version=4" + + ///----------------------------------------------------------------------------- + /// Checking include-path +-- +2.39.1 + diff --git a/clang.spec b/clang.spec index 99bf5f9..0d6ffa7 100644 --- a/clang.spec +++ b/clang.spec @@ -37,6 +37,7 @@ %endif %global clang_srcdir clang-%{clang_version}%{?rc_ver:rc%{rc_ver}}.src +%global cmake_srcdir cmake-%{clang_version}%{?rc_ver:rc%{rc_ver}}.src %global clang_tools_srcdir clang-tools-extra-%{clang_version}%{?rc_ver:rc%{rc_ver}}.src Name: %pkg_name @@ -52,18 +53,21 @@ Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_ Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz.sig %endif -Source4: release-keys.asc +Source4: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz +Source5: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz.sig +Source6: release-keys.asc %if %{without compat_build} -Source5: macros.%{name} +Source7: macros.%{name} %endif # Patches for clang -Patch0: 0001-PATCH-clang-Reorganize-gtest-integration.patch Patch1: 0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch 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 -Patch6: 0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch +# Drop the following patch after debugedit adds support to DWARF-5: +# https://sourceware.org/bugzilla/show_bug.cgi?id=28728 +Patch5: 0010-PATCH-clang-Produce-DWARF4-by-default.patch # Make clangBasic and clangDriver depend on LLVMTargetParser # See https://reviews.llvm.org/D141581 @@ -72,6 +76,8 @@ Patch7: D141581.diff # See https://reviews.llvm.org/D138472 Patch8: D138472.diff +Patch10: fix-ieee128-cross.diff + %if %{without compat_build} # Patches for clang-tools-extra # See https://reviews.llvm.org/D120301 @@ -254,13 +260,19 @@ Requires: python3 %prep -%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE3}' --data='%{SOURCE0}' +%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE3}' --data='%{SOURCE0}' +%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE5}' --data='%{SOURCE4}' +%setup -T -q -b 4 -n %{cmake_srcdir} +# TODO: It would be more elegant to set -DLLVM_COMMON_CMAKE_UTILS=%{_builddir}/%{cmake_srcdir}, +# but this is not a CACHED variable, so we can't actually set it externally :( +cd .. +mv %{cmake_srcdir} cmake %if %{with compat_build} %autosetup -n %{clang_srcdir} -p2 %else -%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE2}' --data='%{SOURCE1}' +%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE2}' --data='%{SOURCE1}' %setup -T -q -b 1 -n %{clang_tools_srcdir} %autopatch -m200 -p2 @@ -446,20 +458,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}/ %if %{without compat_build} @@ -503,11 +506,11 @@ false %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 %files devel @@ -528,13 +531,10 @@ false %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 @@ -557,19 +557,19 @@ false %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 @@ -581,6 +581,7 @@ false %{_bindir}/clangd %{_bindir}/diagtool %{_bindir}/hmaptool +%{_bindir}/nvptx-arch %{_bindir}/pp-trace %{_bindir}/c-index-test %{_bindir}/find-all-symbols 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 From 0d9e478352b0c34f0ceee983142dc9421135e909 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Thu, 16 Feb 2023 17:05:53 -0300 Subject: [PATCH 36/77] Remove unnecessary file This file stopped being used in 2020. --- hans-gpg-key.asc | 52 ------------------------------------------------ 1 file changed, 52 deletions(-) delete mode 100644 hans-gpg-key.asc 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----- - -mQINBFS+1SABEACnmkESkY7eZq0GhDjbkWpKmURGk9+ycsfAhA44NqUvf4tk1GPM -5SkJ/fYedYZJaDVhIp98fHgucD0O+vjOzghtgwtITusYjiPHPFBd/MN+MQqSEAP+ -LUa/kjHLjgyXxKhFUIDGVaDWL5tKOA7/AQKl1TyJ8lz89NHQoUHFsF/hu10+qhJe -V65d32MXFehIUSvegh8DrPuExrliSiORO4HOhuc6151dWA4YBWVg4rX5kfKrGMMT -pTWnSSZtgoRhkKW2Ey8cmZUqPuUJIfWyeNVu1e4SFtAivLvu/Ymz2WBJcNA1ZlTr -RCOR5SIRgZ453pQnI/Bzna2nnJ/TV1gGJIGRahj/ini0cs2x1CILfS/YJQ3rWGGo -OxwG0BVmPk0cmLVtyTq8gUPwxcPUd6WcBKhot3TDMlrffZACnQwQjlVjk5S1dEEz -atUfpEuNitU9WOM4jr/gjv36ZNCOWm95YwLhsuci/NddBN8HXhyvs+zYTVZEXa2W -l/FqOdQsQqZBcJjjWckGKhESdd7934+cesGD3O8KaeSGxww7slJrS0+6QJ8oBoAB -P/WCn/y2AiY2syEKp3wYIGJyAbsm542zMZ4nc7pYfSu49mcyhQQICmqN5QvOyYUx -OSqwbAOUNtlOyeRLZNIKoXtTqWDEu5aEiDROTw6Rkq+dIcxPNgOLdeQ3HwARAQAB -tCFIYW5zIFdlbm5ib3JnIDxoYW5zQGNocm9taXVtLm9yZz6JAlUEEwECAD8CGwMG -CwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAFiEEtsj5goK5ROOw1cJTD8MELjRa0F0F -Alpd+i0FCQ8FJo0ACgkQD8MELjRa0F3X3A//dBQLm6GmXlQFjxZbukTw0lZsevFR -M/6ljZTxp7bsC+HFzYoaCKv6rikaWzytxk//SOaLKrB4Z9HjAlpBMtyLl2Hk7tcZ -bPpFafNmQ+4KgWNjLXCvt9se8BGrQvGQUrbE6YowbXa2YIgxIVEncFzIECAsp/+N -xbMcZN5/X1PJxKi/N22gP4nn47muN6L3pKez3CXgWnhGYSc7BuD5ALWYH7yMYUem -d4jlXfu5xkBIqirj1arIYC9wmF4ldbLNDPuracc8LmXcSqa5Rpao0s4iVzAD+tkX -vE/73m3rhepwBXxrfk0McXuI9aucf5h4/KkIBzZsaJ6JM1tzlrJzzjaBKJF9OI5T -jA0qTxdGzdPztS8gPaPcMkRFfh9ti0ZDx4VeF3s8sOtmMRHeGEWfxqUAbBUbwFsa -JDu/+8/VO4KijfcuUi8tqJ/JHeosCuGE7TM93LwJu6ZcqMYOPDROE/hsnGm0ZU92 -xedu+07/X1ESHkSFPoaSHD5/DCNa/tXIyJZ8X7gF3eoDP5mSmrJqIqsOBR9WOVYv -dI8i0GHTXbrZj8WXdoS+N8wlyMLLbAS2jvTe7M5RoqbLz4ABOUUnLVoEE0CiccVZ -bW75BPxOfaD0szbinAeX6HDPI7St0MbKrRPjuDXjD0JVkLqFINtZfYLGMLss4tgn -suefr0Bo9ISwG3u5Ag0EVL7VIAEQAOxBxrQesChjrCqKjY5PnSsSYpeb4froucrC -898AFw2DgN/Zz+W7wtSTbtz/GRcCurjzZvN7o2rCuNk0j0+s1sgZZm2BdldlabLy -+UF/kSW1rb5qhfXcGGubu48OMdtSfok9lOc0Q1L4HNlGE4lUBkZzmI7Ykqfl+Bwr -m9rpi54g4ua9PIiiHIAmMoZIcbtOG1KaDr6CoXRk/3g2ZiGUwhq3jFGroiBsKEap -2FJ1bh5NJk2Eg8pV7fMOF7hUQKBZrNOtIPu8hA5WEgku3U3VYjRSI3SDi6QXnDL+ -xHxajiWpKtF3JjZh8y/CCTD8PyP34YjfZuFmkdske5cdx6H0V2UCiH453ncgFVdQ -DXkY4n+0MTzhy2xu0IVVnBxYDYNhi+3MjTHJd9C4xMi9t+5IuEvDAPhgfZjDpQak -EPz6hVmgj0mlKIgRilBRK9/kOxky9utBpGk3jEJGru/hKNloFNspoYtY6zATAr8E -cOgoCFQE0nIktcg3wF9+OCEnV28/a7XZwUZ7Gl/qfOHtdr374wo8kd8R3V8d2G9q -5w0/uCV9NNQ0fGWZDPDoYt6wnPL6gZv/nJM8oZY+u0rC24WwScZIniaryC4JHDas -Ahr2S2CtgCvBgslK6f3gD16KHxPZMBpX73TzOYIhMEP/vXgVJbUD6dYht+U9c4Oh -EDJown0dABEBAAGJAjwEGAECACYCGwwWIQS2yPmCgrlE47DVwlMPwwQuNFrQXQUC -Wl36SwUJDwUmqwAKCRAPwwQuNFrQXT1/D/9YpRDNgaJl3YVDtVZoeQwh7BQ6ULZT -eXFPogYkF2j3VWg8s9UmAs4sg/4a+9KLSantXjX+JFsRv0lQe5Gr/Vl8VQ4LKEXB -fiGmSivjIZ7eopdd3YP2w6G5T3SA4d2CQfsg4rnJPnXIjzKNiSOi368ybnt9fL0Y -2r2aqLTmP6Y7issDUO+J1TW1XHm349JPR0Hl4cTuNnWm4JuX2m2CJEc5XBlDAha9 -pUVs+J5C2D0UFFkyeOzeJPwy6x5ApWHm84n8AjhQSpu1qRKxKXdwei6tkQWWMHui -+TgSY/zCkmD9/oY15Ei5avJ4WgIbTLJUoZMi70riPmU8ThjpzA7S+Nk0g7rMPq+X -l1whjKU/u0udlsrIJjzkh6ftqKUmIkbxYTpjhnEujNrEr5m2S6Z6x3y9E5QagBMR -dxRhfk+HbyACcP/p9rXOzl4M291DoKeAAH70GHniGxyNs9rAoMr/hD5XW/Wrz3dc -KMc2s555E6MZILE2ZiolcRn+bYOMPZtWlbx98t8uqMf49gY4FGQBZAwPglMrx7mr -m7HTIiXahThQGOJg6izJDAD5RwSEGlAcL28T8KAuM6CLLkhlBfQwiKsUBNnh9r8w -V3lB+pV0GhL+3i077gTYfZBRwLzjFdhm9xUKEaZ6rN1BX9lzix4eSNK5nln0jUq1 -67H2IH//2sf8dw== -=ADVe ------END PGP PUBLIC KEY BLOCK----- From af8d183fda0193fc9909703aca5de7a73ccc164c Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Thu, 16 Feb 2023 17:08:11 -0300 Subject: [PATCH 37/77] Improve .gitignore Replace many entries with a few entries with globs. Add new files and directories in order to prevent unintentional changes. --- .gitignore | 242 ++--------------------------------------------------- 1 file changed, 5 insertions(+), 237 deletions(-) diff --git a/.gitignore b/.gitignore index 10fb754..4f5174a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,237 +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 -/clang-tools-extra-12.0.1rc1.src.tar.xz -/clang-tools-extra-12.0.1rc1.src.tar.xz.sig -/clang-12.0.1rc1.src.tar.xz -/clang-12.0.1rc1.src.tar.xz.sig -/clang-12.0.1rc3.src.tar.xz -/clang-12.0.1rc3.src.tar.xz.sig -/clang-tools-extra-12.0.1rc3.src.tar.xz -/clang-tools-extra-12.0.1rc3.src.tar.xz.sig -/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.0rc1.src.tar.xz -/clang-13.0.0rc1.src.tar.xz.sig -/clang-tools-extra-13.0.0rc1.src.tar.xz -/clang-tools-extra-13.0.0rc1.src.tar.xz.sig -/clang-13.0.0rc3.src.tar.xz -/clang-13.0.0rc3.src.tar.xz.sig -/clang-tools-extra-13.0.0rc3.src.tar.xz -/clang-tools-extra-13.0.0rc3.src.tar.xz.sig -/clang-13.0.0rc4.src.tar.xz -/clang-tools-extra-13.0.0rc4.src.tar.xz.sig -/clang-tools-extra-13.0.0rc4.src.tar.xz -/clang-13.0.0rc4.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.sig -/clang-tools-extra-13.0.0.src.tar.xz -/clang-13.0.1rc1.src.tar.xz -/clang-13.0.1rc1.src.tar.xz.sig -/clang-tools-extra-13.0.1rc1.src.tar.xz -/clang-tools-extra-13.0.1rc1.src.tar.xz.sig -/clang-13.0.1rc2.src.tar.xz -/clang-13.0.1rc2.src.tar.xz.sig -/clang-tools-extra-13.0.1rc2.src.tar.xz -/clang-tools-extra-13.0.1rc2.src.tar.xz.sig -/clang-13.0.1rc3.src.tar.xz -/clang-13.0.1rc3.src.tar.xz.sig -/clang-tools-extra-13.0.1rc3.src.tar.xz -/clang-tools-extra-13.0.1rc3.src.tar.xz.sig -/clang-13.0.1.src.tar.xz -/clang-13.0.1.src.tar.xz.sig -/clang-tools-extra-13.0.1.src.tar.xz -/clang-tools-extra-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 -/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 -/clang-tools-extra-15.0.0.src.tar.xz -/clang-tools-extra-15.0.0.src.tar.xz.sig -/clang-15.0.0.src.tar.xz -/clang-15.0.0.src.tar.xz.sig -/clang-tools-extra-15.0.4.src.tar.xz -/clang-tools-extra-15.0.4.src.tar.xz.sig -/clang-15.0.4.src.tar.xz -/clang-15.0.4.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/ From 1bafe64a40187149631a24b28c071b8cc5dca4d9 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Fri, 3 Mar 2023 10:16:01 -0300 Subject: [PATCH 38/77] Update to LLVM 16.0.0 RC3 --- clang.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clang.spec b/clang.spec index 0d6ffa7..6f643ac 100644 --- a/clang.spec +++ b/clang.spec @@ -10,7 +10,7 @@ %global maj_ver 16 %global min_ver 0 %global patch_ver 0 -%global rc_ver 1 +%global rc_ver 3 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} %if %{with compat_build} @@ -42,7 +42,7 @@ 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: Apache-2.0 WITH LLVM-exception OR NCSA @@ -611,6 +611,9 @@ false %endif %changelog +* Thu Feb 23 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc3-1 +- Update to LLVM 16.0.0 RC3 + * Thu Jan 19 2023 Tulio Magno Quites Machado Filho - 15.0.7-3 - Update license to SPDX identifiers. - Include the Apache license adopted in 2019. From 4cb2bd60c5856d81b8dc2c4beee7f54fc308bd69 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Tue, 14 Mar 2023 17:10:39 -0300 Subject: [PATCH 39/77] Fix RPM macro clang_resource_dir --- clang.spec | 5 ++++- macros.clang | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/clang.spec b/clang.spec index 6f643ac..c2cd681 100644 --- a/clang.spec +++ b/clang.spec @@ -42,7 +42,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -611,6 +611,9 @@ false %endif %changelog +* Tue Mar 14 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc3-2 +- Fix RPM macro clang_resource_dir + * Thu Feb 23 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc3-1 - Update to LLVM 16.0.0 RC3 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. From f419afebc411a8f5278c44d6c177260676d71c69 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Wed, 15 Mar 2023 14:20:42 -0300 Subject: [PATCH 40/77] Update to LLVM 16.0.0 RC4 --- clang.spec | 7 +++++-- sources | 10 ++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/clang.spec b/clang.spec index c2cd681..ef985a7 100644 --- a/clang.spec +++ b/clang.spec @@ -10,7 +10,7 @@ %global maj_ver 16 %global min_ver 0 %global patch_ver 0 -%global rc_ver 3 +%global rc_ver 4 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} %if %{with compat_build} @@ -42,7 +42,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: Apache-2.0 WITH LLVM-exception OR NCSA @@ -611,6 +611,9 @@ false %endif %changelog +* Tue Mar 14 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc4-1 +- Update to LLVM 16.0.0 RC4 + * Tue Mar 14 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc3-2 - Fix RPM macro clang_resource_dir diff --git a/sources b/sources index 217a12d..02411d0 100644 --- a/sources +++ b/sources @@ -1,4 +1,6 @@ -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 (clang-16.0.0rc4.src.tar.xz) = ac34caacf238a359a9f4dc7f6d7f8ea09869ec45b0ae768a54bb35cf9066e8dbe5dc32f0536f7501b1769e733c9000aa7298bee279ea26e560956de2a284ad7a +SHA512 (clang-16.0.0rc4.src.tar.xz.sig) = ee6c6cf2f44140b69be0d892e405bcbd85b43bc003cf55fe6b295c3a8c32fda53fd9e75b237f5497b5b6c9c18c6d01a9222be740f63afd3b163e544db13eedd0 +SHA512 (clang-tools-extra-16.0.0rc4.src.tar.xz) = 1bdbebeb09b31ba421b514e3aa6e8d22bdc112e994cf803044f3a6f6887f6cc870ded2d62286a87b8e6554794cad7bfeaf39a77b68715be5d992200c770edc18 +SHA512 (clang-tools-extra-16.0.0rc4.src.tar.xz.sig) = 9ecc0c335ecc9f50cbbb5ca94f096e17bc9396d4554a000c07af0a15a88de6556234f2dba30b5c5fedb2cc90215876257be28f5738df1b85478d39526f4e1530 +SHA512 (cmake-16.0.0rc4.src.tar.xz) = 888cd3cf6a8eeca1306ab8a45fbcf0fdc91f10e34dc29a0bf7aef5b1efc9af0ab54866584857fbfb725147c8e4bc1a11e8a1b247fe439ebf93fe6a73fb004101 +SHA512 (cmake-16.0.0rc4.src.tar.xz.sig) = c2e4d7b79c5d2524449b8444eb4a9e1e625c50fc27dabcdd7410f44cc5b67cdd7931a5f31bc4b7652a034687d10d551aa9d89e3c01771d1b3e42b2b3a901745f From daaf0ad7abb878795c84b7d6caafdc2cbc95239b Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Fri, 17 Mar 2023 08:17:08 -0300 Subject: [PATCH 41/77] Fix ppc64le tests with the right triple --- 0001-PowerPC-clang-Fix-triple.patch | 26 ++++++++++++++++++++++++++ clang.spec | 8 ++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 0001-PowerPC-clang-Fix-triple.patch 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/clang.spec b/clang.spec index ef985a7..8902465 100644 --- a/clang.spec +++ b/clang.spec @@ -42,7 +42,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -68,7 +68,8 @@ Patch4: 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch # Drop the following patch after debugedit adds support to DWARF-5: # https://sourceware.org/bugzilla/show_bug.cgi?id=28728 Patch5: 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 @@ -611,6 +612,9 @@ false %endif %changelog +* Thu Mar 16 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc4-2 +- Fix tests with the right triple + * Tue Mar 14 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc4-1 - Update to LLVM 16.0.0 RC4 From 914aca4e3560156bc9f8604b107d776e557c0bd3 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Tue, 21 Mar 2023 08:55:44 -0300 Subject: [PATCH 42/77] Update to LLVM 16.0.0 --- clang.spec | 7 +++++-- sources | 12 ++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/clang.spec b/clang.spec index 8902465..77a0aca 100644 --- a/clang.spec +++ b/clang.spec @@ -10,7 +10,7 @@ %global maj_ver 16 %global min_ver 0 %global patch_ver 0 -%global rc_ver 4 +#global rc_ver 4 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} %if %{with compat_build} @@ -42,7 +42,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: Apache-2.0 WITH LLVM-exception OR NCSA @@ -612,6 +612,9 @@ false %endif %changelog +* Mon Mar 20 2023 Tulio Magno Quites Machado Filho - 16.0.0-1 +- Update to LLVM 16.0.0 + * Thu Mar 16 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc4-2 - Fix tests with the right triple diff --git a/sources b/sources index 02411d0..c1b29d2 100644 --- a/sources +++ b/sources @@ -1,6 +1,6 @@ -SHA512 (clang-16.0.0rc4.src.tar.xz) = ac34caacf238a359a9f4dc7f6d7f8ea09869ec45b0ae768a54bb35cf9066e8dbe5dc32f0536f7501b1769e733c9000aa7298bee279ea26e560956de2a284ad7a -SHA512 (clang-16.0.0rc4.src.tar.xz.sig) = ee6c6cf2f44140b69be0d892e405bcbd85b43bc003cf55fe6b295c3a8c32fda53fd9e75b237f5497b5b6c9c18c6d01a9222be740f63afd3b163e544db13eedd0 -SHA512 (clang-tools-extra-16.0.0rc4.src.tar.xz) = 1bdbebeb09b31ba421b514e3aa6e8d22bdc112e994cf803044f3a6f6887f6cc870ded2d62286a87b8e6554794cad7bfeaf39a77b68715be5d992200c770edc18 -SHA512 (clang-tools-extra-16.0.0rc4.src.tar.xz.sig) = 9ecc0c335ecc9f50cbbb5ca94f096e17bc9396d4554a000c07af0a15a88de6556234f2dba30b5c5fedb2cc90215876257be28f5738df1b85478d39526f4e1530 -SHA512 (cmake-16.0.0rc4.src.tar.xz) = 888cd3cf6a8eeca1306ab8a45fbcf0fdc91f10e34dc29a0bf7aef5b1efc9af0ab54866584857fbfb725147c8e4bc1a11e8a1b247fe439ebf93fe6a73fb004101 -SHA512 (cmake-16.0.0rc4.src.tar.xz.sig) = c2e4d7b79c5d2524449b8444eb4a9e1e625c50fc27dabcdd7410f44cc5b67cdd7931a5f31bc4b7652a034687d10d551aa9d89e3c01771d1b3e42b2b3a901745f +SHA512 (clang-16.0.0.src.tar.xz) = 2a6ff3b4d61b4e9fcb60a6d9dae451170cd91acc25f924a29c18c579ee78af76d2d5eebb2940d61676e2e791fb247ccf9f5377b5528f3a0fa7dd0ac8e72816ba +SHA512 (clang-16.0.0.src.tar.xz.sig) = 3f68c324f50ff467138397fb75f616dfae7efcf6e26692baf6b79efc02da30573c45ac13d5bfdcc0ef9d0eae3484cf0cbfc7d5c7ad4037d07210edb8be72ab86 +SHA512 (clang-tools-extra-16.0.0.src.tar.xz) = a96498a3ce72cfa1be783455bbdbbde22ee3842652c584cabbae8ca0658ad394ede479cad1d8535bc1c5dc95a52551a059394e968d69b3e9745a95229aecdcc2 +SHA512 (clang-tools-extra-16.0.0.src.tar.xz.sig) = b6cf64f1eef00eaa5034850a4badb37a17522980633c2d12b52ca578c67d44843f2652a1ff5c505a219bf5fc2928d85d147cf4dca28308ebb8433a1ee6e41342 +SHA512 (cmake-16.0.0.src.tar.xz) = 4f21461aa8165061dbea47dcda4f098957e16bd307484bcb66884cf5a0776197f69a74002d5601229c4630db53ac44049f3f2ce1e96a6bb16ba3df828d387932 +SHA512 (cmake-16.0.0.src.tar.xz.sig) = c8e22d62b73ed56e66af6e7ce7a8f41de7cc16cd1243ebb602a3e5077141c03d64ca75295ca08b0051c887f59c7a53b871f7a45ead3275e11310f574a50856aa From 1903e547f9943cfe4e64d9d0e364897b24c8f6f4 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Mon, 27 Mar 2023 09:18:28 -0300 Subject: [PATCH 43/77] Remove unnecessary patch and macro --- ...ed-libraries-to-customize-the-soname.patch | 39 ------------------- clang.spec | 7 ++-- 2 files changed, 4 insertions(+), 42 deletions(-) delete mode 100644 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch diff --git a/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch b/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch deleted file mode 100644 index e425475..0000000 --- a/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 3dc5722d5c7673a879f2b4680369d3ac8b6b64b6 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Wed, 4 Aug 2021 14:05:38 -0700 -Subject: [PATCH] cmake: Allow shared libraries to customize the soname using - LLVM_ABI_REVISION - -The LLVM_ABI_REVISION variable is intended to be used for release -candidates which introduce an ABI change to a shared library. This -variable can be specified per library, so there is not one global value -for all of LLVM. - -For example, if we LLVM X.0.0-rc2 introduces an ABI change for a library -compared with LLVM X.0.0-rc1, then the LLVM_ABI_REVISION number for -library will be incremented by 1. - -In the main branch, LLVM_ABI_REVISION should always be 0, it is only -meant to be used in the release branch. - -Differential Revision: https://reviews.llvm.org/D105594 ---- - clang/tools/clang-shlib/CMakeLists.txt | 5 +++++ - 3 files changed, 19 insertions(+), 2 deletions(-) - -diff --git a/clang/tools/clang-shlib/CMakeLists.txt b/clang/tools/clang-shlib/CMakeLists.txt -index 9c1f8ea452b3..4d785924e4bb 100644 ---- a/clang/tools/clang-shlib/CMakeLists.txt -+++ b/clang/tools/clang-shlib/CMakeLists.txt -@@ -1,3 +1,8 @@ -+# In the main branch, LLVM_ABI_REVISION should always be 0. In the release -+# branches, this should be incremented before each release candidate every -+# time the ABI of libclang-cpp.so changes. -+set(LLVM_ABI_REVISION 0) -+ - # Building libclang-cpp.so fails if LLVM_ENABLE_PIC=Off - if (NOT LLVM_ENABLE_PIC) - return() --- -2.27.0 - diff --git a/clang.spec b/clang.spec index 77a0aca..57a379f 100644 --- a/clang.spec +++ b/clang.spec @@ -42,7 +42,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -64,7 +64,6 @@ Source7: macros.%{name} Patch1: 0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch 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 # Drop the following patch after debugedit adds support to DWARF-5: # https://sourceware.org/bugzilla/show_bug.cgi?id=28728 Patch5: 0010-PATCH-clang-Produce-DWARF4-by-default.patch @@ -345,7 +344,6 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py %endif %if %{with compat_build} -DCLANG_BUILD_TOOLS:BOOL=OFF \ - -DLLVM_CMAKE_DIR=%{install_libdir}/cmake/llvm \ -DCMAKE_INSTALL_PREFIX=%{install_prefix} \ -DCLANG_INCLUDE_TESTS:BOOL=OFF \ %else @@ -612,6 +610,9 @@ false %endif %changelog +* Thu Mar 23 2023 Tulio Magno Quites Machado Filho - 16.0.0-2 +- Remove unnecessary patch and macro + * Mon Mar 20 2023 Tulio Magno Quites Machado Filho - 16.0.0-1 - Update to LLVM 16.0.0 From 26e1e7260310de53883e673fcc71707ebe398709 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Tue, 4 Apr 2023 17:13:57 -0300 Subject: [PATCH 44/77] Remove pocl-related tests pocl has been FTBFS since Fedora 38. There is a plan to orphan it. --- tests/build-gating-pocl.fmf | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 tests/build-gating-pocl.fmf diff --git a/tests/build-gating-pocl.fmf b/tests/build-gating-pocl.fmf deleted file mode 100644 index 6fda183..0000000 --- a/tests/build-gating-pocl.fmf +++ /dev/null @@ -1,34 +0,0 @@ -summary: PoCL clang tests for build/PR gating -adjust: - - because: "Plan to be ran when either executed locally, or executed by CI system to gate a build or PR." - when: >- - trigger is defined - and trigger != commit - and trigger != build - enabled: false - - - because: "PoCL is shipped with Fedora, not RHEL/CentOS" - when: >- - distro == rhel - or distro == centos - enabled: false - -discover: - how: fmf - test: pocl - url: https://src.fedoraproject.org/tests/clang.git - ref: main -execute: - how: tmt -prepare: - # Programs linked against pocl should be able to run without clang installed, - # so when we run the test we want to make sure clang is not installed to - # verify we haven't introduced an implicit dependency on clang. - - name: Drop clang - how: shell - script: | - dnf erase -y clang - -provision: - hardware: - memory: ">= 4 GiB" From 1ed3539a3fb13658867075059f0d91672a48400a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 12 Apr 2023 13:48:18 +0200 Subject: [PATCH 45/77] Use correct source for macros file --- clang.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clang.spec b/clang.spec index 57a379f..501db06 100644 --- a/clang.spec +++ b/clang.spec @@ -42,7 +42,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -406,7 +406,7 @@ rm -Rf %{buildroot}%{install_prefix}/lib/{libear,libscanbuild} # 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 %{SOURCE5} %{buildroot}%{_rpmmacrodir}/macros.%{name} +install -p -m0644 -D %{SOURCE7} %{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}|" \ @@ -610,6 +610,9 @@ false %endif %changelog +* Wed Apr 12 2023 Timm Bäder - 16.0.0-3 +- Use correct source for clang.macros file + * Thu Mar 23 2023 Tulio Magno Quites Machado Filho - 16.0.0-2 - Remove unnecessary patch and macro From 9a88eef781b16fd857927e97a9a22f131b55c363 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Tue, 11 Apr 2023 19:15:25 +0200 Subject: [PATCH 46/77] Move LLVM_CMAKE_DIR to compat builds partially reverts 1903e547f9943cfe4e64d9d0e364897b24c8f6f4 --- clang.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index 501db06..0c5d51b 100644 --- a/clang.spec +++ b/clang.spec @@ -346,6 +346,7 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py -DCLANG_BUILD_TOOLS:BOOL=OFF \ -DCMAKE_INSTALL_PREFIX=%{install_prefix} \ -DCLANG_INCLUDE_TESTS:BOOL=OFF \ + -DLLVM_CMAKE_DIR=%{install_libdir}/cmake/llvm \ %else -DCLANG_INCLUDE_TESTS:BOOL=ON \ -DLLVM_BUILD_UTILS:BOOL=ON \ @@ -353,7 +354,6 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py -DLLVM_EXTERNAL_LIT=%{_bindir}/lit \ -DLLVM_LIT_ARGS="-vv" \ -DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \ - -DLLVM_CMAKE_DIR=/usr/%{_lib}/cmake/llvm \ %if 0%{?__isa_bits} == 64 -DLLVM_LIBDIR_SUFFIX=64 \ %else From 99fab0032237c7a8da020392397ff41a5b44c121 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Wed, 12 Apr 2023 22:22:34 -0300 Subject: [PATCH 47/77] Update to LLVM 16.0.1 --- clang.spec | 7 +++++-- sources | 12 ++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/clang.spec b/clang.spec index 0c5d51b..856d2c3 100644 --- a/clang.spec +++ b/clang.spec @@ -9,7 +9,7 @@ %global maj_ver 16 %global min_ver 0 -%global patch_ver 0 +%global patch_ver 1 #global rc_ver 4 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} @@ -42,7 +42,7 @@ 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: Apache-2.0 WITH LLVM-exception OR NCSA @@ -610,6 +610,9 @@ false %endif %changelog +* Wed Apr 12 2023 Tulio Magno Quites Machado Filho - 16.0.1-1 +- Update to LLVM 16.0.1 + * Wed Apr 12 2023 Timm Bäder - 16.0.0-3 - Use correct source for clang.macros file diff --git a/sources b/sources index c1b29d2..c70dde7 100644 --- a/sources +++ b/sources @@ -1,6 +1,6 @@ -SHA512 (clang-16.0.0.src.tar.xz) = 2a6ff3b4d61b4e9fcb60a6d9dae451170cd91acc25f924a29c18c579ee78af76d2d5eebb2940d61676e2e791fb247ccf9f5377b5528f3a0fa7dd0ac8e72816ba -SHA512 (clang-16.0.0.src.tar.xz.sig) = 3f68c324f50ff467138397fb75f616dfae7efcf6e26692baf6b79efc02da30573c45ac13d5bfdcc0ef9d0eae3484cf0cbfc7d5c7ad4037d07210edb8be72ab86 -SHA512 (clang-tools-extra-16.0.0.src.tar.xz) = a96498a3ce72cfa1be783455bbdbbde22ee3842652c584cabbae8ca0658ad394ede479cad1d8535bc1c5dc95a52551a059394e968d69b3e9745a95229aecdcc2 -SHA512 (clang-tools-extra-16.0.0.src.tar.xz.sig) = b6cf64f1eef00eaa5034850a4badb37a17522980633c2d12b52ca578c67d44843f2652a1ff5c505a219bf5fc2928d85d147cf4dca28308ebb8433a1ee6e41342 -SHA512 (cmake-16.0.0.src.tar.xz) = 4f21461aa8165061dbea47dcda4f098957e16bd307484bcb66884cf5a0776197f69a74002d5601229c4630db53ac44049f3f2ce1e96a6bb16ba3df828d387932 -SHA512 (cmake-16.0.0.src.tar.xz.sig) = c8e22d62b73ed56e66af6e7ce7a8f41de7cc16cd1243ebb602a3e5077141c03d64ca75295ca08b0051c887f59c7a53b871f7a45ead3275e11310f574a50856aa +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 +SHA512 (cmake-16.0.1.src.tar.xz) = 7a0f01a82660a953e06b1df267918542205ac46f151d284dca74255c36fe5ccd995266638a85ce502a81cdd5e76ff3311e5f8488e09d0abbf22ee07cec186f5f +SHA512 (cmake-16.0.1.src.tar.xz.sig) = 8d49050e9b04df253a5bb2fa3b27796f204d085610432826bef6bb6cab876990d67e7fd5267fc89fadf21d88da73c535c82ae6ea0e1c867f7cd5efac244b0fa2 From 6afe272e01c91928e5add086e63d1dc58caf4c9e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 17 Apr 2023 16:46:38 +0200 Subject: [PATCH 48/77] Remove cmake source in favor of patch Remove cmake source in favor of using LLVM_COMMON_CMAKE_UTILS with the installed cmake files and a patch, same as is done in some of the other subprojects. --- ...Change-LLVM_COMMON_CMAKE_UTILS-usage.patch | 30 +++++++++++++++++++ clang.spec | 22 +++++--------- sources | 2 -- 3 files changed, 38 insertions(+), 16 deletions(-) create mode 100644 0001-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch 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/clang.spec b/clang.spec index 856d2c3..aaa1289 100644 --- a/clang.spec +++ b/clang.spec @@ -37,7 +37,6 @@ %endif %global clang_srcdir clang-%{clang_version}%{?rc_ver:rc%{rc_ver}}.src -%global cmake_srcdir cmake-%{clang_version}%{?rc_ver:rc%{rc_ver}}.src %global clang_tools_srcdir clang-tools-extra-%{clang_version}%{?rc_ver:rc%{rc_ver}}.src Name: %pkg_name @@ -53,11 +52,9 @@ Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_ Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz.sig %endif -Source4: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz -Source5: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz.sig -Source6: release-keys.asc +Source4: release-keys.asc %if %{without compat_build} -Source7: macros.%{name} +Source5: macros.%{name} %endif # Patches for clang @@ -78,6 +75,8 @@ Patch8: D138472.diff Patch10: fix-ieee128-cross.diff +Patch11: 0001-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch + %if %{without compat_build} # Patches for clang-tools-extra # See https://reviews.llvm.org/D120301 @@ -260,19 +259,13 @@ Requires: python3 %prep -%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE3}' --data='%{SOURCE0}' -%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE5}' --data='%{SOURCE4}' +%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE3}' --data='%{SOURCE0}' -%setup -T -q -b 4 -n %{cmake_srcdir} -# TODO: It would be more elegant to set -DLLVM_COMMON_CMAKE_UTILS=%{_builddir}/%{cmake_srcdir}, -# but this is not a CACHED variable, so we can't actually set it externally :( -cd .. -mv %{cmake_srcdir} cmake %if %{with compat_build} %autosetup -n %{clang_srcdir} -p2 %else -%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE2}' --data='%{SOURCE1}' +%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE2}' --data='%{SOURCE1}' %setup -T -q -b 1 -n %{clang_tools_srcdir} %autopatch -m200 -p2 @@ -366,6 +359,7 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py %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 \ @@ -406,7 +400,7 @@ rm -Rf %{buildroot}%{install_prefix}/lib/{libear,libscanbuild} # 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 %{SOURCE7} %{buildroot}%{_rpmmacrodir}/macros.%{name} +install -p -m0644 -D %{SOURCE5} %{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}|" \ diff --git a/sources b/sources index c70dde7..24761e4 100644 --- a/sources +++ b/sources @@ -2,5 +2,3 @@ SHA512 (clang-16.0.1.src.tar.xz) = c7ef4c386471850f30e194d0a8afe95fdd366c9182b1c 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 -SHA512 (cmake-16.0.1.src.tar.xz) = 7a0f01a82660a953e06b1df267918542205ac46f151d284dca74255c36fe5ccd995266638a85ce502a81cdd5e76ff3311e5f8488e09d0abbf22ee07cec186f5f -SHA512 (cmake-16.0.1.src.tar.xz.sig) = 8d49050e9b04df253a5bb2fa3b27796f204d085610432826bef6bb6cab876990d67e7fd5267fc89fadf21d88da73c535c82ae6ea0e1c867f7cd5efac244b0fa2 From f6ef7a155ed5c7a98a688e0fb3192db00e264c58 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Wed, 26 Apr 2023 11:23:02 -0300 Subject: [PATCH 49/77] Update to LLVM 16.0.2 --- clang.spec | 5 ++++- sources | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/clang.spec b/clang.spec index aaa1289..54ad1c0 100644 --- a/clang.spec +++ b/clang.spec @@ -9,7 +9,7 @@ %global maj_ver 16 %global min_ver 0 -%global patch_ver 1 +%global patch_ver 2 #global rc_ver 4 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} @@ -604,6 +604,9 @@ false %endif %changelog +* Wed Apr 26 2023 Tulio Magno Quites Machado Filho - 16.0.2-1 +- Update to LLVM 16.0.2 + * Wed Apr 12 2023 Tulio Magno Quites Machado Filho - 16.0.1-1 - Update to LLVM 16.0.1 diff --git a/sources b/sources index 24761e4..964d562 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -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 +SHA512 (clang-16.0.2.src.tar.xz) = 320d39303432f11f0079f0de62b8807a4b3439b2000564844765401557c77f8ab3be2f578bbe586cd2ea4c03128f06f8dbccc3df7984a3d747e2681e98b219f1 +SHA512 (clang-16.0.2.src.tar.xz.sig) = ea30a13ea4b95798c3aa1e419df19f79eef492ada680fd62a0d47089f89fdf87767656a1ea778d2e3fd7eb93af5fd58d07d78d6c03d60234665c445a73518712 +SHA512 (clang-tools-extra-16.0.2.src.tar.xz) = 8bd8d8dd81b44773a80be176de16dc7cf6958d08c75fe29b44d5c7fd630fd6483a997e00418dffde166816b6b265d5d6aff1973fb56e40dc812dca1ac326559c +SHA512 (clang-tools-extra-16.0.2.src.tar.xz.sig) = 84e1036d3cf797543358ef10bd622be8288acadf7acef462341e87da728a622125e14a884fc38951dd9040d98b0b85f5800faad35f1f30095635f7c8b8d93b1b From 90664d8d6ad97f6cd3d8ef297c90d9c7e02c0214 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Wed, 10 May 2023 07:13:20 -0300 Subject: [PATCH 50/77] Update to LLVM 16.0.3 --- clang.spec | 5 ++++- sources | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/clang.spec b/clang.spec index 54ad1c0..695476d 100644 --- a/clang.spec +++ b/clang.spec @@ -9,7 +9,7 @@ %global maj_ver 16 %global min_ver 0 -%global patch_ver 2 +%global patch_ver 3 #global rc_ver 4 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} @@ -604,6 +604,9 @@ false %endif %changelog +* Tue May 09 2023 Tulio Magno Quites Machado Filho - 16.0.3-1 +- Update to LLVM 16.0.3 + * Wed Apr 26 2023 Tulio Magno Quites Machado Filho - 16.0.2-1 - Update to LLVM 16.0.2 diff --git a/sources b/sources index 964d562..69fb95b 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-16.0.2.src.tar.xz) = 320d39303432f11f0079f0de62b8807a4b3439b2000564844765401557c77f8ab3be2f578bbe586cd2ea4c03128f06f8dbccc3df7984a3d747e2681e98b219f1 -SHA512 (clang-16.0.2.src.tar.xz.sig) = ea30a13ea4b95798c3aa1e419df19f79eef492ada680fd62a0d47089f89fdf87767656a1ea778d2e3fd7eb93af5fd58d07d78d6c03d60234665c445a73518712 -SHA512 (clang-tools-extra-16.0.2.src.tar.xz) = 8bd8d8dd81b44773a80be176de16dc7cf6958d08c75fe29b44d5c7fd630fd6483a997e00418dffde166816b6b265d5d6aff1973fb56e40dc812dca1ac326559c -SHA512 (clang-tools-extra-16.0.2.src.tar.xz.sig) = 84e1036d3cf797543358ef10bd622be8288acadf7acef462341e87da728a622125e14a884fc38951dd9040d98b0b85f5800faad35f1f30095635f7c8b8d93b1b +SHA512 (clang-16.0.3.src.tar.xz) = 3db2806f1f5155c9df377f0e4b47f200814a2ca84ffd9eda7edafa3a85de76af92b3413388be48918432c5d0592d7d07f2618064ef7e7be7c97c9b29793829b8 +SHA512 (clang-16.0.3.src.tar.xz.sig) = 447245e1c0b9f94539e3f85de1bb1ea018b657cade824d9d9270c1025df272f6adf12e413be9630382c77730da4dd769ca73be9e1d20c4f2484ee626f79e15cb +SHA512 (clang-tools-extra-16.0.3.src.tar.xz) = 83d5196b88eaa9fdd1ea75353b59318c64cd002942c68653a81cd40288c5b01b9d6fadabac6a397cd06b955b8413d8940006af723d77cc4035bd9c139189f164 +SHA512 (clang-tools-extra-16.0.3.src.tar.xz.sig) = 96ee76da9f7845b4a68ae17cd7480d2e43c8fc12d1d7af71582af850f5fea04d86e234b2a30b4718892df306099811c7dfcd40d6bf7ae3736c7c6bdacad45dbb From 22846ba9157cd54a10834dc3adaf8fefcc480f56 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Wed, 3 May 2023 14:55:33 -0300 Subject: [PATCH 51/77] Remove patch for ppc64le triple Prefer the python-lit patch from https://reviews.llvm.org/D149746 --- 0001-PowerPC-clang-Fix-triple.patch | 26 -------------------------- clang.spec | 7 ++++--- 2 files changed, 4 insertions(+), 29 deletions(-) delete mode 100644 0001-PowerPC-clang-Fix-triple.patch diff --git a/0001-PowerPC-clang-Fix-triple.patch b/0001-PowerPC-clang-Fix-triple.patch deleted file mode 100644 index f8e6912..0000000 --- a/0001-PowerPC-clang-Fix-triple.patch +++ /dev/null @@ -1,26 +0,0 @@ -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/clang.spec b/clang.spec index 695476d..fc615d2 100644 --- a/clang.spec +++ b/clang.spec @@ -41,7 +41,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -64,8 +64,6 @@ Patch3: 0001-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch # Drop the following patch after debugedit adds support to DWARF-5: # https://sourceware.org/bugzilla/show_bug.cgi?id=28728 Patch5: 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 @@ -604,6 +602,9 @@ false %endif %changelog +* Mon May 15 2023 Tulio Magno Quites Machado Filho - 16.0.3-2 +- Remove patch for ppc64le triple in favor of https://reviews.llvm.org/D149746 + * Tue May 09 2023 Tulio Magno Quites Machado Filho - 16.0.3-1 - Update to LLVM 16.0.3 From 92d3782fb416996d4aa1861e9ffc2ac9b661bc21 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Fri, 19 May 2023 13:43:34 -0300 Subject: [PATCH 52/77] Update to LLVM 16.0.4 --- clang.spec | 7 +++++-- sources | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/clang.spec b/clang.spec index fc615d2..77ee04a 100644 --- a/clang.spec +++ b/clang.spec @@ -9,7 +9,7 @@ %global maj_ver 16 %global min_ver 0 -%global patch_ver 3 +%global patch_ver 4 #global rc_ver 4 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} @@ -41,7 +41,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: Apache-2.0 WITH LLVM-exception OR NCSA @@ -602,6 +602,9 @@ false %endif %changelog +* Fri May 19 2023 Tulio Magno Quites Machado Filho - 16.0.4-1 +- Update to LLVM 16.0.4 + * Mon May 15 2023 Tulio Magno Quites Machado Filho - 16.0.3-2 - Remove patch for ppc64le triple in favor of https://reviews.llvm.org/D149746 diff --git a/sources b/sources index 69fb95b..8e81289 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-16.0.3.src.tar.xz) = 3db2806f1f5155c9df377f0e4b47f200814a2ca84ffd9eda7edafa3a85de76af92b3413388be48918432c5d0592d7d07f2618064ef7e7be7c97c9b29793829b8 -SHA512 (clang-16.0.3.src.tar.xz.sig) = 447245e1c0b9f94539e3f85de1bb1ea018b657cade824d9d9270c1025df272f6adf12e413be9630382c77730da4dd769ca73be9e1d20c4f2484ee626f79e15cb -SHA512 (clang-tools-extra-16.0.3.src.tar.xz) = 83d5196b88eaa9fdd1ea75353b59318c64cd002942c68653a81cd40288c5b01b9d6fadabac6a397cd06b955b8413d8940006af723d77cc4035bd9c139189f164 -SHA512 (clang-tools-extra-16.0.3.src.tar.xz.sig) = 96ee76da9f7845b4a68ae17cd7480d2e43c8fc12d1d7af71582af850f5fea04d86e234b2a30b4718892df306099811c7dfcd40d6bf7ae3736c7c6bdacad45dbb +SHA512 (clang-16.0.4.src.tar.xz) = d6294897022519900ed037559068ff46fff583903a3266147a7f71a47673d123690cff89730777d40e0ba9f1c086e469c6c845aea04c41890da05ea654bd8ce8 +SHA512 (clang-16.0.4.src.tar.xz.sig) = bc77d531b41a8a9c7d7e5a742baf8686ec2e79b4cd37c64e792a3a611201b82fcea8875f8dc52d953f3af1dbffb2b311c942e3b70dea937a89cd2f6653716af8 +SHA512 (clang-tools-extra-16.0.4.src.tar.xz) = f05ada67851332626d11b39b9f43284985028b5613a3d5e3f2c95f4aaacae6f24147a716472b9edf4047de0258e3db55ab11ff12452eeefc525e128f2b0c2217 +SHA512 (clang-tools-extra-16.0.4.src.tar.xz.sig) = c2c8bd09732177760b14b2b25dd41ea3859256722bc9a7a83dee6af6c39fbda027aa42f38d39f097bf07f040d8522e6e8e73875de53ad2f899d5251b0b9b43bc From b534a5d60778b13b042c2e68655d101d3f4b258a Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 12 May 2023 07:49:15 -0400 Subject: [PATCH 53/77] Avoid recommonmark dependency in RHEL builds python-recommonmark and its dependencies are unwanted in RHEL. This is based on changes already in c9s. --- 0009-disable-recommonmark.patch | 38 +++++++++++++++++++++++++++++++++ clang.spec | 8 ++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 0009-disable-recommonmark.patch diff --git a/0009-disable-recommonmark.patch b/0009-disable-recommonmark.patch new file mode 100644 index 0000000..8a259af --- /dev/null +++ b/0009-disable-recommonmark.patch @@ -0,0 +1,38 @@ +From f4e2d711e5cfd8e357d770e2da7a114086ee8659 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timm=20B=C3=A4der?= +Date: Thu, 22 Sep 2022 10:49:43 +0200 +Subject: disable recommonmark + +--- + clang/docs/conf.py | 15 +-------------- + 1 file changed, 1 insertion(+), 14 deletions(-) + +diff --git a/clang/docs/conf.py b/clang/docs/conf.py +index b8a42018191a..912449a7f792 100644 +--- a/clang/docs/conf.py ++++ b/clang/docs/conf.py +@@ -37,20 +37,7 @@ source_suffix = { + '.rst': 'restructuredtext', + } + +-try: +- import recommonmark +-except ImportError: +- # manpages do not use any .md sources +- if not tags.has('builder-man'): +- raise +-else: +- import sphinx +- if sphinx.version_info >= (3, 0): +- # This requires 0.5 or later. +- extensions.append('recommonmark') +- else: +- source_parsers = {'.md': 'recommonmark.parser.CommonMarkParser'} +- source_suffix['.md'] = 'markdown' ++import sphinx + + # The encoding of source files. + #source_encoding = 'utf-8-sig' +-- +2.37.1 + diff --git a/clang.spec b/clang.spec index 77ee04a..dd8089a 100644 --- a/clang.spec +++ b/clang.spec @@ -75,6 +75,10 @@ Patch10: fix-ieee128-cross.diff Patch11: 0001-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch +# RHEL specific patches +# Avoid unwanted dependency on python-recommonmark +Patch101: 0009-disable-recommonmark.patch + %if %{without compat_build} # Patches for clang-tools-extra # See https://reviews.llvm.org/D120301 @@ -107,7 +111,9 @@ BuildRequires: emacs BuildRequires: python3-lit BuildRequires: python3-sphinx +%if %{undefined rhel} BuildRequires: python3-recommonmark +%endif BuildRequires: libatomic # We need python3-devel for %%py3_shebang_fix @@ -276,7 +282,7 @@ rm test/clang-tidy/checkers/altera/struct-pack-align.cpp clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py %setup -q -n %{clang_srcdir} -%autopatch -M200 -p2 +%autopatch -M%{?!rhel:100}%{?rhel:200} -p2 # failing test case rm test/CodeGen/profile-filter.c From efb4b42e9b41c0bbbd36ed475bde41787859c781 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Tue, 6 Jun 2023 03:00:43 -0300 Subject: [PATCH 54/77] Update to LLVM 16.0.5 --- clang.spec | 5 ++++- sources | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/clang.spec b/clang.spec index dd8089a..2ff15e5 100644 --- a/clang.spec +++ b/clang.spec @@ -9,7 +9,7 @@ %global maj_ver 16 %global min_ver 0 -%global patch_ver 4 +%global patch_ver 5 #global rc_ver 4 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} @@ -608,6 +608,9 @@ false %endif %changelog +* Tue Jun 06 2023 Tulio Magno Quites Machado Filho - 16.0.5-1 +- Update to LLVM 16.0.5 + * Fri May 19 2023 Tulio Magno Quites Machado Filho - 16.0.4-1 - Update to LLVM 16.0.4 diff --git a/sources b/sources index 8e81289..d20fad2 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-16.0.4.src.tar.xz) = d6294897022519900ed037559068ff46fff583903a3266147a7f71a47673d123690cff89730777d40e0ba9f1c086e469c6c845aea04c41890da05ea654bd8ce8 -SHA512 (clang-16.0.4.src.tar.xz.sig) = bc77d531b41a8a9c7d7e5a742baf8686ec2e79b4cd37c64e792a3a611201b82fcea8875f8dc52d953f3af1dbffb2b311c942e3b70dea937a89cd2f6653716af8 -SHA512 (clang-tools-extra-16.0.4.src.tar.xz) = f05ada67851332626d11b39b9f43284985028b5613a3d5e3f2c95f4aaacae6f24147a716472b9edf4047de0258e3db55ab11ff12452eeefc525e128f2b0c2217 -SHA512 (clang-tools-extra-16.0.4.src.tar.xz.sig) = c2c8bd09732177760b14b2b25dd41ea3859256722bc9a7a83dee6af6c39fbda027aa42f38d39f097bf07f040d8522e6e8e73875de53ad2f899d5251b0b9b43bc +SHA512 (clang-16.0.5.src.tar.xz) = d7ad46ee7d564c08baf600f55d46d735eeb1e5959c7f5b61bf2766b7b2a78a5a762ececb36fd55b61113435f0c3654529e61b7f71c01d60e9d63f3128eb009ed +SHA512 (clang-tools-extra-16.0.5.src.tar.xz) = 8f5c5617dad5eb3f89e8f7d29c3ac3a8ee3286f83cc4984ba28cdd8d9a663a80f581dbb81d8f520fa31f5a7f5fdd0c34d889ed32a17895e2daebf4c9380a0aff +SHA512 (clang-tools-extra-16.0.5.src.tar.xz.sig) = 1161fd65c3d693d7463489c5e7fda9e5742cd1389553faac324f008fcd75533d54742712c36e946635123c7dc1c634865cea5b5e238db45819b2da473b4f8a34 +SHA512 (clang-16.0.5.src.tar.xz.sig) = ed0d70fe20057762c9396663d4012b117909f800dd01ddd887950d5e0a9afdfa12e70a9d031b9917170d7ceef8d1e79ea949664d6ab6b3fcad0e70b3fef08224 From ec9fa021a9878a25c24d039a823728c7d5bc35c2 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Thu, 15 Jun 2023 14:41:12 +0200 Subject: [PATCH 55/77] Rebuilt for Python 3.12 --- clang.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index 2ff15e5..18417ed 100644 --- a/clang.spec +++ b/clang.spec @@ -41,7 +41,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -608,6 +608,9 @@ false %endif %changelog +* Thu Jun 15 2023 Python Maint - 16.0.5-2 +- Rebuilt for Python 3.12 + * Tue Jun 06 2023 Tulio Magno Quites Machado Filho - 16.0.5-1 - Update to LLVM 16.0.5 From 7c3f9440e3709e340ed1b6ff248a4c1414049276 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 15 Jun 2023 14:22:25 +0200 Subject: [PATCH 56/77] Use llvm-cmake-utils package --- ...Change-LLVM_COMMON_CMAKE_UTILS-usage.patch | 30 ------------------- clang.spec | 13 +++++--- 2 files changed, 9 insertions(+), 34 deletions(-) delete mode 100644 0001-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch diff --git a/0001-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch b/0001-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch deleted file mode 100644 index d330f87..0000000 --- a/0001-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch +++ /dev/null @@ -1,30 +0,0 @@ -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/clang.spec b/clang.spec index 18417ed..82ac19d 100644 --- a/clang.spec +++ b/clang.spec @@ -21,6 +21,7 @@ %global install_bindir %{install_prefix}/bin %global install_includedir %{install_prefix}/include %global install_libdir %{install_prefix}/lib +%global install_datadir %{install_prefix}/share %global pkg_bindir %{install_bindir} %global pkg_includedir %{install_includedir} @@ -28,6 +29,7 @@ %else %global pkg_name clang %global install_prefix /usr +%global install_datadir %{_datadir} %global pkg_libdir %{_libdir} %endif @@ -41,7 +43,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -73,8 +75,6 @@ Patch8: D138472.diff Patch10: fix-ieee128-cross.diff -Patch11: 0001-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch - # RHEL specific patches # Avoid unwanted dependency on python-recommonmark Patch101: 0009-disable-recommonmark.patch @@ -91,8 +91,10 @@ BuildRequires: ninja-build %if %{with compat_build} BuildRequires: llvm%{maj_ver}-devel = %{version} BuildRequires: llvm%{maj_ver}-static = %{version} +BuildRequires: llvm%{maj_ver}-cmake-utils = %{version} %else BuildRequires: llvm-devel = %{version} +BuildRequires: llvm-cmake-utils = %{version} BuildRequires: llvm-test = %{version} # llvm-static is required, because clang-tablegen needs libLLVMTableGen, which # is not included in libLLVM.so. @@ -363,7 +365,7 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py %else -DLLVM_TABLEGEN_EXE:FILEPATH=%{_bindir}/llvm-tblgen \ %endif - -DLLVM_COMMON_CMAKE_UTILS=%{_libdir}/cmake/llvm \ + -DLLVM_COMMON_CMAKE_UTILS=%{install_datadir}/llvm/cmake \ -DCLANG_ENABLE_ARCMT:BOOL=ON \ -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \ -DCLANG_INCLUDE_DOCS:BOOL=ON \ @@ -608,6 +610,9 @@ false %endif %changelog +* Thu Jun 15 2023 Nikita Popov - 16.0.5-3 +- Use llvm-cmake-utils package + * Thu Jun 15 2023 Python Maint - 16.0.5-2 - Rebuilt for Python 3.12 From ff334832906aafe67f80740fc2625866f3e4902c Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 16 Jun 2023 11:20:52 +0200 Subject: [PATCH 57/77] Rebuilt for Python 3.12 --- clang.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index 82ac19d..d5fd47b 100644 --- a/clang.spec +++ b/clang.spec @@ -43,7 +43,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 3%{?dist} +Release: 4%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -610,6 +610,9 @@ false %endif %changelog +* Fri Jun 16 2023 Python Maint - 16.0.5-4 +- Rebuilt for Python 3.12 + * Thu Jun 15 2023 Nikita Popov - 16.0.5-3 - Use llvm-cmake-utils package From 30d8eed6694e5f01a49f99b509172861cf3607b1 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Fri, 16 Jun 2023 10:14:53 -0300 Subject: [PATCH 58/77] Update to LLVM 16.0.6 --- clang.spec | 7 +++++-- sources | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/clang.spec b/clang.spec index d5fd47b..d03062d 100644 --- a/clang.spec +++ b/clang.spec @@ -9,7 +9,7 @@ %global maj_ver 16 %global min_ver 0 -%global patch_ver 5 +%global patch_ver 6 #global rc_ver 4 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} @@ -43,7 +43,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: Apache-2.0 WITH LLVM-exception OR NCSA @@ -610,6 +610,9 @@ false %endif %changelog +* Fri Jun 16 2023 Tulio Magno Quites Machado Filho - 16.0.6-1 +- Update to LLVM 16.0.6 + * Fri Jun 16 2023 Python Maint - 16.0.5-4 - Rebuilt for Python 3.12 diff --git a/sources b/sources index d20fad2..38b7fe9 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-16.0.5.src.tar.xz) = d7ad46ee7d564c08baf600f55d46d735eeb1e5959c7f5b61bf2766b7b2a78a5a762ececb36fd55b61113435f0c3654529e61b7f71c01d60e9d63f3128eb009ed -SHA512 (clang-tools-extra-16.0.5.src.tar.xz) = 8f5c5617dad5eb3f89e8f7d29c3ac3a8ee3286f83cc4984ba28cdd8d9a663a80f581dbb81d8f520fa31f5a7f5fdd0c34d889ed32a17895e2daebf4c9380a0aff -SHA512 (clang-tools-extra-16.0.5.src.tar.xz.sig) = 1161fd65c3d693d7463489c5e7fda9e5742cd1389553faac324f008fcd75533d54742712c36e946635123c7dc1c634865cea5b5e238db45819b2da473b4f8a34 -SHA512 (clang-16.0.5.src.tar.xz.sig) = ed0d70fe20057762c9396663d4012b117909f800dd01ddd887950d5e0a9afdfa12e70a9d031b9917170d7ceef8d1e79ea949664d6ab6b3fcad0e70b3fef08224 +SHA512 (clang-16.0.6.src.tar.xz) = 92c65b882e1504f4a9b8a3f6b8a24061505987aaacc8bb835115b4e4d74ac3a8c98343a308567b07c6b42bb99877c300bce3c4a5a25ada77abe65606aa25188d +SHA512 (clang-tools-extra-16.0.6.src.tar.xz) = ec1a0834f223e393d24c11586b744167a41cea6c39d1bb18c433d2fb736501950fdff42f1eb0caa13c75bcb8ef9ac309eb0687644307698ec0420ff8a769c710 +SHA512 (clang-tools-extra-16.0.6.src.tar.xz.sig) = ff94fe024399bb72da10752ad1c41d57dcf5094b11ef5abdb82189026db0d7016c7ede0f47b7841aaa823de75bd927f8a1ffdbc112c5a0f61dec878790b5e7e3 +SHA512 (clang-16.0.6.src.tar.xz.sig) = a3e68c07d61ce62dfe406464f1afce352f36480966ceaa3171889ac1f02441d9df48e938b3e81d6b73b5957dd6623171323a9915281dc052be0c5c7014e75f24 From 461ef15b3700ee55b15dc6fd616da173e9fbf550 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Thu, 13 Jul 2023 10:05:11 -0300 Subject: [PATCH 59/77] Fix rhbz#2221585 Module imp got removed from Python 3.12. Source: https://docs.python.org/3/library/imp.html --- D155192.diff | 12 ++++++++++++ clang.spec | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 D155192.diff diff --git a/D155192.diff b/D155192.diff new file mode 100644 index 0000000..d53698c --- /dev/null +++ b/D155192.diff @@ -0,0 +1,12 @@ +diff --git a/clang/tools/scan-view/bin/scan-view b/clang/tools/scan-view/bin/scan-view +--- a/clang/tools/scan-view/bin/scan-view ++++ b/clang/tools/scan-view/bin/scan-view +@@ -6,7 +6,6 @@ + """ + + import sys +-import imp + import os + import posixpath + import threading + diff --git a/clang.spec b/clang.spec index d03062d..1654eca 100644 --- a/clang.spec +++ b/clang.spec @@ -43,7 +43,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -75,6 +75,9 @@ Patch8: D138472.diff Patch10: fix-ieee128-cross.diff +# https://reviews.llvm.org/D155192 +Patch11: D155192.diff + # RHEL specific patches # Avoid unwanted dependency on python-recommonmark Patch101: 0009-disable-recommonmark.patch @@ -610,6 +613,9 @@ false %endif %changelog +* Wed Jul 12 2023 Tulio Magno Quites Machado Filho - 16.0.6-2 +- Fix rhbz#2221585 + * Fri Jun 16 2023 Tulio Magno Quites Machado Filho - 16.0.6-1 - Update to LLVM 16.0.6 From 419d05e65cf1478d56a061fe52b5aa45d1e06933 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 15:44:40 +0000 Subject: [PATCH 60/77] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- clang.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index 1654eca..2f3141b 100644 --- a/clang.spec +++ b/clang.spec @@ -43,7 +43,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -613,6 +613,9 @@ false %endif %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 16.0.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Wed Jul 12 2023 Tulio Magno Quites Machado Filho - 16.0.6-2 - Fix rhbz#2221585 From fff5077f10b8c09427f963b5a2b2c481670ac7b4 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Mon, 24 Jul 2023 07:41:02 -0300 Subject: [PATCH 61/77] Fix compat build without tests and deduplicate BuildRequires 1. Set LLVM_INCLUDE_TESTS:BOOL=OFF in order to build clang without requiring googletest as we do not run the tests anyway. 2. Backport a patch from upstream that fixes the generation of *.exports. 3. Deduplicate a few BuildRequires entries. --- ...python3-as-required-build-dependency.patch | 39 +++++++++++++++++++ clang.spec | 23 ++++++----- 2 files changed, 53 insertions(+), 9 deletions(-) create mode 100644 0001-clang-set-python3-as-required-build-dependency.patch diff --git a/0001-clang-set-python3-as-required-build-dependency.patch b/0001-clang-set-python3-as-required-build-dependency.patch new file mode 100644 index 0000000..2576518 --- /dev/null +++ b/0001-clang-set-python3-as-required-build-dependency.patch @@ -0,0 +1,39 @@ +From 96962d5512fbc6af0ada0f13e6be332c026529cb Mon Sep 17 00:00:00 2001 +From: Petr Hosek +Date: Fri, 9 Jun 2023 07:51:40 +0000 +Subject: [PATCH] [clang] set python3 as required build dependency + +The required HTMLLogger include file needs python3 to run +resource_bundle.py to bundle all the html/css/js resources. However, if +user sets -DLLVM_INCLUDE_TESTS=OFF, CMake will not find python3 and the +resource bundler will never be executed. This patch set the python3 as a +required build dependency to fix this problem. + +Patch By: Avimitin + +Differential Revision: https://reviews.llvm.org/D152418 +--- + clang/CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt +index 8220a9dbfd4d..f7936d72e088 100644 +--- a/clang/CMakeLists.txt ++++ b/clang/CMakeLists.txt +@@ -82,10 +82,10 @@ if(CLANG_BUILT_STANDALONE) + set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} ) + set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} ) + +- if(LLVM_INCLUDE_TESTS) +- find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION} REQUIRED +- COMPONENTS Interpreter) ++ find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION} REQUIRED ++ COMPONENTS Interpreter) + ++ if(LLVM_INCLUDE_TESTS) + # Check prebuilt llvm/utils. + if(EXISTS ${LLVM_TOOLS_BINARY_DIR}/FileCheck${CMAKE_EXECUTABLE_SUFFIX} + AND EXISTS ${LLVM_TOOLS_BINARY_DIR}/count${CMAKE_EXECUTABLE_SUFFIX} +-- +2.41.0 + diff --git a/clang.spec b/clang.spec index 2f3141b..226541a 100644 --- a/clang.spec +++ b/clang.spec @@ -73,6 +73,9 @@ Patch7: D141581.diff # See https://reviews.llvm.org/D138472 Patch8: D138472.diff +# Backport from LLVM 18. +Patch9: 0001-clang-set-python3-as-required-build-dependency.patch + Patch10: fix-ieee128-cross.diff # https://reviews.llvm.org/D155192 @@ -91,19 +94,20 @@ Patch201: 0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch BuildRequires: clang BuildRequires: cmake BuildRequires: ninja-build + %if %{with compat_build} -BuildRequires: llvm%{maj_ver}-devel = %{version} -BuildRequires: llvm%{maj_ver}-static = %{version} -BuildRequires: llvm%{maj_ver}-cmake-utils = %{version} +%global llvm_pkg_name llvm%{maj_ver} %else -BuildRequires: llvm-devel = %{version} -BuildRequires: llvm-cmake-utils = %{version} -BuildRequires: llvm-test = %{version} +%global llvm_pkg_name llvm +BuildRequires: llvm-test = %{version} +BuildRequires: llvm-googletest = %{version} +%endif + +BuildRequires: %{llvm_pkg_name}-devel = %{version} # llvm-static is required, because clang-tablegen needs libLLVMTableGen, which # is not included in libLLVM.so. -BuildRequires: llvm-static = %{version} -BuildRequires: llvm-googletest = %{version} -%endif +BuildRequires: %{llvm_pkg_name}-static = %{version} +BuildRequires: %{llvm_pkg_name}-cmake-utils = %{version} BuildRequires: libxml2-devel BuildRequires: perl-generators @@ -348,6 +352,7 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py -DCLANG_BUILD_TOOLS:BOOL=OFF \ -DCMAKE_INSTALL_PREFIX=%{install_prefix} \ -DCLANG_INCLUDE_TESTS:BOOL=OFF \ + -DLLVM_INCLUDE_TESTS:BOOL=OFF \ -DLLVM_CMAKE_DIR=%{install_libdir}/cmake/llvm \ %else -DCLANG_INCLUDE_TESTS:BOOL=ON \ From 074a2a75fb9b96b4ed61227d4567003a837047e3 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Mon, 31 Jul 2023 21:44:41 -0300 Subject: [PATCH 62/77] Remove pkg_bindir and pkg_libdir 1. Remove unused macro pkg_bindir. 2. Replace pkg_libdir with install_libdir. --- clang.spec | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/clang.spec b/clang.spec index 226541a..25ff11b 100644 --- a/clang.spec +++ b/clang.spec @@ -23,14 +23,12 @@ %global install_libdir %{install_prefix}/lib %global install_datadir %{install_prefix}/share -%global pkg_bindir %{install_bindir} %global pkg_includedir %{install_includedir} -%global pkg_libdir %{install_libdir} %else %global pkg_name clang %global install_prefix /usr %global install_datadir %{_datadir} -%global pkg_libdir %{_libdir} +%global install_libdir %{_libdir} %endif %ifarch ppc64le @@ -469,7 +467,7 @@ chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1* # Create sub-directories in the clang resource directory that will be # populated by other packages -mkdir -p %{buildroot}%{pkg_libdir}/clang/%{maj_ver}/{include,lib,share}/ +mkdir -p %{buildroot}%{install_libdir}/clang/%{maj_ver}/{include,lib,share}/ %if %{without compat_build} @@ -516,8 +514,8 @@ false %{_libdir}/clang/%{maj_ver}/include/* %{_libdir}/*.so.* %else -%{pkg_libdir}/*.so.* -%{pkg_libdir}/clang/%{maj_ver}/include/* +%{install_libdir}/*.so.* +%{install_libdir}/clang/%{maj_ver}/include/* %endif %files devel @@ -530,18 +528,18 @@ false %dir %{_datadir}/clang/ %{_rpmmacrodir}/macros.%{name} %else -%{pkg_libdir}/*.so +%{install_libdir}/*.so %{pkg_includedir}/clang/ %{pkg_includedir}/clang-c/ -%{pkg_libdir}/cmake/ +%{install_libdir}/cmake/ %endif %files resource-filesystem -%dir %{pkg_libdir}/clang/ -%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/ +%dir %{install_libdir}/clang/ +%dir %{install_libdir}/clang/%{maj_ver}/ +%dir %{install_libdir}/clang/%{maj_ver}/include/ +%dir %{install_libdir}/clang/%{maj_ver}/lib/ +%dir %{install_libdir}/clang/%{maj_ver}/share/ %if %{without compat_build} %files analyzer From b3669793eb58da4205aa1914ccae5c76d9fdd263 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Tue, 1 Aug 2023 13:07:27 -0300 Subject: [PATCH 63/77] Update to LLVM 17.0.0 RC 1 This is also a squashed merge commit from upstream-snapshot (commit ID 13b971d3fcbf82d2) into rawhide whose most important commits from upstream-snapshot are: Konrad Kleine (57): Prepare for snapshot build Fix patches by using them from the streamline branch Fixed E: specfile-error error: line 491: Unclosed %if Fix error: Bad file: /var/lib/copr-rpmbuild/workspace/workdir-0qjlioil/srcdir/0007-cmake-Allow-shared-li braries-to-customize-the-soname.patch: No such file or directory Must have forgotten this newly added 'clang_version' global Disable LTO for anything older than Fedora 34 Add recommonmark to build deps Use new llvm_snashot_changelog_entry macro Use llvm_snapshot_version_suffix Fix RPM packaging bug: Default to DWARFv4 Revert "Default to DWARFv4" Compile with DWARFv4 Merge remote-tracking branch 'upstream/rawhide' into upstream-snapshot Try to address https://reviews.llvm.org/D119199 Update patches Fixup patches Patches rebased Separate clang-tools-extra patches Try to fix clang build Rebased patches to fix issue with patch Make %autopatch verbose Also rename patch tag Avoid ld error Rebased patches Rebased clang patches Rebased clang-tools-extra patches First try to default to DWARF4 by default Produce DWARF4 by default Added pgo_instrumented_build conditional Make clang use the llvm-snapshot-builder Use %{llvm_snapshot_extra_source_tags} macro Fix %changelog not in descending chronological order Rebase patches Bring back clang Rebased patches and added third-party and cmake sources Adjust to https://reviews.llvm.org/D130586 Disable LTO Manually apply https://reviews.llvm.org/D141581 adjust /lib/ to /%{_lib}/ Remove third party stuff and use gtest patch Rebased D138472 Trace configure output Rebase D138472 Assist find_package(LLVMGTest by setting hint dir to LLVM_CMAKE_DIR Merge remote-tracking branch 'origin/rawhide' into upstream-snapshot Add back 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch Fixup 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch Rebased 0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch Rebased 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch Dropping 0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch D142506 landed already Fix for the IEEE 128-bit fp error Fix RPM install of includes Merge remote-tracking branch 'origin/rawhide' into upstream-snapshot Remove already landed patches D141581 and D143736 Rebase 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch Nikita Popov (7): Rebase downstream patches Rebase clang-tools-extra patches Add clang-offload-packager to clang_tools_binaries Rebase downstream patches Rebase LLVMHello patch Remove fno-openmp-implicit-rpath patches Restore fno-openmp-implicit-rpath patches Tom Stellard (25): Revert patches that added LLVMHello dependency to clang-tools-extra tests Remove accidentally committed changes from previous commit Add clang-linker-wrapper and clang-pseudo binaries Add test for building an rpm with -fopenmp Add a smaller patch for fixing clang-tools-extra standalone build Update test name Add link to upstream patch for clang-tools-extra Update DWARF-4 patch to fix a test failure Rebase patch Emit DWARF4 by default Fix test after switch to DWARF4 default Fix dwarf test again Add workaround for build failure on i386/f36 Remove accidentally committed change Add back -fno-openmp-implicit-rpath option Fix patch Remove patch that was committed upstream Update -fno-openmp-implicit-rpath patches Drop openmp changes from patch Add fix for test failures on AArch64/f38+rawhide Revert "Add fix for test failures on AArch64/f38+rawhide" Update OpenMP rpath patch copr: Install llvm-snapshot-builder from the local COPR project Remove %clang_resource_dir_readonly macro Move clang-resource-dir to /usr/lib sergesanspaille (5): Rebased clang-tools-extra patches Rebased clang-tools-extra patches rebase downstream patches Rebase downstream patches Rebase downstream patch --- .copr/Makefile | 17 ++++ ...-funwind-tables-the-default-on-all-a.patch | 17 ++-- ...ch => 0001-Produce-DWARF4-by-default.patch | 10 +-- ...python3-as-required-build-dependency.patch | 39 --------- ...a-Make-test-dependency-on-LLVMHello-.patch | 18 ++--- D138472.diff | 53 ------------ D141581.diff | 25 ------ D155192.diff | 12 --- clang.spec | 80 ++++++++++++------- fix-ieee128-cross.diff | 16 ---- macros.clang | 7 +- sources | 8 +- 12 files changed, 95 insertions(+), 207 deletions(-) create mode 100644 .copr/Makefile rename 0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch => 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch (61%) rename 0010-PATCH-clang-Produce-DWARF4-by-default.patch => 0001-Produce-DWARF4-by-default.patch (96%) delete mode 100644 0001-clang-set-python3-as-required-build-dependency.patch delete mode 100644 D138472.diff delete mode 100644 D141581.diff delete mode 100644 D155192.diff delete mode 100644 fix-ieee128-cross.diff diff --git a/.copr/Makefile b/.copr/Makefile new file mode 100644 index 0000000..753982b --- /dev/null +++ b/.copr/Makefile @@ -0,0 +1,17 @@ +# See https://docs.pagure.org/copr.copr/user_documentation.html#make-srpm +# See for the --setopt option in the enabling of copr repo see: +# https://pagure.io/copr/copr/issue/184 + +COPR_USERNAME=$(shell rpm --eval %copr_username) +COPR_PROJECT=$(shell rpm --eval %copr_projectname) + +.PHONY: srpm +srpm: + dnf install -y dnf-plugins-core fedora-packager + dnf copr enable -y --setopt=reposdir=/tmp/yum.repos.d $(COPR_USERNAME)/$(COPR_PROJECT) + dnf install -y --setopt=reposdir=/tmp/yum.repos.d llvm-snapshot-builder + rpmbuild \ + --define "_srcrpmdir $(outdir)" \ + --define "_sourcedir $(shell pwd)" \ + --define "_disable_source_fetch 0" \ + -bs $(spec) diff --git a/0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch b/0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch similarity index 61% rename from 0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch rename to 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch index ce920f9..113f2a7 100644 --- a/0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch +++ b/0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch @@ -1,21 +1,20 @@ -From d95d3fbff661c0390072ed0bb4544d5e2aae5c9a Mon Sep 17 00:00:00 2001 -From: serge-sans-paille -Date: Thu, 25 Feb 2021 14:09:29 +0100 +From 49f827b09db549de62dcaf8b90b3fcb3e08c0ee5 Mon Sep 17 00:00:00 2001 +From: Serge Guelton +Date: Mon, 6 Mar 2023 12:37:48 +0100 Subject: [PATCH] Make -funwind-tables the default on all archs --- - clang/lib/Driver/ToolChains/Gnu.cpp | 5 +++++ - 1 file changed, 5 insertions(+) + clang/lib/Driver/ToolChains/Gnu.cpp | 4 ++++ + 1 file changed, 4 insertions(+) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index c8006f3d8412..6ed03adb7702 100644 +index 24fbdcffc07b..8fed46b49515 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2863,6 +2863,11 @@ Generic_GCC::getDefaultUnwindTableLevel(const ArgList &Args) const { - case llvm::Triple::ppc64le: +@@ -2904,6 +2904,10 @@ Generic_GCC::getDefaultUnwindTableLevel(const ArgList &Args) const { + case llvm::Triple::riscv64: case llvm::Triple::x86: case llvm::Triple::x86_64: -+ + // Enable -funwind-tables on all architectures supported by Fedora: + // rhbz#1655546 + case llvm::Triple::systemz: diff --git a/0010-PATCH-clang-Produce-DWARF4-by-default.patch b/0001-Produce-DWARF4-by-default.patch similarity index 96% rename from 0010-PATCH-clang-Produce-DWARF4-by-default.patch rename to 0001-Produce-DWARF4-by-default.patch index ea81f74..ea2d71e 100644 --- a/0010-PATCH-clang-Produce-DWARF4-by-default.patch +++ b/0001-Produce-DWARF4-by-default.patch @@ -1,6 +1,6 @@ -From 4ea62faaaac1aad0fe496cabe9674c809c91c49a Mon Sep 17 00:00:00 2001 +From 45a9482fad2db1ff39a2bfceba00d42ea8c7b9c9 Mon Sep 17 00:00:00 2001 From: Konrad Kleine -Date: Mon, 13 Feb 2023 17:11:00 -0300 +Date: Thu, 24 Mar 2022 09:44:21 +0100 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: @@ -17,7 +17,7 @@ https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/clang/include/clang/Driver/ToolChain.h b/clang/include/clang/Driver/ToolChain.h -index f75f35dc9e65..a70ae2b17833 100644 +index 989e631a187e..8761a8be103b 100644 --- a/clang/include/clang/Driver/ToolChain.h +++ b/clang/include/clang/Driver/ToolChain.h @@ -547,7 +547,7 @@ public: @@ -30,7 +30,7 @@ index f75f35dc9e65..a70ae2b17833 100644 // Some toolchains may have different restrictions on the DWARF version and // may need to adjust it. E.g. NVPTX may need to enforce DWARF2 even when host diff --git a/clang/test/CodeGen/dwarf-version.c b/clang/test/CodeGen/dwarf-version.c -index 0a6fa4768026..96f01749d0d8 100644 +index d307eb3f101f..e7e93bf6688c 100644 --- a/clang/test/CodeGen/dwarf-version.c +++ b/clang/test/CodeGen/dwarf-version.c @@ -2,8 +2,8 @@ @@ -119,5 +119,5 @@ index 5a33d5eceb61..cedf895b36dc 100644 ///----------------------------------------------------------------------------- /// Checking include-path -- -2.39.1 +2.31.1 diff --git a/0001-clang-set-python3-as-required-build-dependency.patch b/0001-clang-set-python3-as-required-build-dependency.patch deleted file mode 100644 index 2576518..0000000 --- a/0001-clang-set-python3-as-required-build-dependency.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 96962d5512fbc6af0ada0f13e6be332c026529cb Mon Sep 17 00:00:00 2001 -From: Petr Hosek -Date: Fri, 9 Jun 2023 07:51:40 +0000 -Subject: [PATCH] [clang] set python3 as required build dependency - -The required HTMLLogger include file needs python3 to run -resource_bundle.py to bundle all the html/css/js resources. However, if -user sets -DLLVM_INCLUDE_TESTS=OFF, CMake will not find python3 and the -resource bundler will never be executed. This patch set the python3 as a -required build dependency to fix this problem. - -Patch By: Avimitin - -Differential Revision: https://reviews.llvm.org/D152418 ---- - clang/CMakeLists.txt | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt -index 8220a9dbfd4d..f7936d72e088 100644 ---- a/clang/CMakeLists.txt -+++ b/clang/CMakeLists.txt -@@ -82,10 +82,10 @@ if(CLANG_BUILT_STANDALONE) - set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} ) - set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} ) - -- if(LLVM_INCLUDE_TESTS) -- find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION} REQUIRED -- COMPONENTS Interpreter) -+ find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION} REQUIRED -+ COMPONENTS Interpreter) - -+ if(LLVM_INCLUDE_TESTS) - # Check prebuilt llvm/utils. - if(EXISTS ${LLVM_TOOLS_BINARY_DIR}/FileCheck${CMAKE_EXECUTABLE_SUFFIX} - AND EXISTS ${LLVM_TOOLS_BINARY_DIR}/count${CMAKE_EXECUTABLE_SUFFIX} --- -2.41.0 - 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 a0b8cb0..b69c7e7 100644 --- a/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch +++ b/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch @@ -1,6 +1,6 @@ -From 581300e447602b9b7a505b0f07e8461d58d041ca Mon Sep 17 00:00:00 2001 +From 22d62b32cd3be5fb0ae10723b35a781e0f862b71 Mon Sep 17 00:00:00 2001 From: Tom Stellard -Date: Fri, 1 Jul 2022 21:24:17 -0700 +Date: Tue, 24 Jan 2023 22:46:25 +0000 Subject: [PATCH] clang-tools-extra: Make test dependency on LLVMHello optional This fixes clang + clang-tools-extra standalone build after @@ -55,19 +55,19 @@ index c66a94f458cf..b4e7a5d691e5 100644 // CHECK-LIST: Enabled checks: // CHECK-LIST-NEXT: mytest1 diff --git a/clang-tools-extra/test/lit.cfg.py b/clang-tools-extra/test/lit.cfg.py -index 9b99bfd93440..3fca9f25fb48 100644 +index 9f64fd3d2ffa..1b258a00ddf9 100644 --- a/clang-tools-extra/test/lit.cfg.py +++ b/clang-tools-extra/test/lit.cfg.py -@@ -59,6 +59,9 @@ config.substitutions.append( - # Plugins (loadable modules) +@@ -75,6 +75,9 @@ config.substitutions.append(("%clang_tidy_headers", clang_tidy_headers)) if config.has_plugins and config.llvm_plugin_ext: - config.available_features.add('plugins') -+ + 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 + # default configs for the test runs. 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 @@ -81,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.27.0 +2.40.1 diff --git a/D138472.diff b/D138472.diff deleted file mode 100644 index 5d3cd60..0000000 --- a/D138472.diff +++ /dev/null @@ -1,53 +0,0 @@ -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 deleted file mode 100644 index c227e22..0000000 --- a/D141581.diff +++ /dev/null @@ -1,25 +0,0 @@ -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/D155192.diff b/D155192.diff deleted file mode 100644 index d53698c..0000000 --- a/D155192.diff +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/clang/tools/scan-view/bin/scan-view b/clang/tools/scan-view/bin/scan-view ---- a/clang/tools/scan-view/bin/scan-view -+++ b/clang/tools/scan-view/bin/scan-view -@@ -6,7 +6,6 @@ - """ - - import sys --import imp - import os - import posixpath - import threading - diff --git a/clang.spec b/clang.spec index 25ff11b..7baf863 100644 --- a/clang.spec +++ b/clang.spec @@ -1,3 +1,9 @@ +%bcond_with snapshot_build + +%if %{with snapshot_build} +%{llvm_sb} +%endif + %global toolchain clang # Opt out of https://fedoraproject.org/wiki/Changes/fno-omit-frame-pointer @@ -7,10 +13,18 @@ %bcond_with compat_build %bcond_without check -%global maj_ver 16 +%global maj_ver 17 %global min_ver 0 -%global patch_ver 6 -#global rc_ver 4 +%global patch_ver 0 +%global rc_ver 1 + +%if %{with snapshot_build} +%undefine rc_ver +%global maj_ver %{llvm_snapshot_version_major} +%global min_ver %{llvm_snapshot_version_minor} +%global patch_ver %{llvm_snapshot_version_patch} +%endif + %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} %if %{with compat_build} @@ -40,12 +54,18 @@ %global clang_tools_srcdir clang-tools-extra-%{clang_version}%{?rc_ver:rc%{rc_ver}}.src Name: %pkg_name -Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 3%{?dist} +Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}} +Release: 1%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA URL: http://llvm.org +%if %{with snapshot_build} +Source0: %{llvm_snapshot_source_prefix}clang-%{llvm_snapshot_yyyymmdd}.src.tar.xz +Source1: %{llvm_snapshot_source_prefix}clang-tools-extra-%{llvm_snapshot_yyyymmdd}.src.tar.xz +%{llvm_snapshot_extra_source_tags} + +%else Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_srcdir}.tar.xz Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_srcdir}.tar.xz.sig %if %{without compat_build} @@ -53,31 +73,18 @@ Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_ Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz.sig %endif Source4: release-keys.asc +%endif %if %{without compat_build} Source5: macros.%{name} %endif # Patches for clang -Patch1: 0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch +Patch1: 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch Patch3: 0001-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch # Drop the following patch after debugedit adds support to DWARF-5: # https://sourceware.org/bugzilla/show_bug.cgi?id=28728 -Patch5: 0010-PATCH-clang-Produce-DWARF4-by-default.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 - -# Backport from LLVM 18. -Patch9: 0001-clang-set-python3-as-required-build-dependency.patch - -Patch10: fix-ieee128-cross.diff - -# https://reviews.llvm.org/D155192 -Patch11: D155192.diff +Patch4: 0001-Produce-DWARF4-by-default.patch # RHEL specific patches # Avoid unwanted dependency on python-recommonmark @@ -270,17 +277,21 @@ Requires: python3 %prep +%if %{without snapshot_build} %{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE3}' --data='%{SOURCE0}' +%endif %if %{with compat_build} %autosetup -n %{clang_srcdir} -p2 %else +%if %{without snapshot_build} %{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE2}' --data='%{SOURCE1}' +%endif + %setup -T -q -b 1 -n %{clang_tools_srcdir} %autopatch -m200 -p2 - # failing test case rm test/clang-tidy/checkers/altera/struct-pack-align.cpp @@ -314,6 +325,12 @@ rm test/CodeGen/profile-filter.c %define _lto_cflags %{nil} %endif +# Disable LTO to speed up builds +%if %{with snapshot_build} +%global _lto_cflags %nil +%endif + + %if 0%{?__isa_bits} == 64 sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@/64/g' test/lit.cfg.py %else @@ -332,7 +349,7 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py # We set CLANG_DEFAULT_PIE_ON_LINUX=OFF and PPC_LINUX_DEFAULT_IEEELONGDOUBLE=ON to match the # defaults used by Fedora's GCC. -%cmake -G Ninja \ +%cmake -G Ninja \ -DCLANG_DEFAULT_PIE_ON_LINUX=OFF \ %if 0%{?fedora} || 0%{?rhel} > 9 -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=ON \ @@ -364,6 +381,10 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py %else -DLLVM_LIBDIR_SUFFIX= \ %endif +%endif + \ +%if %{with snapshot_build} + -DLLVM_VERSION_SUFFIX="%{llvm_snapshot_version_suffix}" \ %endif \ %if %{with compat_build} @@ -387,6 +408,7 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py -DCLANG_BUILD_EXAMPLES:BOOL=OFF \ -DBUILD_SHARED_LIBS=OFF \ -DCLANG_REPOSITORY_STRING="%{?dist_vendor} %{version}-%{release}" \ + -DCLANG_RESOURCE_DIR=../lib/clang/%{maj_ver} \ %ifarch %{arm} -DCLANG_DEFAULT_LINKER=lld \ %endif @@ -510,13 +532,8 @@ false %endif %files libs -%if %{without compat_build} -%{_libdir}/clang/%{maj_ver}/include/* -%{_libdir}/*.so.* -%else +%{install_prefix}/lib/clang/%{maj_ver}/include/* %{install_libdir}/*.so.* -%{install_libdir}/clang/%{maj_ver}/include/* -%endif %files devel %if %{without compat_build} @@ -616,6 +633,11 @@ false %endif %changelog +%{?llvm_snapshot_changelog_entry} + +* Tue Aug 01 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc1-1 +- Update to LLVM 17.0.0 RC1 + * Wed Jul 19 2023 Fedora Release Engineering - 16.0.6-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/fix-ieee128-cross.diff b/fix-ieee128-cross.diff deleted file mode 100644 index 218c229..0000000 --- a/fix-ieee128-cross.diff +++ /dev/null @@ -1,16 +0,0 @@ -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/macros.clang b/macros.clang index 6f35452..88f259d 100644 --- a/macros.clang +++ b/macros.clang @@ -8,9 +8,4 @@ # 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_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. -# This macro only changes when clang's major version changes. -%clang_resource_dir_readonly %{_libdir}/clang/%{clang_major_version} +%clang_resource_dir %{_prefix}/lib/clang/%{clang_major_version} diff --git a/sources b/sources index 38b7fe9..16eeeaa 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-16.0.6.src.tar.xz) = 92c65b882e1504f4a9b8a3f6b8a24061505987aaacc8bb835115b4e4d74ac3a8c98343a308567b07c6b42bb99877c300bce3c4a5a25ada77abe65606aa25188d -SHA512 (clang-tools-extra-16.0.6.src.tar.xz) = ec1a0834f223e393d24c11586b744167a41cea6c39d1bb18c433d2fb736501950fdff42f1eb0caa13c75bcb8ef9ac309eb0687644307698ec0420ff8a769c710 -SHA512 (clang-tools-extra-16.0.6.src.tar.xz.sig) = ff94fe024399bb72da10752ad1c41d57dcf5094b11ef5abdb82189026db0d7016c7ede0f47b7841aaa823de75bd927f8a1ffdbc112c5a0f61dec878790b5e7e3 -SHA512 (clang-16.0.6.src.tar.xz.sig) = a3e68c07d61ce62dfe406464f1afce352f36480966ceaa3171889ac1f02441d9df48e938b3e81d6b73b5957dd6623171323a9915281dc052be0c5c7014e75f24 +SHA512 (clang-17.0.0rc1.src.tar.xz) = d41d24e6b0db52879de9659bff0ea6af3e2299f952ef7d4908a6f0c8b24b1b01f4f9ec217a89418cc6ccf33024d36d4da94516190b49d5a053603b38621929b3 +SHA512 (clang-17.0.0rc1.src.tar.xz.sig) = 6037b09cf7cc055ea9be5d22f8fea4e94ed7ed8d54af7820693de920a130a23d1326a2202c22077a0b55dd0574f2391753da5b27bced52995a838ca080f7c89c +SHA512 (clang-tools-extra-17.0.0rc1.src.tar.xz) = 0a98f1d4072b2856de47250bad21e1a19554a3693e98e1a4308fcab60bb132edfffb58607d9ef25a6bcc920850e7c1aa9c63ad23fa19d42ca83897f463ba5e1f +SHA512 (clang-tools-extra-17.0.0rc1.src.tar.xz.sig) = 0fa5a976d9649fc48c6e7078c9c072875abcff0179e8c1fe3f295d940c3c68dd471b626c7f8540f24beada502ed8214ee93d11f63762dc60dfeb55965887a939 From a399e921637adfc64967e390ad7cb1cf012206dc Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Wed, 23 Aug 2023 07:22:44 -0300 Subject: [PATCH 64/77] Update to LLVM 17.0.0 RC2 --- clang.spec | 5 ++++- sources | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/clang.spec b/clang.spec index 7baf863..4c9d217 100644 --- a/clang.spec +++ b/clang.spec @@ -16,7 +16,7 @@ %global maj_ver 17 %global min_ver 0 %global patch_ver 0 -%global rc_ver 1 +%global rc_ver 2 %if %{with snapshot_build} %undefine rc_ver @@ -635,6 +635,9 @@ false %changelog %{?llvm_snapshot_changelog_entry} +* Mon Aug 21 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc2-1 +- Update to LLVM 17.0.0 RC2 + * Tue Aug 01 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc1-1 - Update to LLVM 17.0.0 RC1 diff --git a/sources b/sources index 16eeeaa..63028fc 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-17.0.0rc1.src.tar.xz) = d41d24e6b0db52879de9659bff0ea6af3e2299f952ef7d4908a6f0c8b24b1b01f4f9ec217a89418cc6ccf33024d36d4da94516190b49d5a053603b38621929b3 -SHA512 (clang-17.0.0rc1.src.tar.xz.sig) = 6037b09cf7cc055ea9be5d22f8fea4e94ed7ed8d54af7820693de920a130a23d1326a2202c22077a0b55dd0574f2391753da5b27bced52995a838ca080f7c89c -SHA512 (clang-tools-extra-17.0.0rc1.src.tar.xz) = 0a98f1d4072b2856de47250bad21e1a19554a3693e98e1a4308fcab60bb132edfffb58607d9ef25a6bcc920850e7c1aa9c63ad23fa19d42ca83897f463ba5e1f -SHA512 (clang-tools-extra-17.0.0rc1.src.tar.xz.sig) = 0fa5a976d9649fc48c6e7078c9c072875abcff0179e8c1fe3f295d940c3c68dd471b626c7f8540f24beada502ed8214ee93d11f63762dc60dfeb55965887a939 +SHA512 (clang-17.0.0rc2.src.tar.xz) = 47b2d25dd053b1e2336422cbda8429fb0a1bb0688cd8de2059304ea5224a6e1e8f80aa42baa45c44b3058a2a3b5dd5bb0179f4a2b8e6da3aaac5259dbcfee7b1 +SHA512 (clang-17.0.0rc2.src.tar.xz.sig) = 2f155b700acd79a49fcad28202f50b64d2083206d6bc1446ddf85ae17eb9f7ed3748239048a65af7be6cd646c89c904a5ae176b2ca1c879feb9acf9dde2380ef +SHA512 (clang-tools-extra-17.0.0rc2.src.tar.xz) = d3fe4f55020720a3373d48189c9cfe8972340bc56f4b51dc5eb5fc3111f841365e5ab0e0a61880e01a3c027cb52e888ab5d8de0b9775cb9d3c653c0066b3b009 +SHA512 (clang-tools-extra-17.0.0rc2.src.tar.xz.sig) = 5c060b843e3df9c75cce732a111b383c63199ddd61885fe411ed44f703b3533f55e22ccf044a1ac3e634f8b7153cbc794391f41d8e6796c691969018269a3df4 From 5171a0f0072852658e3c87999683db49bee7936a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 15 Aug 2023 10:17:48 +0200 Subject: [PATCH 65/77] Rebase dwarf 4 patch --- 0001-Produce-DWARF4-by-default.patch | 54 ++++++++++++++-------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/0001-Produce-DWARF4-by-default.patch b/0001-Produce-DWARF4-by-default.patch index ea2d71e..649a70e 100644 --- a/0001-Produce-DWARF4-by-default.patch +++ b/0001-Produce-DWARF4-by-default.patch @@ -1,4 +1,4 @@ -From 45a9482fad2db1ff39a2bfceba00d42ea8c7b9c9 Mon Sep 17 00:00:00 2001 +From adbe188f3b1e3a0dd5ec80d9409601ba7f5b0423 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Thu, 24 Mar 2022 09:44:21 +0100 Subject: [PATCH] Produce DWARF4 by default @@ -7,28 +7,30 @@ Have a look at the following commit to see when the move from DWARF 4 to 5 first https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8f5b4?diff=unified --- - 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 +- - 7 files changed, 9 insertions(+), 9 deletions(-) + clang/lib/Driver/ToolChain.cpp | 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/clang-g-opts.c | 2 +- + clang/test/Driver/ve-toolchain.c | 2 +- + clang/test/Driver/ve-toolchain.cpp | 2 +- + 7 files changed, 9 insertions(+), 11 deletions(-) -diff --git a/clang/include/clang/Driver/ToolChain.h b/clang/include/clang/Driver/ToolChain.h -index 989e631a187e..8761a8be103b 100644 ---- a/clang/include/clang/Driver/ToolChain.h -+++ b/clang/include/clang/Driver/ToolChain.h -@@ -547,7 +547,7 @@ public: +diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp +index 8dafc3d481c2..92bf26dc8ec6 100644 +--- a/clang/lib/Driver/ToolChain.cpp ++++ b/clang/lib/Driver/ToolChain.cpp +@@ -428,9 +428,7 @@ ToolChain::getDefaultUnwindTableLevel(const ArgList &Args) const { + } - // Return the DWARF version to emit, in the absence of arguments - // to the contrary. -- virtual unsigned GetDefaultDwarfVersion() const { return 5; } -+ virtual unsigned GetDefaultDwarfVersion() const { return 4; } + unsigned ToolChain::GetDefaultDwarfVersion() const { +- // TODO: Remove the RISC-V special case when R_RISCV_SET_ULEB128 linker +- // support becomes more widely available. +- return getTriple().isRISCV() ? 4 : 5; ++ return 4; + } - // Some toolchains may have different restrictions on the DWARF version and - // may need to adjust it. E.g. NVPTX may need to enforce DWARF2 even when host + Tool *ToolChain::getClang() const { diff --git a/clang/test/CodeGen/dwarf-version.c b/clang/test/CodeGen/dwarf-version.c index d307eb3f101f..e7e93bf6688c 100644 --- a/clang/test/CodeGen/dwarf-version.c @@ -67,12 +69,12 @@ index 73d002c7ef7e..71d55f7fd537 100644 // 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 1d588bdfc1b0..1ad57aedc3a4 100644 +index 6d929b19e7e2..373905c2e0fc 100644 --- a/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c -@@ -575,7 +575,7 @@ - // RUN: %clang_cl /Z7 -gdwarf /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s - // Z7_gdwarf: "-gcodeview" +@@ -569,7 +569,7 @@ + // RUN: %clang_cl -gdwarf /Z7 /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s + // Z7_gdwarf-NOT: "-gcodeview" // Z7_gdwarf: "-debug-info-kind=constructor" -// Z7_gdwarf: "-dwarf-version= +// Z7_gdwarf: "-dwarf-version=4 @@ -80,7 +82,7 @@ index 1d588bdfc1b0..1ad57aedc3a4 100644 // 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 +index 5ee0fe64fe48..985158746137 100644 --- a/clang/test/Driver/clang-g-opts.c +++ b/clang/test/Driver/clang-g-opts.c @@ -32,7 +32,7 @@ @@ -119,5 +121,5 @@ index 5a33d5eceb61..cedf895b36dc 100644 ///----------------------------------------------------------------------------- /// Checking include-path -- -2.31.1 +2.41.0 From e81bc4ecf9c77fc67496d526e481f325d6419e14 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Wed, 23 Aug 2023 14:23:44 -0300 Subject: [PATCH 66/77] Update to LLVM 17.0.0 RC3 --- 0001-Fix-regression-of-D157680.patch | 32 ++++++++++++++++++++++++++++ 0001-Produce-DWARF4-by-default.patch | 4 ++-- clang.spec | 8 ++++++- sources | 8 +++---- 4 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 0001-Fix-regression-of-D157680.patch diff --git a/0001-Fix-regression-of-D157680.patch b/0001-Fix-regression-of-D157680.patch new file mode 100644 index 0000000..bfc96c9 --- /dev/null +++ b/0001-Fix-regression-of-D157680.patch @@ -0,0 +1,32 @@ +From b7cf9bbfde5e623e16fe8669e18aa34cbb3afafa Mon Sep 17 00:00:00 2001 +From: XinWang10 +Date: Fri, 18 Aug 2023 00:08:01 -0700 +Subject: [PATCH] Fix regression of D157680 + +Test cases in D157680 should be target specific, but miss some limit, add them back to make buildbot pass. + +Reviewed By: skan, Hahnfeld + +Differential Revision: https://reviews.llvm.org/D158252 +--- + +diff --git a/clang/test/Driver/x86-no-gather-no-scatter.cpp b/clang/test/Driver/x86-no-gather-no-scatter.cpp +index 7efcc55787c4..2e8f4615b846 100644 +--- a/clang/test/Driver/x86-no-gather-no-scatter.cpp ++++ b/clang/test/Driver/x86-no-gather-no-scatter.cpp +@@ -1,8 +1,8 @@ + /// Tests -mno-gather and -mno-scatter +-// RUN: %clang -c -mno-gather -### %s 2>&1 | FileCheck --check-prefix=NOGATHER %s +-// RUN: %clang_cl -c /Qgather- -### %s 2>&1 | FileCheck --check-prefix=NOGATHER %s ++// RUN: %clang -target x86_64-unknown-linux-gnu -c -mno-gather -### %s 2>&1 | FileCheck --check-prefix=NOGATHER %s ++// RUN: %clang_cl --target=x86_64-windows -c /Qgather- -### %s 2>&1 | FileCheck --check-prefix=NOGATHER %s + // NOGATHER: "-target-feature" "+prefer-no-gather" + +-// RUN: %clang -c -mno-scatter -### %s 2>&1 | FileCheck --check-prefix=NOSCATTER %s +-// RUN: %clang_cl -c /Qscatter- -### %s 2>&1 | FileCheck --check-prefix=NOSCATTER %s ++// RUN: %clang -target x86_64-unknown-linux-gnu -c -mno-scatter -### %s 2>&1 | FileCheck --check-prefix=NOSCATTER %s ++// RUN: %clang_cl --target=x86_64-windows -c /Qscatter- -### %s 2>&1 | FileCheck --check-prefix=NOSCATTER %s + // NOSCATTER: "-target-feature" "+prefer-no-scatter" +-- +2.41.0 + diff --git a/0001-Produce-DWARF4-by-default.patch b/0001-Produce-DWARF4-by-default.patch index 649a70e..9b5b46b 100644 --- a/0001-Produce-DWARF4-by-default.patch +++ b/0001-Produce-DWARF4-by-default.patch @@ -73,8 +73,8 @@ index 6d929b19e7e2..373905c2e0fc 100644 --- a/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c @@ -569,7 +569,7 @@ - // RUN: %clang_cl -gdwarf /Z7 /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s - // Z7_gdwarf-NOT: "-gcodeview" + // 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 diff --git a/clang.spec b/clang.spec index 4c9d217..9673a8f 100644 --- a/clang.spec +++ b/clang.spec @@ -16,7 +16,7 @@ %global maj_ver 17 %global min_ver 0 %global patch_ver 0 -%global rc_ver 2 +%global rc_ver 3 %if %{with snapshot_build} %undefine rc_ver @@ -85,6 +85,9 @@ Patch3: 0001-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch # Drop the following patch after debugedit adds support to DWARF-5: # https://sourceware.org/bugzilla/show_bug.cgi?id=28728 Patch4: 0001-Produce-DWARF4-by-default.patch +# Backport https://reviews.llvm.org/D158252 from LLVM 18 +Patch5: 0001-Fix-regression-of-D157680.patch + # RHEL specific patches # Avoid unwanted dependency on python-recommonmark @@ -635,6 +638,9 @@ false %changelog %{?llvm_snapshot_changelog_entry} +* Wed Aug 23 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc3-1 +- Update to LLVM 17.0.0 RC3 + * Mon Aug 21 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc2-1 - Update to LLVM 17.0.0 RC2 diff --git a/sources b/sources index 63028fc..707b717 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-17.0.0rc2.src.tar.xz) = 47b2d25dd053b1e2336422cbda8429fb0a1bb0688cd8de2059304ea5224a6e1e8f80aa42baa45c44b3058a2a3b5dd5bb0179f4a2b8e6da3aaac5259dbcfee7b1 -SHA512 (clang-17.0.0rc2.src.tar.xz.sig) = 2f155b700acd79a49fcad28202f50b64d2083206d6bc1446ddf85ae17eb9f7ed3748239048a65af7be6cd646c89c904a5ae176b2ca1c879feb9acf9dde2380ef -SHA512 (clang-tools-extra-17.0.0rc2.src.tar.xz) = d3fe4f55020720a3373d48189c9cfe8972340bc56f4b51dc5eb5fc3111f841365e5ab0e0a61880e01a3c027cb52e888ab5d8de0b9775cb9d3c653c0066b3b009 -SHA512 (clang-tools-extra-17.0.0rc2.src.tar.xz.sig) = 5c060b843e3df9c75cce732a111b383c63199ddd61885fe411ed44f703b3533f55e22ccf044a1ac3e634f8b7153cbc794391f41d8e6796c691969018269a3df4 +SHA512 (clang-17.0.0rc3.src.tar.xz) = eb04e044f1fb4d10d6c46ead77bbb78b08a1d9a4144c4c24dd8fdaa634a493ead312d17ca8dfc1870673f80739204ec7ba2069f7704fc7ef37584b445a52097c +SHA512 (clang-17.0.0rc3.src.tar.xz.sig) = ed4c292e735c473908bdbe13dfa91a57ae8cf01759fb6c11be57c0b0661ea16df67fa29a4f51342ab6750a3e54191f96ea37b0e3b39a9854f60c72a4af652001 +SHA512 (clang-tools-extra-17.0.0rc3.src.tar.xz) = 3134d1ff29e900d2701d9cef388a4f04f65246a0366584666b8848c465b7e876eb607c6f0c3ab60067e73e9371aa9b73baf54d313642542acd78c6b8c1cd64a7 +SHA512 (clang-tools-extra-17.0.0rc3.src.tar.xz.sig) = 4ca473857bd00aba13015d35a776fb5b20848c79aa2e53e51a1f4c98eb088501dc87f4ae59b82e53ae9521c5ece4a92591ac8c14014d0a7af4e5cb8b355bf64f From b452d055c99b1abb1170178a4dfce081165d7fd5 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 1 Sep 2023 12:27:37 -0400 Subject: [PATCH 67/77] Update RHEL docs patch --- 0009-disable-recommonmark.patch | 48 +++++++++++++-------------------- 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/0009-disable-recommonmark.patch b/0009-disable-recommonmark.patch index 8a259af..f6db5da 100644 --- a/0009-disable-recommonmark.patch +++ b/0009-disable-recommonmark.patch @@ -1,38 +1,26 @@ -From f4e2d711e5cfd8e357d770e2da7a114086ee8659 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timm=20B=C3=A4der?= -Date: Thu, 22 Sep 2022 10:49:43 +0200 -Subject: disable recommonmark - ---- - clang/docs/conf.py | 15 +-------------- - 1 file changed, 1 insertion(+), 14 deletions(-) - -diff --git a/clang/docs/conf.py b/clang/docs/conf.py -index b8a42018191a..912449a7f792 100644 ---- a/clang/docs/conf.py -+++ b/clang/docs/conf.py -@@ -37,20 +37,7 @@ source_suffix = { - '.rst': 'restructuredtext', +diff -Naur a/clang/docs/conf.py b/clang/docs/conf.py +--- a/clang/docs/conf.py 2020-09-15 09:12:24.318287611 +0000 ++++ b/clang/docs/conf.py 2020-09-15 15:01:00.025893199 +0000 +@@ -37,21 +37,7 @@ + ".rst": "restructuredtext", } -try: -- import recommonmark +- import recommonmark -except ImportError: -- # manpages do not use any .md sources -- if not tags.has('builder-man'): -- raise +- # manpages do not use any .md sources +- if not tags.has("builder-man"): +- raise -else: -- import sphinx -- if sphinx.version_info >= (3, 0): -- # This requires 0.5 or later. -- extensions.append('recommonmark') -- else: -- source_parsers = {'.md': 'recommonmark.parser.CommonMarkParser'} -- source_suffix['.md'] = 'markdown' +- import sphinx +- +- if sphinx.version_info >= (3, 0): +- # This requires 0.5 or later. +- extensions.append("recommonmark") +- else: +- source_parsers = {".md": "recommonmark.parser.CommonMarkParser"} +- source_suffix[".md"] = "markdown" +import sphinx # The encoding of source files. - #source_encoding = 'utf-8-sig' --- -2.37.1 - + # source_encoding = 'utf-8-sig' From 4d5309efc8f3f57e0efbc7edacef7907f945aad7 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 6 Sep 2023 23:14:34 +0000 Subject: [PATCH 68/77] Drop dwarf4 patch in favor of config files --- 0001-Produce-DWARF4-by-default.patch | 125 --------------------------- clang.cfg | 3 + clang.spec | 15 +++- 3 files changed, 14 insertions(+), 129 deletions(-) delete mode 100644 0001-Produce-DWARF4-by-default.patch create mode 100644 clang.cfg diff --git a/0001-Produce-DWARF4-by-default.patch b/0001-Produce-DWARF4-by-default.patch deleted file mode 100644 index 9b5b46b..0000000 --- a/0001-Produce-DWARF4-by-default.patch +++ /dev/null @@ -1,125 +0,0 @@ -From adbe188f3b1e3a0dd5ec80d9409601ba7f5b0423 Mon Sep 17 00:00:00 2001 -From: Konrad Kleine -Date: Thu, 24 Mar 2022 09:44:21 +0100 -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: - -https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8f5b4?diff=unified ---- - clang/lib/Driver/ToolChain.cpp | 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/clang-g-opts.c | 2 +- - clang/test/Driver/ve-toolchain.c | 2 +- - clang/test/Driver/ve-toolchain.cpp | 2 +- - 7 files changed, 9 insertions(+), 11 deletions(-) - -diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp -index 8dafc3d481c2..92bf26dc8ec6 100644 ---- a/clang/lib/Driver/ToolChain.cpp -+++ b/clang/lib/Driver/ToolChain.cpp -@@ -428,9 +428,7 @@ ToolChain::getDefaultUnwindTableLevel(const ArgList &Args) const { - } - - unsigned ToolChain::GetDefaultDwarfVersion() const { -- // TODO: Remove the RISC-V special case when R_RISCV_SET_ULEB128 linker -- // support becomes more widely available. -- return getTriple().isRISCV() ? 4 : 5; -+ return 4; - } - - Tool *ToolChain::getClang() const { -diff --git a/clang/test/CodeGen/dwarf-version.c b/clang/test/CodeGen/dwarf-version.c -index d307eb3f101f..e7e93bf6688c 100644 ---- a/clang/test/CodeGen/dwarf-version.c -+++ b/clang/test/CodeGen/dwarf-version.c -@@ -2,8 +2,8 @@ - // RUN: %clang -target x86_64-linux-gnu -gdwarf-3 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER3 - // RUN: %clang -target x86_64-linux-gnu -gdwarf-4 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 - // RUN: %clang -target x86_64-linux-gnu -gdwarf-5 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 --// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 --// RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 -+// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 -+// RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 - - // 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 6d929b19e7e2..373905c2e0fc 100644 ---- a/clang/test/Driver/cl-options.c -+++ b/clang/test/Driver/cl-options.c -@@ -569,7 +569,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 /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 5ee0fe64fe48..985158746137 100644 ---- a/clang/test/Driver/clang-g-opts.c -+++ b/clang/test/Driver/clang-g-opts.c -@@ -32,7 +32,7 @@ - - // CHECK-WITHOUT-G-NOT: -debug-info-kind - // CHECK-WITH-G: "-debug-info-kind=constructor" --// CHECK-WITH-G: "-dwarf-version=5" -+// CHECK-WITH-G: "-dwarf-version=4" - // CHECK-WITH-G-DWARF2: "-dwarf-version=2" - - // CHECK-WITH-G-STANDALONE: "-debug-info-kind=standalone" -diff --git a/clang/test/Driver/ve-toolchain.c b/clang/test/Driver/ve-toolchain.c -index 32e25769b6da..b8a2852daba8 100644 ---- a/clang/test/Driver/ve-toolchain.c -+++ b/clang/test/Driver/ve-toolchain.c -@@ -6,7 +6,7 @@ - /// Checking dwarf-version - - // RUN: %clang -### -g --target=ve %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s --// DWARF_VER: "-dwarf-version=5" -+// DWARF_VER: "-dwarf-version=4" - - ///----------------------------------------------------------------------------- - /// Checking include-path -diff --git a/clang/test/Driver/ve-toolchain.cpp b/clang/test/Driver/ve-toolchain.cpp -index 5a33d5eceb61..cedf895b36dc 100644 ---- a/clang/test/Driver/ve-toolchain.cpp -+++ b/clang/test/Driver/ve-toolchain.cpp -@@ -7,7 +7,7 @@ - - // RUN: %clangxx -### -g --target=ve-unknown-linux-gnu \ - // RUN: %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s --// DWARF_VER: "-dwarf-version=5" -+// DWARF_VER: "-dwarf-version=4" - - ///----------------------------------------------------------------------------- - /// Checking include-path --- -2.41.0 - diff --git a/clang.cfg b/clang.cfg new file mode 100644 index 0000000..bee5a7a --- /dev/null +++ b/clang.cfg @@ -0,0 +1,3 @@ +# Drop the following option after debugedit adds support to DWARF-5: +# https://sourceware.org/bugzilla/show_bug.cgi?id=28728 +-gdwarf-4 diff --git a/clang.spec b/clang.spec index 9673a8f..189411f 100644 --- a/clang.spec +++ b/clang.spec @@ -55,7 +55,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -77,14 +77,12 @@ Source4: release-keys.asc %if %{without compat_build} Source5: macros.%{name} %endif +Source6: clang.cfg # Patches for clang Patch1: 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch Patch3: 0001-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch -# Drop the following patch after debugedit adds support to DWARF-5: -# https://sourceware.org/bugzilla/show_bug.cgi?id=28728 -Patch4: 0001-Produce-DWARF4-by-default.patch # Backport https://reviews.llvm.org/D158252 from LLVM 18 Patch5: 0001-Fix-regression-of-D157680.patch @@ -412,6 +410,7 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py -DBUILD_SHARED_LIBS=OFF \ -DCLANG_REPOSITORY_STRING="%{?dist_vendor} %{version}-%{release}" \ -DCLANG_RESOURCE_DIR=../lib/clang/%{maj_ver} \ + -DCLANG_CONFIG_FILE_SYSTEM_DIR=%{_sysconfdir}/%{name}/ \ %ifarch %{arm} -DCLANG_DEFAULT_LINKER=lld \ %endif @@ -500,6 +499,10 @@ mkdir -p %{buildroot}%{install_libdir}/clang/%{maj_ver}/{include,lib,share}/ ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format-diff %endif +# Install config file +mkdir -p %{buildroot}%{_sysconfdir}/%{name}/ +mv %{SOURCE6} %{buildroot}%{_sysconfdir}/%{name}/%{_target_platform}.cfg + %check %if %{without compat_build} %if %{with check} @@ -537,6 +540,7 @@ false %files libs %{install_prefix}/lib/clang/%{maj_ver}/include/* %{install_libdir}/*.so.* +%{_sysconfdir}/%{name}/%{_target_platform}.cfg %files devel %if %{without compat_build} @@ -636,6 +640,9 @@ false %endif %changelog +* Wed Sep 06 2023 Tom Stellard - 17.0.0~rc3-2 +- Drop dwarf4 patch in favor of config files + %{?llvm_snapshot_changelog_entry} * Wed Aug 23 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc3-1 From c4482a5a65d4cce202c4fc1d19e017dedc7128bc Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Fri, 8 Sep 2023 15:34:14 -0300 Subject: [PATCH 69/77] Update to LLVM 17.0.0 RC4 --- 0001-Fix-regression-of-D157680.patch | 32 ------------------- 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch | 30 +++++++++++++++++ 689.patch | 30 +++++++++++++++++ clang.spec | 16 +++++++--- sources | 8 ++--- 5 files changed, 75 insertions(+), 41 deletions(-) delete mode 100644 0001-Fix-regression-of-D157680.patch create mode 100644 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch create mode 100644 689.patch diff --git a/0001-Fix-regression-of-D157680.patch b/0001-Fix-regression-of-D157680.patch deleted file mode 100644 index bfc96c9..0000000 --- a/0001-Fix-regression-of-D157680.patch +++ /dev/null @@ -1,32 +0,0 @@ -From b7cf9bbfde5e623e16fe8669e18aa34cbb3afafa Mon Sep 17 00:00:00 2001 -From: XinWang10 -Date: Fri, 18 Aug 2023 00:08:01 -0700 -Subject: [PATCH] Fix regression of D157680 - -Test cases in D157680 should be target specific, but miss some limit, add them back to make buildbot pass. - -Reviewed By: skan, Hahnfeld - -Differential Revision: https://reviews.llvm.org/D158252 ---- - -diff --git a/clang/test/Driver/x86-no-gather-no-scatter.cpp b/clang/test/Driver/x86-no-gather-no-scatter.cpp -index 7efcc55787c4..2e8f4615b846 100644 ---- a/clang/test/Driver/x86-no-gather-no-scatter.cpp -+++ b/clang/test/Driver/x86-no-gather-no-scatter.cpp -@@ -1,8 +1,8 @@ - /// Tests -mno-gather and -mno-scatter --// RUN: %clang -c -mno-gather -### %s 2>&1 | FileCheck --check-prefix=NOGATHER %s --// RUN: %clang_cl -c /Qgather- -### %s 2>&1 | FileCheck --check-prefix=NOGATHER %s -+// RUN: %clang -target x86_64-unknown-linux-gnu -c -mno-gather -### %s 2>&1 | FileCheck --check-prefix=NOGATHER %s -+// RUN: %clang_cl --target=x86_64-windows -c /Qgather- -### %s 2>&1 | FileCheck --check-prefix=NOGATHER %s - // NOGATHER: "-target-feature" "+prefer-no-gather" - --// RUN: %clang -c -mno-scatter -### %s 2>&1 | FileCheck --check-prefix=NOSCATTER %s --// RUN: %clang_cl -c /Qscatter- -### %s 2>&1 | FileCheck --check-prefix=NOSCATTER %s -+// RUN: %clang -target x86_64-unknown-linux-gnu -c -mno-scatter -### %s 2>&1 | FileCheck --check-prefix=NOSCATTER %s -+// RUN: %clang_cl --target=x86_64-windows -c /Qscatter- -### %s 2>&1 | FileCheck --check-prefix=NOSCATTER %s - // NOSCATTER: "-target-feature" "+prefer-no-scatter" --- -2.41.0 - diff --git a/0001-Workaround-a-bug-in-ORC-on-ppc64le.patch b/0001-Workaround-a-bug-in-ORC-on-ppc64le.patch new file mode 100644 index 0000000..af236a1 --- /dev/null +++ b/0001-Workaround-a-bug-in-ORC-on-ppc64le.patch @@ -0,0 +1,30 @@ +From a2449cee8c995b56f1892502aab3dfad3d6f3ca1 Mon Sep 17 00:00:00 2001 +From: Tulio Magno Quites Machado Filho +Date: Fri, 8 Sep 2023 11:45:34 -0300 +Subject: [PATCH] Workaround a bug in ORC on ppc64le + +The Jit code appears to be returning the wrong printf symbol on ppc64le +after the transition of the default long double to IEEE 128-bit floating +point. +--- + clang/unittests/Interpreter/InterpreterTest.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/clang/unittests/Interpreter/InterpreterTest.cpp b/clang/unittests/Interpreter/InterpreterTest.cpp +index abb8e6377aab..7b6697ebc6ed 100644 +--- a/clang/unittests/Interpreter/InterpreterTest.cpp ++++ b/clang/unittests/Interpreter/InterpreterTest.cpp +@@ -243,7 +243,9 @@ TEST(IncrementalProcessing, FindMangledNameSymbol) { + EXPECT_FALSE(!Addr); + + // FIXME: Re-enable when we investigate the way we handle dllimports on Win. +-#ifndef _WIN32 ++ // FIXME: The printf symbol returned from the Jit may not be correct on ++ // ppc64le when the default long double is IEEE 128-bit fp. ++#if !defined _WIN32 && !(defined __PPC64__ && defined __LITTLE_ENDIAN__) + EXPECT_EQ((uintptr_t)&printf, Addr->getValue()); + #endif // _WIN32 + } +-- +2.41.0 + diff --git a/689.patch b/689.patch new file mode 100644 index 0000000..da3eb14 --- /dev/null +++ b/689.patch @@ -0,0 +1,30 @@ +From b7d6e2b5308a7b53ce7b3bbfd6e8e38e28e036ec Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Tue, 5 Sep 2023 16:02:04 +0100 +Subject: [PATCH] [Clang] Fix JIT test on 32-bit systems + +As reported by mgorny at https://reviews.llvm.org/D159115#4638037, the +unsigned long long cast fails on 32-bit systems at least with GCC. + +It looks like a pointer provenance/aliasing issue rather than a bug in GCC. + +Acked by Vassil Vassilev on the original revision. + +(cherry picked from commit 3403686b72507e3fdbcd69f21fb9235ffa0ca169) +--- + clang/unittests/Interpreter/InterpreterTest.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/clang/unittests/Interpreter/InterpreterTest.cpp b/clang/unittests/Interpreter/InterpreterTest.cpp +index abb8e6377aab..5f2911e9a7ad 100644 +--- a/clang/unittests/Interpreter/InterpreterTest.cpp ++++ b/clang/unittests/Interpreter/InterpreterTest.cpp +@@ -244,7 +244,7 @@ TEST(IncrementalProcessing, FindMangledNameSymbol) { + + // FIXME: Re-enable when we investigate the way we handle dllimports on Win. + #ifndef _WIN32 +- EXPECT_EQ((unsigned long long)&printf, Addr->getValue()); ++ EXPECT_EQ((uintptr_t)&printf, Addr->getValue()); + #endif // _WIN32 + } + diff --git a/clang.spec b/clang.spec index 189411f..3df63c6 100644 --- a/clang.spec +++ b/clang.spec @@ -16,7 +16,7 @@ %global maj_ver 17 %global min_ver 0 %global patch_ver 0 -%global rc_ver 3 +%global rc_ver 4 %if %{with snapshot_build} %undefine rc_ver @@ -55,7 +55,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}} -Release: 2%{?dist} +Release: 1%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -83,9 +83,12 @@ Source6: clang.cfg Patch1: 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch Patch3: 0001-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch -# Backport https://reviews.llvm.org/D158252 from LLVM 18 -Patch5: 0001-Fix-regression-of-D157680.patch - +# Backport from LLVM 18: +# https://github.com/llvm/llvm-project-release-prs/pull/689 +Patch4: 689.patch +# Workaround a bug in ORC on ppc64le. +# More info is available here: https://reviews.llvm.org/D159115#4641826 +Patch5: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch # RHEL specific patches # Avoid unwanted dependency on python-recommonmark @@ -645,6 +648,9 @@ false %{?llvm_snapshot_changelog_entry} +* Tue Sep 05 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc4-1 +- Update to LLVM 17.0.0 RC4 + * Wed Aug 23 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc3-1 - Update to LLVM 17.0.0 RC3 diff --git a/sources b/sources index 707b717..1d36515 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-17.0.0rc3.src.tar.xz) = eb04e044f1fb4d10d6c46ead77bbb78b08a1d9a4144c4c24dd8fdaa634a493ead312d17ca8dfc1870673f80739204ec7ba2069f7704fc7ef37584b445a52097c -SHA512 (clang-17.0.0rc3.src.tar.xz.sig) = ed4c292e735c473908bdbe13dfa91a57ae8cf01759fb6c11be57c0b0661ea16df67fa29a4f51342ab6750a3e54191f96ea37b0e3b39a9854f60c72a4af652001 -SHA512 (clang-tools-extra-17.0.0rc3.src.tar.xz) = 3134d1ff29e900d2701d9cef388a4f04f65246a0366584666b8848c465b7e876eb607c6f0c3ab60067e73e9371aa9b73baf54d313642542acd78c6b8c1cd64a7 -SHA512 (clang-tools-extra-17.0.0rc3.src.tar.xz.sig) = 4ca473857bd00aba13015d35a776fb5b20848c79aa2e53e51a1f4c98eb088501dc87f4ae59b82e53ae9521c5ece4a92591ac8c14014d0a7af4e5cb8b355bf64f +SHA512 (clang-17.0.0rc4.src.tar.xz) = 97d9263fb56cbb20dfc70db31e375339b8ec490ba1a7b64b69a38738c2c4ea34b0bf8d38c7542be0a1eb68ead121dfc7cde4d76b08d916160cbbd81c3f1ea499 +SHA512 (clang-17.0.0rc4.src.tar.xz.sig) = 4c0f70b236430de358ed51dc640970c8fa5894542d4af22ec6c0d2a87a1cda24684d8f58a3102e7973c510618d19f4cfd77aab1ced50542e0d602f021a9c9744 +SHA512 (clang-tools-extra-17.0.0rc4.src.tar.xz) = 3372b94d0eeafd838a1d9b75d4e69645a40632150cc5ba4d74494469fb4fe070da979f0140954ac7773d27b1bdadd0ae30a7571ae08b23f307ade23a167e6818 +SHA512 (clang-tools-extra-17.0.0rc4.src.tar.xz.sig) = 48e16589e37bafa98aec0de20ae6e5ac7abfb0d4405713c2b15ceca76dfce964949e36466affbdcad41c6889652a5dda40a6d5e17afa866eb208c404166909b3 From 2ad36cffbc3fe9169c3c86fa794159841aae9dd0 Mon Sep 17 00:00:00 2001 From: Alessandro Astone Date: Sat, 16 Sep 2023 16:00:36 +0200 Subject: [PATCH 70/77] Fix resource-filesystem after https://fedoraproject.org/wiki/Changes/LLVM-17 --- clang.spec | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/clang.spec b/clang.spec index 3df63c6..697256e 100644 --- a/clang.spec +++ b/clang.spec @@ -55,7 +55,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -192,7 +192,7 @@ libomp-devel to enable -fopenmp. %package libs Summary: Runtime library for clang -Requires: %{name}-resource-filesystem%{?_isa} = %{version} +Requires: %{name}-resource-filesystem = %{version} Recommends: compiler-rt%{?_isa} = %{version} # atomic support is not part of compiler-rt Recommends: libatomic%{?_isa} @@ -224,9 +224,10 @@ Development header files for clang. %package resource-filesystem Summary: Filesystem package that owns the clang resource directory Provides: %{name}-resource-filesystem(major) = %{maj_ver} +BuildArch: noarch %description resource-filesystem -This package owns the clang resouce directory: $libdir/clang/$version/ +This package owns the clang resouce directory: lib/clang/$version/ %if %{without compat_build} %package analyzer @@ -494,7 +495,7 @@ chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1* # Create sub-directories in the clang resource directory that will be # populated by other packages -mkdir -p %{buildroot}%{install_libdir}/clang/%{maj_ver}/{include,lib,share}/ +mkdir -p %{buildroot}%{install_prefix}/lib/clang/%{maj_ver}/{bin,include,lib,share}/ %if %{without compat_build} @@ -562,11 +563,12 @@ false %endif %files resource-filesystem -%dir %{install_libdir}/clang/ -%dir %{install_libdir}/clang/%{maj_ver}/ -%dir %{install_libdir}/clang/%{maj_ver}/include/ -%dir %{install_libdir}/clang/%{maj_ver}/lib/ -%dir %{install_libdir}/clang/%{maj_ver}/share/ +%dir %{install_prefix}/lib/clang/ +%dir %{install_prefix}/lib/clang/%{maj_ver}/ +%dir %{install_prefix}/lib/clang/%{maj_ver}/bin/ +%dir %{install_prefix}/lib/clang/%{maj_ver}/include/ +%dir %{install_prefix}/lib/clang/%{maj_ver}/lib/ +%dir %{install_prefix}/lib/clang/%{maj_ver}/share/ %if %{without compat_build} %files analyzer @@ -643,6 +645,9 @@ false %endif %changelog +* Mon Sep 18 2023 Alessandro Astone - 17.0.0~rc4-2 +- Fix resource-filesystem after https://fedoraproject.org/wiki/Changes/LLVM-17 + * Wed Sep 06 2023 Tom Stellard - 17.0.0~rc3-2 - Drop dwarf4 patch in favor of config files From 8e7cc4af9d3691d0ca7d07f89913ab025aadb10a Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Tue, 19 Sep 2023 11:21:13 -0300 Subject: [PATCH 71/77] Move macros.clang to resource-filesystem This is part of the Fedora change approved [1] which states the following: The macros.clang file with RPM macros will be moved from the clang-devel package to the clang-resource-filesystem package. [1] https://fedoraproject.org/wiki/Changes/LLVM-17 --- clang.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/clang.spec b/clang.spec index 697256e..4b38d62 100644 --- a/clang.spec +++ b/clang.spec @@ -55,7 +55,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -554,7 +554,6 @@ false %{_libdir}/cmake/* %{_bindir}/clang-tblgen %dir %{_datadir}/clang/ -%{_rpmmacrodir}/macros.%{name} %else %{install_libdir}/*.so %{pkg_includedir}/clang/ @@ -569,8 +568,10 @@ false %dir %{install_prefix}/lib/clang/%{maj_ver}/include/ %dir %{install_prefix}/lib/clang/%{maj_ver}/lib/ %dir %{install_prefix}/lib/clang/%{maj_ver}/share/ - %if %{without compat_build} +%{_rpmmacrodir}/macros.%{name} + + %files analyzer %{_bindir}/scan-view %{_bindir}/scan-build @@ -645,6 +646,9 @@ false %endif %changelog +* Tue Sep 19 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc4-3 +- Move macros.clang to resource-filesystem + * Mon Sep 18 2023 Alessandro Astone - 17.0.0~rc4-2 - Fix resource-filesystem after https://fedoraproject.org/wiki/Changes/LLVM-17 From 7ca2731b6f5d737fb03badbc58e28e398fd7e12c Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Tue, 19 Sep 2023 11:25:35 -0300 Subject: [PATCH 72/77] Revert "Drop dwarf4 patch in favor of config files" This reverts commit 4d5309efc8f3f57e0efbc7edacef7907f945aad7 in order to fix an issue where debug information is enabled by default even when -g is not used. Resolves: rhbz#2239619. --- 0001-Produce-DWARF4-by-default.patch | 125 +++++++++++++++++++++++++++ clang.cfg | 3 - clang.spec | 23 +++-- 3 files changed, 136 insertions(+), 15 deletions(-) create mode 100644 0001-Produce-DWARF4-by-default.patch delete mode 100644 clang.cfg diff --git a/0001-Produce-DWARF4-by-default.patch b/0001-Produce-DWARF4-by-default.patch new file mode 100644 index 0000000..9b5b46b --- /dev/null +++ b/0001-Produce-DWARF4-by-default.patch @@ -0,0 +1,125 @@ +From adbe188f3b1e3a0dd5ec80d9409601ba7f5b0423 Mon Sep 17 00:00:00 2001 +From: Konrad Kleine +Date: Thu, 24 Mar 2022 09:44:21 +0100 +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: + +https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8f5b4?diff=unified +--- + clang/lib/Driver/ToolChain.cpp | 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/clang-g-opts.c | 2 +- + clang/test/Driver/ve-toolchain.c | 2 +- + clang/test/Driver/ve-toolchain.cpp | 2 +- + 7 files changed, 9 insertions(+), 11 deletions(-) + +diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp +index 8dafc3d481c2..92bf26dc8ec6 100644 +--- a/clang/lib/Driver/ToolChain.cpp ++++ b/clang/lib/Driver/ToolChain.cpp +@@ -428,9 +428,7 @@ ToolChain::getDefaultUnwindTableLevel(const ArgList &Args) const { + } + + unsigned ToolChain::GetDefaultDwarfVersion() const { +- // TODO: Remove the RISC-V special case when R_RISCV_SET_ULEB128 linker +- // support becomes more widely available. +- return getTriple().isRISCV() ? 4 : 5; ++ return 4; + } + + Tool *ToolChain::getClang() const { +diff --git a/clang/test/CodeGen/dwarf-version.c b/clang/test/CodeGen/dwarf-version.c +index d307eb3f101f..e7e93bf6688c 100644 +--- a/clang/test/CodeGen/dwarf-version.c ++++ b/clang/test/CodeGen/dwarf-version.c +@@ -2,8 +2,8 @@ + // RUN: %clang -target x86_64-linux-gnu -gdwarf-3 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER3 + // RUN: %clang -target x86_64-linux-gnu -gdwarf-4 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 + // RUN: %clang -target x86_64-linux-gnu -gdwarf-5 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 +-// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 +-// RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 ++// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 ++// RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 + + // 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 6d929b19e7e2..373905c2e0fc 100644 +--- a/clang/test/Driver/cl-options.c ++++ b/clang/test/Driver/cl-options.c +@@ -569,7 +569,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 /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 5ee0fe64fe48..985158746137 100644 +--- a/clang/test/Driver/clang-g-opts.c ++++ b/clang/test/Driver/clang-g-opts.c +@@ -32,7 +32,7 @@ + + // CHECK-WITHOUT-G-NOT: -debug-info-kind + // CHECK-WITH-G: "-debug-info-kind=constructor" +-// CHECK-WITH-G: "-dwarf-version=5" ++// CHECK-WITH-G: "-dwarf-version=4" + // CHECK-WITH-G-DWARF2: "-dwarf-version=2" + + // CHECK-WITH-G-STANDALONE: "-debug-info-kind=standalone" +diff --git a/clang/test/Driver/ve-toolchain.c b/clang/test/Driver/ve-toolchain.c +index 32e25769b6da..b8a2852daba8 100644 +--- a/clang/test/Driver/ve-toolchain.c ++++ b/clang/test/Driver/ve-toolchain.c +@@ -6,7 +6,7 @@ + /// Checking dwarf-version + + // RUN: %clang -### -g --target=ve %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s +-// DWARF_VER: "-dwarf-version=5" ++// DWARF_VER: "-dwarf-version=4" + + ///----------------------------------------------------------------------------- + /// Checking include-path +diff --git a/clang/test/Driver/ve-toolchain.cpp b/clang/test/Driver/ve-toolchain.cpp +index 5a33d5eceb61..cedf895b36dc 100644 +--- a/clang/test/Driver/ve-toolchain.cpp ++++ b/clang/test/Driver/ve-toolchain.cpp +@@ -7,7 +7,7 @@ + + // RUN: %clangxx -### -g --target=ve-unknown-linux-gnu \ + // RUN: %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s +-// DWARF_VER: "-dwarf-version=5" ++// DWARF_VER: "-dwarf-version=4" + + ///----------------------------------------------------------------------------- + /// Checking include-path +-- +2.41.0 + diff --git a/clang.cfg b/clang.cfg deleted file mode 100644 index bee5a7a..0000000 --- a/clang.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Drop the following option after debugedit adds support to DWARF-5: -# https://sourceware.org/bugzilla/show_bug.cgi?id=28728 --gdwarf-4 diff --git a/clang.spec b/clang.spec index 4b38d62..f338783 100644 --- a/clang.spec +++ b/clang.spec @@ -55,7 +55,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}} -Release: 3%{?dist} +Release: 4%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -77,18 +77,20 @@ Source4: release-keys.asc %if %{without compat_build} Source5: macros.%{name} %endif -Source6: clang.cfg # Patches for clang Patch1: 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch Patch3: 0001-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch +# Drop the following patch after debugedit adds support to DWARF-5: +# https://sourceware.org/bugzilla/show_bug.cgi?id=28728 +Patch4: 0001-Produce-DWARF4-by-default.patch # Backport from LLVM 18: # https://github.com/llvm/llvm-project-release-prs/pull/689 -Patch4: 689.patch +Patch5: 689.patch # Workaround a bug in ORC on ppc64le. # More info is available here: https://reviews.llvm.org/D159115#4641826 -Patch5: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch +Patch6: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch # RHEL specific patches # Avoid unwanted dependency on python-recommonmark @@ -414,7 +416,6 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py -DBUILD_SHARED_LIBS=OFF \ -DCLANG_REPOSITORY_STRING="%{?dist_vendor} %{version}-%{release}" \ -DCLANG_RESOURCE_DIR=../lib/clang/%{maj_ver} \ - -DCLANG_CONFIG_FILE_SYSTEM_DIR=%{_sysconfdir}/%{name}/ \ %ifarch %{arm} -DCLANG_DEFAULT_LINKER=lld \ %endif @@ -503,10 +504,6 @@ mkdir -p %{buildroot}%{install_prefix}/lib/clang/%{maj_ver}/{bin,include,lib,sha ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format-diff %endif -# Install config file -mkdir -p %{buildroot}%{_sysconfdir}/%{name}/ -mv %{SOURCE6} %{buildroot}%{_sysconfdir}/%{name}/%{_target_platform}.cfg - %check %if %{without compat_build} %if %{with check} @@ -544,7 +541,6 @@ false %files libs %{install_prefix}/lib/clang/%{maj_ver}/include/* %{install_libdir}/*.so.* -%{_sysconfdir}/%{name}/%{_target_platform}.cfg %files devel %if %{without compat_build} @@ -646,6 +642,11 @@ false %endif %changelog +%{?llvm_snapshot_changelog_entry} + +* Tue Sep 19 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc4-4 +- Re-add dwarf4 patch. Fix rhbz#2239619. + * Tue Sep 19 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc4-3 - Move macros.clang to resource-filesystem @@ -655,8 +656,6 @@ false * Wed Sep 06 2023 Tom Stellard - 17.0.0~rc3-2 - Drop dwarf4 patch in favor of config files -%{?llvm_snapshot_changelog_entry} - * Tue Sep 05 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc4-1 - Update to LLVM 17.0.0 RC4 From 522fd69676aea226f026e4c9e0d14eb687eeac36 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Sat, 23 Sep 2023 07:42:26 -0300 Subject: [PATCH 73/77] Update to LLVM 17.0.1 --- 689.patch | 30 ------------------------------ clang.spec | 14 +++++++------- sources | 8 ++++---- 3 files changed, 11 insertions(+), 41 deletions(-) delete mode 100644 689.patch diff --git a/689.patch b/689.patch deleted file mode 100644 index da3eb14..0000000 --- a/689.patch +++ /dev/null @@ -1,30 +0,0 @@ -From b7d6e2b5308a7b53ce7b3bbfd6e8e38e28e036ec Mon Sep 17 00:00:00 2001 -From: Sam James -Date: Tue, 5 Sep 2023 16:02:04 +0100 -Subject: [PATCH] [Clang] Fix JIT test on 32-bit systems - -As reported by mgorny at https://reviews.llvm.org/D159115#4638037, the -unsigned long long cast fails on 32-bit systems at least with GCC. - -It looks like a pointer provenance/aliasing issue rather than a bug in GCC. - -Acked by Vassil Vassilev on the original revision. - -(cherry picked from commit 3403686b72507e3fdbcd69f21fb9235ffa0ca169) ---- - clang/unittests/Interpreter/InterpreterTest.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/clang/unittests/Interpreter/InterpreterTest.cpp b/clang/unittests/Interpreter/InterpreterTest.cpp -index abb8e6377aab..5f2911e9a7ad 100644 ---- a/clang/unittests/Interpreter/InterpreterTest.cpp -+++ b/clang/unittests/Interpreter/InterpreterTest.cpp -@@ -244,7 +244,7 @@ TEST(IncrementalProcessing, FindMangledNameSymbol) { - - // FIXME: Re-enable when we investigate the way we handle dllimports on Win. - #ifndef _WIN32 -- EXPECT_EQ((unsigned long long)&printf, Addr->getValue()); -+ EXPECT_EQ((uintptr_t)&printf, Addr->getValue()); - #endif // _WIN32 - } - diff --git a/clang.spec b/clang.spec index f338783..92e622a 100644 --- a/clang.spec +++ b/clang.spec @@ -15,8 +15,8 @@ %global maj_ver 17 %global min_ver 0 -%global patch_ver 0 -%global rc_ver 4 +%global patch_ver 1 +#global rc_ver 4 %if %{with snapshot_build} %undefine rc_ver @@ -55,7 +55,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}} -Release: 4%{?dist} +Release: 1%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -85,12 +85,9 @@ Patch3: 0001-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch # Drop the following patch after debugedit adds support to DWARF-5: # https://sourceware.org/bugzilla/show_bug.cgi?id=28728 Patch4: 0001-Produce-DWARF4-by-default.patch -# Backport from LLVM 18: -# https://github.com/llvm/llvm-project-release-prs/pull/689 -Patch5: 689.patch # Workaround a bug in ORC on ppc64le. # More info is available here: https://reviews.llvm.org/D159115#4641826 -Patch6: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch +Patch5: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch # RHEL specific patches # Avoid unwanted dependency on python-recommonmark @@ -644,6 +641,9 @@ false %changelog %{?llvm_snapshot_changelog_entry} +* Sat Sep 23 2023 Tulio Magno Quites Machado Filho - 17.0.1-1 +- Update to LLVM 17.0.1 + * Tue Sep 19 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc4-4 - Re-add dwarf4 patch. Fix rhbz#2239619. diff --git a/sources b/sources index 1d36515..98f9133 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-17.0.0rc4.src.tar.xz) = 97d9263fb56cbb20dfc70db31e375339b8ec490ba1a7b64b69a38738c2c4ea34b0bf8d38c7542be0a1eb68ead121dfc7cde4d76b08d916160cbbd81c3f1ea499 -SHA512 (clang-17.0.0rc4.src.tar.xz.sig) = 4c0f70b236430de358ed51dc640970c8fa5894542d4af22ec6c0d2a87a1cda24684d8f58a3102e7973c510618d19f4cfd77aab1ced50542e0d602f021a9c9744 -SHA512 (clang-tools-extra-17.0.0rc4.src.tar.xz) = 3372b94d0eeafd838a1d9b75d4e69645a40632150cc5ba4d74494469fb4fe070da979f0140954ac7773d27b1bdadd0ae30a7571ae08b23f307ade23a167e6818 -SHA512 (clang-tools-extra-17.0.0rc4.src.tar.xz.sig) = 48e16589e37bafa98aec0de20ae6e5ac7abfb0d4405713c2b15ceca76dfce964949e36466affbdcad41c6889652a5dda40a6d5e17afa866eb208c404166909b3 +SHA512 (clang-17.0.1.src.tar.xz) = fe2a74f67d6f45cb53d25864643e5b8e98a7066c8f8862acdd76a73e3b5478fc7220d5f136558ba9dd4043e661d09a3d293e0ad689eedcd491feba0a201e0c51 +SHA512 (clang-17.0.1.src.tar.xz.sig) = 40ebd4b4b2102f130734388c4368fa21d3c7dd3b88e6ef1bf167416d17dafc60a216ec80d87e13465b7b450349310d1cb44b56b9e6166d3bef41c96230a5cc32 +SHA512 (clang-tools-extra-17.0.1.src.tar.xz) = e4e1b3b39aba0d225312e6c504851cf98fba888cdcadd45a5f3ac6673b1d43e289e3febbd3e18cb0f44b522a6316651a400bb2c2e48e4c650ffa5dc8b4a46d74 +SHA512 (clang-tools-extra-17.0.1.src.tar.xz.sig) = 9a08b574ced425ebe42790257afa42963483292c9866e2fcf114fe0aca1626e771ce97cf52196c070f0d26e695f17684c7da6937925175369e990aaf82aa8843 From c3ec28082634a2bf69977400e812798c0cba80c8 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Wed, 4 Oct 2023 15:22:53 -0300 Subject: [PATCH 74/77] Update to LLVM 17.0.2 --- clang.spec | 5 ++++- sources | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/clang.spec b/clang.spec index 92e622a..57962b7 100644 --- a/clang.spec +++ b/clang.spec @@ -15,7 +15,7 @@ %global maj_ver 17 %global min_ver 0 -%global patch_ver 1 +%global patch_ver 2 #global rc_ver 4 %if %{with snapshot_build} @@ -641,6 +641,9 @@ false %changelog %{?llvm_snapshot_changelog_entry} +* Wed Oct 04 2023 Tulio Magno Quites Machado Filho - 17.0.2-1 +- Update to LLVM 17.0.2 + * Sat Sep 23 2023 Tulio Magno Quites Machado Filho - 17.0.1-1 - Update to LLVM 17.0.1 diff --git a/sources b/sources index 98f9133..420d6c8 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-17.0.1.src.tar.xz) = fe2a74f67d6f45cb53d25864643e5b8e98a7066c8f8862acdd76a73e3b5478fc7220d5f136558ba9dd4043e661d09a3d293e0ad689eedcd491feba0a201e0c51 -SHA512 (clang-17.0.1.src.tar.xz.sig) = 40ebd4b4b2102f130734388c4368fa21d3c7dd3b88e6ef1bf167416d17dafc60a216ec80d87e13465b7b450349310d1cb44b56b9e6166d3bef41c96230a5cc32 -SHA512 (clang-tools-extra-17.0.1.src.tar.xz) = e4e1b3b39aba0d225312e6c504851cf98fba888cdcadd45a5f3ac6673b1d43e289e3febbd3e18cb0f44b522a6316651a400bb2c2e48e4c650ffa5dc8b4a46d74 -SHA512 (clang-tools-extra-17.0.1.src.tar.xz.sig) = 9a08b574ced425ebe42790257afa42963483292c9866e2fcf114fe0aca1626e771ce97cf52196c070f0d26e695f17684c7da6937925175369e990aaf82aa8843 +SHA512 (clang-17.0.2.src.tar.xz) = d86933c0e5c441088596feba47d4834b299e09594c30192e653c80debf2a8807665e2bf29c51bc2eb9e014326a8e811ade654f73df4fca9a0ffa88b647e35f2b +SHA512 (clang-tools-extra-17.0.2.src.tar.xz) = 40126831ae1ea492afe98603d86ed8df4a735734eb2cf0b9e650b56d78ef525492ed3c924003561564f308586ff0cd53b956164cf795f66fe26434b24b9fb608 +SHA512 (clang-tools-extra-17.0.2.src.tar.xz.sig) = 9ffa1f2a233a5a88f5c408a0ce6b9cb8df406b71a9e3a9b54c618ac353ef221fe34dfc663367806fdd8eb766aab94b0a3a1660320098a420439e2112d58cca10 +SHA512 (clang-17.0.2.src.tar.xz.sig) = 10eab520241c7c943814377326e90e78832c254c25b42411f338406e62c2c2d1a7780e14be7840d31d09cef3eddc82ac59c482b81d2e4cf240a09aa706d89494 From efe2f45aa02213e2c86dcba46783139cfacc4845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 9 Oct 2023 16:48:37 +0200 Subject: [PATCH 75/77] Backport fix for RHEL-1650 --- cfg.patch | 298 +++++++++++++++++++++++++++++++++++++++++++++++++++++ clang.spec | 10 +- tsa.patch | 124 ++++++++++++++++++++++ 3 files changed, 431 insertions(+), 1 deletion(-) create mode 100644 cfg.patch create mode 100644 tsa.patch diff --git a/cfg.patch b/cfg.patch new file mode 100644 index 0000000..779558a --- /dev/null +++ b/cfg.patch @@ -0,0 +1,298 @@ +commit ad4a5130277776d8f15f40ac5a6dede6ad3aabfb +Author: Timm Bäder +Date: Tue Aug 8 14:11:33 2023 +0200 + + [clang][CFG] Cleanup functions + + Add declarations declared with attribute(cleanup(...)) to the CFG, + similar to destructors. + + Differential Revision: https://reviews.llvm.org/D157385 + +diff --git a/clang/include/clang/Analysis/CFG.h b/clang/include/clang/Analysis/CFG.h +index cf4fa2da2a35..67383bb316d3 100644 +--- a/clang/include/clang/Analysis/CFG.h ++++ b/clang/include/clang/Analysis/CFG.h +@@ -14,10 +14,11 @@ + #ifndef LLVM_CLANG_ANALYSIS_CFG_H + #define LLVM_CLANG_ANALYSIS_CFG_H + +-#include "clang/Analysis/Support/BumpVector.h" +-#include "clang/Analysis/ConstructionContext.h" ++#include "clang/AST/Attr.h" + #include "clang/AST/ExprCXX.h" + #include "clang/AST/ExprObjC.h" ++#include "clang/Analysis/ConstructionContext.h" ++#include "clang/Analysis/Support/BumpVector.h" + #include "clang/Basic/LLVM.h" + #include "llvm/ADT/DenseMap.h" + #include "llvm/ADT/GraphTraits.h" +@@ -74,7 +75,8 @@ public: + MemberDtor, + TemporaryDtor, + DTOR_BEGIN = AutomaticObjectDtor, +- DTOR_END = TemporaryDtor ++ DTOR_END = TemporaryDtor, ++ CleanupFunction, + }; + + protected: +@@ -383,6 +385,32 @@ private: + } + }; + ++class CFGCleanupFunction final : public CFGElement { ++public: ++ CFGCleanupFunction() = default; ++ CFGCleanupFunction(const VarDecl *VD) ++ : CFGElement(Kind::CleanupFunction, VD) { ++ assert(VD->hasAttr()); ++ } ++ ++ const VarDecl *getVarDecl() const { ++ return static_cast(Data1.getPointer()); ++ } ++ ++ /// Returns the function to be called when cleaning up the var decl. ++ const FunctionDecl *getFunctionDecl() const { ++ const CleanupAttr *A = getVarDecl()->getAttr(); ++ return A->getFunctionDecl(); ++ } ++ ++private: ++ friend class CFGElement; ++ ++ static bool isKind(const CFGElement E) { ++ return E.getKind() == Kind::CleanupFunction; ++ } ++}; ++ + /// Represents C++ object destructor implicitly generated for automatic object + /// or temporary bound to const reference at the point of leaving its local + /// scope. +@@ -1142,6 +1170,10 @@ public: + Elements.push_back(CFGAutomaticObjDtor(VD, S), C); + } + ++ void appendCleanupFunction(const VarDecl *VD, BumpVectorContext &C) { ++ Elements.push_back(CFGCleanupFunction(VD), C); ++ } ++ + void appendLifetimeEnds(VarDecl *VD, Stmt *S, BumpVectorContext &C) { + Elements.push_back(CFGLifetimeEnds(VD, S), C); + } +diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp +index b82f9010a83f..03ab4c6fdf29 100644 +--- a/clang/lib/Analysis/CFG.cpp ++++ b/clang/lib/Analysis/CFG.cpp +@@ -881,6 +881,10 @@ private: + B->appendAutomaticObjDtor(VD, S, cfg->getBumpVectorContext()); + } + ++ void appendCleanupFunction(CFGBlock *B, VarDecl *VD) { ++ B->appendCleanupFunction(VD, cfg->getBumpVectorContext()); ++ } ++ + void appendLifetimeEnds(CFGBlock *B, VarDecl *VD, Stmt *S) { + B->appendLifetimeEnds(VD, S, cfg->getBumpVectorContext()); + } +@@ -1346,7 +1350,8 @@ private: + return {}; + } + +- bool hasTrivialDestructor(VarDecl *VD); ++ bool hasTrivialDestructor(const VarDecl *VD) const; ++ bool needsAutomaticDestruction(const VarDecl *VD) const; + }; + + } // namespace +@@ -1861,14 +1866,14 @@ void CFGBuilder::addAutomaticObjDestruction(LocalScope::const_iterator B, + if (B == E) + return; + +- SmallVector DeclsNonTrivial; +- DeclsNonTrivial.reserve(B.distance(E)); ++ SmallVector DeclsNeedDestruction; ++ DeclsNeedDestruction.reserve(B.distance(E)); + + for (VarDecl* D : llvm::make_range(B, E)) +- if (!hasTrivialDestructor(D)) +- DeclsNonTrivial.push_back(D); ++ if (needsAutomaticDestruction(D)) ++ DeclsNeedDestruction.push_back(D); + +- for (VarDecl *VD : llvm::reverse(DeclsNonTrivial)) { ++ for (VarDecl *VD : llvm::reverse(DeclsNeedDestruction)) { + if (BuildOpts.AddImplicitDtors) { + // If this destructor is marked as a no-return destructor, we need to + // create a new block for the destructor which does not have as a +@@ -1879,7 +1884,8 @@ void CFGBuilder::addAutomaticObjDestruction(LocalScope::const_iterator B, + Ty = getReferenceInitTemporaryType(VD->getInit()); + Ty = Context->getBaseElementType(Ty); + +- if (Ty->getAsCXXRecordDecl()->isAnyDestructorNoReturn()) ++ const CXXRecordDecl *CRD = Ty->getAsCXXRecordDecl(); ++ if (CRD && CRD->isAnyDestructorNoReturn()) + Block = createNoReturnBlock(); + } + +@@ -1890,8 +1896,10 @@ void CFGBuilder::addAutomaticObjDestruction(LocalScope::const_iterator B, + // objects, we end lifetime with scope end. + if (BuildOpts.AddLifetime) + appendLifetimeEnds(Block, VD, S); +- if (BuildOpts.AddImplicitDtors) ++ if (BuildOpts.AddImplicitDtors && !hasTrivialDestructor(VD)) + appendAutomaticObjDtor(Block, VD, S); ++ if (VD->hasAttr()) ++ appendCleanupFunction(Block, VD); + } + } + +@@ -1922,7 +1930,7 @@ void CFGBuilder::addScopeExitHandling(LocalScope::const_iterator B, + // is destroyed, for automatic variables, this happens when the end of the + // scope is added. + for (VarDecl* D : llvm::make_range(B, E)) +- if (hasTrivialDestructor(D)) ++ if (!needsAutomaticDestruction(D)) + DeclsTrivial.push_back(D); + + if (DeclsTrivial.empty()) +@@ -2095,7 +2103,11 @@ LocalScope* CFGBuilder::addLocalScopeForDeclStmt(DeclStmt *DS, + return Scope; + } + +-bool CFGBuilder::hasTrivialDestructor(VarDecl *VD) { ++bool CFGBuilder::needsAutomaticDestruction(const VarDecl *VD) const { ++ return !hasTrivialDestructor(VD) || VD->hasAttr(); ++} ++ ++bool CFGBuilder::hasTrivialDestructor(const VarDecl *VD) const { + // Check for const references bound to temporary. Set type to pointee. + QualType QT = VD->getType(); + if (QT->isReferenceType()) { +@@ -2149,7 +2161,7 @@ LocalScope* CFGBuilder::addLocalScopeForVarDecl(VarDecl *VD, + return Scope; + + if (!BuildOpts.AddLifetime && !BuildOpts.AddScopes && +- hasTrivialDestructor(VD)) { ++ !needsAutomaticDestruction(VD)) { + assert(BuildOpts.AddImplicitDtors); + return Scope; + } +@@ -5287,6 +5299,7 @@ CFGImplicitDtor::getDestructorDecl(ASTContext &astContext) const { + case CFGElement::CXXRecordTypedCall: + case CFGElement::ScopeBegin: + case CFGElement::ScopeEnd: ++ case CFGElement::CleanupFunction: + llvm_unreachable("getDestructorDecl should only be used with " + "ImplicitDtors"); + case CFGElement::AutomaticObjectDtor: { +@@ -5830,6 +5843,11 @@ static void print_elem(raw_ostream &OS, StmtPrinterHelper &Helper, + break; + } + ++ case CFGElement::Kind::CleanupFunction: ++ OS << "CleanupFunction (" ++ << E.castAs().getFunctionDecl()->getName() << ")\n"; ++ break; ++ + case CFGElement::Kind::LifetimeEnds: + Helper.handleDecl(E.castAs().getVarDecl(), OS); + OS << " (Lifetime ends)\n"; +diff --git a/clang/lib/Analysis/PathDiagnostic.cpp b/clang/lib/Analysis/PathDiagnostic.cpp +index 348afc42319e..0cb03943c547 100644 +--- a/clang/lib/Analysis/PathDiagnostic.cpp ++++ b/clang/lib/Analysis/PathDiagnostic.cpp +@@ -567,6 +567,7 @@ getLocationForCaller(const StackFrameContext *SFC, + } + case CFGElement::ScopeBegin: + case CFGElement::ScopeEnd: ++ case CFGElement::CleanupFunction: + llvm_unreachable("not yet implemented!"); + case CFGElement::LifetimeEnds: + case CFGElement::LoopExit: +diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +index 0e2ac78f7089..d7c5bd1d4042 100644 +--- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp ++++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +@@ -993,6 +993,7 @@ void ExprEngine::processCFGElement(const CFGElement E, ExplodedNode *Pred, + ProcessLoopExit(E.castAs().getLoopStmt(), Pred); + return; + case CFGElement::LifetimeEnds: ++ case CFGElement::CleanupFunction: + case CFGElement::ScopeBegin: + case CFGElement::ScopeEnd: + return; +diff --git a/clang/test/Analysis/scopes-cfg-output.cpp b/clang/test/Analysis/scopes-cfg-output.cpp +index 6877d124e67a..4eb8967e3735 100644 +--- a/clang/test/Analysis/scopes-cfg-output.cpp ++++ b/clang/test/Analysis/scopes-cfg-output.cpp +@@ -1419,3 +1419,68 @@ label: + } + } + } ++ ++// CHECK: [B1] ++// CHECK-NEXT: 1: CFGScopeBegin(i) ++// CHECK-NEXT: 2: int i __attribute__((cleanup(cleanup_int))); ++// CHECK-NEXT: 3: CleanupFunction (cleanup_int) ++// CHECK-NEXT: 4: CFGScopeEnd(i) ++void cleanup_int(int *i); ++void test_cleanup_functions() { ++ int i __attribute__((cleanup(cleanup_int))); ++} ++ ++// CHECK: [B1] ++// CHECK-NEXT: 1: 10 ++// CHECK-NEXT: 2: i ++// CHECK-NEXT: 3: [B1.2] = [B1.1] ++// CHECK-NEXT: 4: return; ++// CHECK-NEXT: 5: CleanupFunction (cleanup_int) ++// CHECK-NEXT: 6: CFGScopeEnd(i) ++// CHECK-NEXT: Preds (1): B3 ++// CHECK-NEXT: Succs (1): B0 ++// CHECK: [B2] ++// CHECK-NEXT: 1: return; ++// CHECK-NEXT: 2: CleanupFunction (cleanup_int) ++// CHECK-NEXT: 3: CFGScopeEnd(i) ++// CHECK-NEXT: Preds (1): B3 ++// CHECK-NEXT: Succs (1): B0 ++// CHECK: [B3] ++// CHECK-NEXT: 1: CFGScopeBegin(i) ++// CHECK-NEXT: 2: int i __attribute__((cleanup(cleanup_int))); ++// CHECK-NEXT: 3: m ++// CHECK-NEXT: 4: [B3.3] (ImplicitCastExpr, LValueToRValue, int) ++// CHECK-NEXT: 5: 1 ++// CHECK-NEXT: 6: [B3.4] == [B3.5] ++// CHECK-NEXT: T: if [B3.6] ++// CHECK-NEXT: Preds (1): B4 ++// CHECK-NEXT: Succs (2): B2 B1 ++void test_cleanup_functions2(int m) { ++ int i __attribute__((cleanup(cleanup_int))); ++ ++ if (m == 1) { ++ return; ++ } ++ ++ i = 10; ++ return; ++} ++ ++// CHECK: [B1] ++// CHECK-NEXT: 1: CFGScopeBegin(f) ++// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], F) ++// CHECK-NEXT: 3: F f __attribute__((cleanup(cleanup_F))); ++// CHECK-NEXT: 4: CleanupFunction (cleanup_F) ++// CHECK-NEXT: 5: [B1.3].~F() (Implicit destructor) ++// CHECK-NEXT: 6: CFGScopeEnd(f) ++// CHECK-NEXT: Preds (1): B2 ++// CHECK-NEXT: Succs (1): B0 ++class F { ++public: ++ ~F(); ++}; ++void cleanup_F(F *f); ++ ++void test() { ++ F f __attribute((cleanup(cleanup_F))); ++} diff --git a/clang.spec b/clang.spec index 57962b7..310d740 100644 --- a/clang.spec +++ b/clang.spec @@ -55,7 +55,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -88,6 +88,11 @@ Patch4: 0001-Produce-DWARF4-by-default.patch # Workaround a bug in ORC on ppc64le. # More info is available here: https://reviews.llvm.org/D159115#4641826 Patch5: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch +# Patches for https://issues.redhat.com/browse/RHEL-1650 +# Remove in clang 18. +Patch6: cfg.patch +Patch7: tsa.patch + # RHEL specific patches # Avoid unwanted dependency on python-recommonmark @@ -641,6 +646,9 @@ false %changelog %{?llvm_snapshot_changelog_entry} +* Mon Oct 09 2023 Timm Bäder - 17.0.2-2 +- Backport upstream fixes for https://issues.redhat.com/browse/RHEL-1650 + * Wed Oct 04 2023 Tulio Magno Quites Machado Filho - 17.0.2-1 - Update to LLVM 17.0.2 diff --git a/tsa.patch b/tsa.patch new file mode 100644 index 0000000..2cf698e --- /dev/null +++ b/tsa.patch @@ -0,0 +1,124 @@ +commit cf8e189a99f988398a48148b9ea7901948665ab0 +Author: Timm Bäder +Date: Wed Sep 6 12:19:20 2023 +0200 + + [clang][TSA] Thread safety cleanup functions + + Consider cleanup functions in thread safety analysis. + + Differential Revision: https://reviews.llvm.org/D152504 + +diff --git a/clang/include/clang/Analysis/Analyses/ThreadSafetyCommon.h b/clang/include/clang/Analysis/Analyses/ThreadSafetyCommon.h +index 9d28325c1ea6..13e37ac2b56b 100644 +--- a/clang/include/clang/Analysis/Analyses/ThreadSafetyCommon.h ++++ b/clang/include/clang/Analysis/Analyses/ThreadSafetyCommon.h +@@ -361,7 +361,7 @@ public: + unsigned NumArgs = 0; + + // Function arguments +- const Expr *const *FunArgs = nullptr; ++ llvm::PointerUnion FunArgs = nullptr; + + // is Self referred to with -> or .? + bool SelfArrow = false; +diff --git a/clang/lib/Analysis/ThreadSafety.cpp b/clang/lib/Analysis/ThreadSafety.cpp +index 3107d035254d..3e6ceb7d54c4 100644 +--- a/clang/lib/Analysis/ThreadSafety.cpp ++++ b/clang/lib/Analysis/ThreadSafety.cpp +@@ -1773,7 +1773,8 @@ void BuildLockset::checkPtAccess(const Expr *Exp, AccessKind AK, + /// + /// \param Exp The call expression. + /// \param D The callee declaration. +-/// \param Self If \p Exp = nullptr, the implicit this argument. ++/// \param Self If \p Exp = nullptr, the implicit this argument or the argument ++/// of an implicitly called cleanup function. + /// \param Loc If \p Exp = nullptr, the location. + void BuildLockset::handleCall(const Expr *Exp, const NamedDecl *D, + til::LiteralPtr *Self, SourceLocation Loc) { +@@ -2417,6 +2418,15 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) { + AD.getTriggerStmt()->getEndLoc()); + break; + } ++ ++ case CFGElement::CleanupFunction: { ++ const CFGCleanupFunction &CF = BI.castAs(); ++ LocksetBuilder.handleCall(/*Exp=*/nullptr, CF.getFunctionDecl(), ++ SxBuilder.createVariable(CF.getVarDecl()), ++ CF.getVarDecl()->getLocation()); ++ break; ++ } ++ + case CFGElement::TemporaryDtor: { + auto TD = BI.castAs(); + +diff --git a/clang/lib/Analysis/ThreadSafetyCommon.cpp b/clang/lib/Analysis/ThreadSafetyCommon.cpp +index b8286cef396c..63cc66852a9e 100644 +--- a/clang/lib/Analysis/ThreadSafetyCommon.cpp ++++ b/clang/lib/Analysis/ThreadSafetyCommon.cpp +@@ -110,7 +110,8 @@ static StringRef ClassifyDiagnostic(QualType VDT) { + /// \param D The declaration to which the attribute is attached. + /// \param DeclExp An expression involving the Decl to which the attribute + /// is attached. E.g. the call to a function. +-/// \param Self S-expression to substitute for a \ref CXXThisExpr. ++/// \param Self S-expression to substitute for a \ref CXXThisExpr in a call, ++/// or argument to a cleanup function. + CapabilityExpr SExprBuilder::translateAttrExpr(const Expr *AttrExp, + const NamedDecl *D, + const Expr *DeclExp, +@@ -144,7 +145,11 @@ CapabilityExpr SExprBuilder::translateAttrExpr(const Expr *AttrExp, + + if (Self) { + assert(!Ctx.SelfArg && "Ambiguous self argument"); +- Ctx.SelfArg = Self; ++ assert(isa(D) && "Self argument requires function"); ++ if (isa(D)) ++ Ctx.SelfArg = Self; ++ else ++ Ctx.FunArgs = Self; + + // If the attribute has no arguments, then assume the argument is "this". + if (!AttrExp) +@@ -312,8 +317,14 @@ til::SExpr *SExprBuilder::translateDeclRefExpr(const DeclRefExpr *DRE, + ? (cast(D)->getCanonicalDecl() == Canonical) + : (cast(D)->getCanonicalDecl() == Canonical)) { + // Substitute call arguments for references to function parameters +- assert(I < Ctx->NumArgs); +- return translate(Ctx->FunArgs[I], Ctx->Prev); ++ if (const Expr *const *FunArgs = ++ Ctx->FunArgs.dyn_cast()) { ++ assert(I < Ctx->NumArgs); ++ return translate(FunArgs[I], Ctx->Prev); ++ } ++ ++ assert(I == 0); ++ return Ctx->FunArgs.get(); + } + } + // Map the param back to the param of the original function declaration +diff --git a/clang/test/Sema/warn-thread-safety-analysis.c b/clang/test/Sema/warn-thread-safety-analysis.c +index 355616b73d96..642ea88ec3c9 100644 +--- a/clang/test/Sema/warn-thread-safety-analysis.c ++++ b/clang/test/Sema/warn-thread-safety-analysis.c +@@ -72,6 +72,8 @@ int get_value(int *p) SHARED_LOCKS_REQUIRED(foo_.mu_){ + return *p; + } + ++void unlock_scope(struct Mutex *const *mu) __attribute__((release_capability(**mu))); ++ + int main(void) { + + Foo_fun1(1); // expected-warning{{calling function 'Foo_fun1' requires holding mutex 'mu2'}} \ +@@ -127,6 +129,13 @@ int main(void) { + // expected-note@-1{{mutex released here}} + mutex_shared_unlock(&mu1); // expected-warning {{releasing mutex 'mu1' that was not held}} + ++ /// Cleanup functions ++ { ++ struct Mutex* const __attribute__((cleanup(unlock_scope))) scope = &mu1; ++ mutex_exclusive_lock(scope); // Note that we have to lock through scope, because no alias analysis! ++ // Cleanup happens automatically -> no warning. ++ } ++ + return 0; + } + From 469438de557368d4ec0910d82601dc65cc6f4e1c Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Tue, 17 Oct 2023 21:41:46 -0300 Subject: [PATCH 76/77] Update to LLVM 17.0.3 --- clang.spec | 7 +++++-- sources | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/clang.spec b/clang.spec index 310d740..9dd60c7 100644 --- a/clang.spec +++ b/clang.spec @@ -15,7 +15,7 @@ %global maj_ver 17 %global min_ver 0 -%global patch_ver 2 +%global patch_ver 3 #global rc_ver 4 %if %{with snapshot_build} @@ -55,7 +55,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}} -Release: 2%{?dist} +Release: 1%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -646,6 +646,9 @@ false %changelog %{?llvm_snapshot_changelog_entry} +* Tue Oct 17 2023 Tulio Magno Quites Machado Filho - 17.0.3-1 +- Update to LLVM 17.0.3 + * Mon Oct 09 2023 Timm Bäder - 17.0.2-2 - Backport upstream fixes for https://issues.redhat.com/browse/RHEL-1650 diff --git a/sources b/sources index 420d6c8..69b4522 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-17.0.2.src.tar.xz) = d86933c0e5c441088596feba47d4834b299e09594c30192e653c80debf2a8807665e2bf29c51bc2eb9e014326a8e811ade654f73df4fca9a0ffa88b647e35f2b -SHA512 (clang-tools-extra-17.0.2.src.tar.xz) = 40126831ae1ea492afe98603d86ed8df4a735734eb2cf0b9e650b56d78ef525492ed3c924003561564f308586ff0cd53b956164cf795f66fe26434b24b9fb608 -SHA512 (clang-tools-extra-17.0.2.src.tar.xz.sig) = 9ffa1f2a233a5a88f5c408a0ce6b9cb8df406b71a9e3a9b54c618ac353ef221fe34dfc663367806fdd8eb766aab94b0a3a1660320098a420439e2112d58cca10 -SHA512 (clang-17.0.2.src.tar.xz.sig) = 10eab520241c7c943814377326e90e78832c254c25b42411f338406e62c2c2d1a7780e14be7840d31d09cef3eddc82ac59c482b81d2e4cf240a09aa706d89494 +SHA512 (clang-17.0.3.src.tar.xz) = b2705a57b5992f2891fcd62167b1962355234a12de3d39f33df2d58ac1f74b613ff96d1578e9ee819a72fbb2df15f9c7b9a677419901f6a5159945dae0f9abf4 +SHA512 (clang-tools-extra-17.0.3.src.tar.xz) = 86e9ea6f287a90411fe71cafa0098777916f0e57dada2d505f5f33195c1d8184d250af3af0d15eaa98ccb7ba858466d85f8569c742076a389cca1b91b9c61930 +SHA512 (clang-tools-extra-17.0.3.src.tar.xz.sig) = 635d0a2849086d54a13a9cb60936824d41c8182a8ef918a0a7e76f1110c5fa12d940b814d69102fe2952a5f9232f73574974e8a76c33f6a2ce7108d30246e95c +SHA512 (clang-17.0.3.src.tar.xz.sig) = f69312bdbeaa140cb2783585a3bdfe0c5c735b7c3324bdeaba5e3e98a85ed1d8e320c4ed57c8fdc03e1dc156388581c6a302c1db75350f06385b293abbfbd160 From 2e43f864a5fe9b7f832a6babf14b92a080ab79df Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Wed, 1 Nov 2023 13:57:41 -0300 Subject: [PATCH 77/77] Update to LLVM 17.0.4 --- clang.spec | 5 ++++- sources | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/clang.spec b/clang.spec index 9dd60c7..ce1cad7 100644 --- a/clang.spec +++ b/clang.spec @@ -15,7 +15,7 @@ %global maj_ver 17 %global min_ver 0 -%global patch_ver 3 +%global patch_ver 4 #global rc_ver 4 %if %{with snapshot_build} @@ -646,6 +646,9 @@ false %changelog %{?llvm_snapshot_changelog_entry} +* Wed Nov 01 2023 Tulio Magno Quites Machado Filho - 17.0.4-1 +- Update to LLVM 17.0.4 + * Tue Oct 17 2023 Tulio Magno Quites Machado Filho - 17.0.3-1 - Update to LLVM 17.0.3 diff --git a/sources b/sources index 69b4522..7407684 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-17.0.3.src.tar.xz) = b2705a57b5992f2891fcd62167b1962355234a12de3d39f33df2d58ac1f74b613ff96d1578e9ee819a72fbb2df15f9c7b9a677419901f6a5159945dae0f9abf4 -SHA512 (clang-tools-extra-17.0.3.src.tar.xz) = 86e9ea6f287a90411fe71cafa0098777916f0e57dada2d505f5f33195c1d8184d250af3af0d15eaa98ccb7ba858466d85f8569c742076a389cca1b91b9c61930 -SHA512 (clang-tools-extra-17.0.3.src.tar.xz.sig) = 635d0a2849086d54a13a9cb60936824d41c8182a8ef918a0a7e76f1110c5fa12d940b814d69102fe2952a5f9232f73574974e8a76c33f6a2ce7108d30246e95c -SHA512 (clang-17.0.3.src.tar.xz.sig) = f69312bdbeaa140cb2783585a3bdfe0c5c735b7c3324bdeaba5e3e98a85ed1d8e320c4ed57c8fdc03e1dc156388581c6a302c1db75350f06385b293abbfbd160 +SHA512 (clang-17.0.4.src.tar.xz) = b014170e46660229733718244a85ba46f7b5c205d33640fd1ffdbe5256d356684c98d810767b6615895f6471ced0118415ea552464ec24ad5915fbf3b9cb6438 +SHA512 (clang-tools-extra-17.0.4.src.tar.xz) = 5cd8cf96768cb44306ecf8c2ea31373e173b4f0781aeac16d463da8862a56d1fa771d20bddda56af938c102c2b0b56f3584d37c238d6d32a891dd8a24fe65471 +SHA512 (clang-tools-extra-17.0.4.src.tar.xz.sig) = fde7e4a7df9070d4601013fcb35b6c4c67995a58d954f9174863a2ca8c5c361f81ae7f8cc4b3b6ef986109aac7bafcb16ca407706432b7716d1b9c9e96affe4d +SHA512 (clang-17.0.4.src.tar.xz.sig) = 7557977208ffcf3a148d40e3e8c441c99c2c38a12f3ba7c6c7faf4d14e469f598f562c89d83b33808d34ae7c539212443dbcd8b0ed7a795a1bb2aa8963c7501d