Import rpm: 803c1c0a6c7c832d43c72eb5af0f6f7623000adc

This commit is contained in:
James Antill 2023-02-23 12:51:51 -05:00
parent 69220caf95
commit 6105a0e6aa
7 changed files with 154 additions and 62 deletions

6
.gitignore vendored
View File

@ -1,3 +1,3 @@
SOURCES/clang-14.0.0.src.tar.xz SOURCES/clang-15.0.7.src.tar.xz
SOURCES/clang-tools-extra-14.0.0.src.tar.xz SOURCES/clang-tools-extra-15.0.7.src.tar.xz
SOURCES/tstellar-gpg-key.asc SOURCES/release-keys.asc

View File

@ -0,0 +1,82 @@
From 581300e447602b9b7a505b0f07e8461d58d041ca Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
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

View File

@ -1,7 +1,7 @@
From 6509777d4c12a42c7487814d868375a86712bf5b Mon Sep 17 00:00:00 2001 From 1f68d73910ddee1beaf3582480b8a9738c941a43 Mon Sep 17 00:00:00 2001
From: Konrad Kleine <kkleine@redhat.com> From: Konrad Kleine <kkleine@redhat.com>
Date: Thu, 24 Mar 2022 09:44:21 +0100 Date: Thu, 24 Mar 2022 09:44:21 +0100
Subject: [PATCH][clang]Produce DWARF4 by default Subject: [PATCH] Produce DWARF4 by default
Have a look at the following commit to see when the move from DWARF 4 to 5 first happened upstream: Have a look at the following commit to see when the move from DWARF 4 to 5 first happened upstream:
@ -10,15 +10,16 @@ https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8
clang/include/clang/Driver/ToolChain.h | 2 +- clang/include/clang/Driver/ToolChain.h | 2 +-
clang/test/CodeGen/dwarf-version.c | 4 ++-- clang/test/CodeGen/dwarf-version.c | 4 ++--
clang/test/Driver/cl-options.c | 2 +- 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.c | 2 +-
clang/test/Driver/ve-toolchain.cpp | 2 +- clang/test/Driver/ve-toolchain.cpp | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-) 6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/clang/include/clang/Driver/ToolChain.h b/clang/include/clang/Driver/ToolChain.h diff --git a/clang/include/clang/Driver/ToolChain.h b/clang/include/clang/Driver/ToolChain.h
index adf1753e8d3a..c8adc4d917ce 100644 index f20ab164531b..53c86ee82936 100644
--- a/clang/include/clang/Driver/ToolChain.h --- a/clang/include/clang/Driver/ToolChain.h
+++ b/clang/include/clang/Driver/ToolChain.h +++ b/clang/include/clang/Driver/ToolChain.h
@@ -515,7 +515,7 @@ public: @@ -535,7 +535,7 @@ public:
// Return the DWARF version to emit, in the absence of arguments // Return the DWARF version to emit, in the absence of arguments
// to the contrary. // to the contrary.
@ -43,10 +44,10 @@ index 0a6fa4768026..96f01749d0d8 100644
// The -isysroot is used as a hack to avoid LIT messing with the SDKROOT // The -isysroot is used as a hack to avoid LIT messing with the SDKROOT
// environment variable which indirecty overrides the version in the target // environment variable which indirecty overrides the version in the target
diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c
index f332cd83b26e..911779fffbef 100644 index a2e350a0a835..01889ba0bf9b 100644
--- a/clang/test/Driver/cl-options.c --- a/clang/test/Driver/cl-options.c
+++ b/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c
@@ -597,7 +597,7 @@ @@ -570,7 +570,7 @@
// RUN: %clang_cl /Z7 -gdwarf /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s // RUN: %clang_cl /Z7 -gdwarf /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s
// Z7_gdwarf: "-gcodeview" // Z7_gdwarf: "-gcodeview"
// Z7_gdwarf: "-debug-info-kind=constructor" // Z7_gdwarf: "-debug-info-kind=constructor"
@ -55,35 +56,10 @@ index f332cd83b26e..911779fffbef 100644
// RUN: %clang_cl -fmsc-version=1800 -TP -### -- %s 2>&1 | FileCheck -check-prefix=CXX11 %s // RUN: %clang_cl -fmsc-version=1800 -TP -### -- %s 2>&1 | FileCheck -check-prefix=CXX11 %s
// CXX11: -std=c++11 // CXX11: -std=c++11
diff --git a/clang/test/Driver/ve-toolchain.c b/clang/test/Driver/ve-toolchain.c diff --git a/clang/test/Driver/clang-g-opts.c b/clang/test/Driver/clang-g-opts.c
index 753dee19fcbf..dfd12cc0bba4 100644 index d982b1070cae..bb129e75769c 100644
--- a/clang/test/Driver/ve-toolchain.c --- a/clang/test/Driver/clang-g-opts.c
+++ b/clang/test/Driver/ve-toolchain.c +++ b/clang/test/Driver/clang-g-opts.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 4b2b9c5747fe..3a196dd94ca1 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
diff -ruN clang-14.0.0.src.orig/test/Driver/clang-g-opts.c clang-14.0.0.src/test/Driver/clang-g-opts.c
--- a/clang-14.0.0.src.orig/test/Driver/clang-g-opts.c 2022-03-14 10:44:55.000000000 +0100
+++ b/clang-14.0.0.src/test/Driver/clang-g-opts.c 2022-04-13 06:36:55.832253890 +0200
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
// CHECK-WITHOUT-G-NOT: -debug-info-kind // CHECK-WITHOUT-G-NOT: -debug-info-kind
@ -93,6 +69,32 @@ diff -ruN clang-14.0.0.src.orig/test/Driver/clang-g-opts.c clang-14.0.0.src/test
// CHECK-WITH-G-DWARF2: "-dwarf-version=2" // CHECK-WITH-G-DWARF2: "-dwarf-version=2"
// CHECK-WITH-G-STANDALONE: "-debug-info-kind=standalone" // CHECK-WITH-G-STANDALONE: "-debug-info-kind=standalone"
-- diff --git a/clang/test/Driver/ve-toolchain.c b/clang/test/Driver/ve-toolchain.c
2.35.1 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

BIN
clang-15.0.7.src.tar.xz.sig Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,9 +1,9 @@
%bcond_with compat_build %bcond_with compat_build
%bcond_without check %bcond_without check
%global maj_ver 14 %global maj_ver 15
%global min_ver 0 %global min_ver 0
%global patch_ver 0 %global patch_ver 7
#global rc_ver 4 #global rc_ver 4
%global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver}
@ -52,7 +52,7 @@ 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 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 Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz.sig
%endif %endif
Source4: tstellar-gpg-key.asc Source4: release-keys.asc
%if !0%{?compat_build} %if !0%{?compat_build}
Source5: macros.%{name} Source5: macros.%{name}
%endif %endif
@ -65,17 +65,13 @@ 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 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. # This patch can be dropped once gcc-12.0.1-0.5.fc36 is in the repo.
Patch5: 0001-Work-around-gcc-miscompile.patch Patch5: 0001-Work-around-gcc-miscompile.patch
# https://github.com/llvm/llvm-project/commit/fed96f31bb5b68f77dd617ee8e698dd8171ee71b
Patch6: m-branch-protection.patch
Patch7: 0010-PATCH-clang-Produce-DWARF4-by-default.patch Patch7: 0010-PATCH-clang-Produce-DWARF4-by-default.patch
Patch8: disable-recommonmark.patch Patch8: disable-recommonmark.patch
# Patches for clang-tools-extra # Patches for clang-tools-extra
%if %{without compat_build} %if %{without compat_build}
Patch201: clangd-tests.patch Patch201: 0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch
Patch202: llvm-hello.patch
Patch203: remove-test.patch
%endif %endif
BuildRequires: gcc BuildRequires: gcc
@ -168,7 +164,7 @@ libomp-devel to enable -fopenmp.
Summary: Runtime library for clang Summary: Runtime library for clang
Requires: %{name}-resource-filesystem%{?_isa} = %{version} Requires: %{name}-resource-filesystem%{?_isa} = %{version}
# RHEL specific: Use libstdc++ from gcc12 by default. rhbz#2064507 # RHEL specific: Use libstdc++ from gcc12 by default. rhbz#2064507
Requires: gcc-toolset-11-gcc-c++ Requires: gcc-toolset-12-gcc-c++
Recommends: compiler-rt%{?_isa} = %{version} Recommends: compiler-rt%{?_isa} = %{version}
# libomp-devel is required, so clang can find the omp.h header when compiling # libomp-devel is required, so clang can find the omp.h header when compiling
# with -fopenmp. # with -fopenmp.
@ -258,14 +254,8 @@ Requires: python3
%setup -T -q -b 1 -n %{clang_tools_srcdir} %setup -T -q -b 1 -n %{clang_tools_srcdir}
%autopatch -m200 -p2 %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 # 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 \ %py3_shebang_fix \
clang-tidy/tool/run-clang-tidy.py \ clang-tidy/tool/run-clang-tidy.py \
@ -329,7 +319,9 @@ CFLAGS="$CFLAGS -Wno-address -Wno-nonnull -Wno-maybe-uninitialized"
# -DLLVM_ENABLE_NEW_PASS_MANAGER=ON can be removed once this patch is committed: # -DLLVM_ENABLE_NEW_PASS_MANAGER=ON can be removed once this patch is committed:
# https://reviews.llvm.org/D107628 # https://reviews.llvm.org/D107628
# We set CLANG_DEFAULT_PIE_ON_LINUX=OFF to match the default used by Fedora's GCC.
%cmake .. -G Ninja \ %cmake .. -G Ninja \
-DCLANG_DEFAULT_PIE_ON_LINUX=OFF \
-DLLVM_PARALLEL_LINK_JOBS=1 \ -DLLVM_PARALLEL_LINK_JOBS=1 \
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
@ -381,7 +373,8 @@ CFLAGS="$CFLAGS -Wno-address -Wno-nonnull -Wno-maybe-uninitialized"
%ifarch %{arm} %ifarch %{arm}
-DCLANG_DEFAULT_LINKER=lld \ -DCLANG_DEFAULT_LINKER=lld \
%endif %endif
-DCLANG_DEFAULT_UNWINDLIB=libgcc -DCLANG_DEFAULT_UNWINDLIB=libgcc \
-DGCC_INSTALL_PREFIX=/opt/rh/gcc-toolset-12/root/usr
%cmake_build %cmake_build
@ -485,7 +478,7 @@ ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format
%if %{with check} %if %{with check}
# requires lit.py from LLVM utilities # requires lit.py from LLVM utilities
# FIXME: Fix failing ARM tests # FIXME: Fix failing ARM tests
LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} check-all -C %{_vpath_builddir} || \ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} %{_smp_mflags} check-all -C %{_vpath_builddir} || \
%ifarch %{arm} %ifarch %{arm}
: :
%else %else
@ -573,9 +566,11 @@ false
%{_bindir}/clang-include-fixer %{_bindir}/clang-include-fixer
%{_bindir}/clang-move %{_bindir}/clang-move
%{_bindir}/clang-offload-bundler %{_bindir}/clang-offload-bundler
%{_bindir}/clang-offload-packager
%{_bindir}/clang-offload-wrapper %{_bindir}/clang-offload-wrapper
%{_bindir}/clang-linker-wrapper %{_bindir}/clang-linker-wrapper
%{_bindir}/clang-nvlink-wrapper %{_bindir}/clang-nvlink-wrapper
%{_bindir}/clang-pseudo
%{_bindir}/clang-query %{_bindir}/clang-query
%{_bindir}/clang-refactor %{_bindir}/clang-refactor
%{_bindir}/clang-rename %{_bindir}/clang-rename
@ -612,6 +607,19 @@ false
%endif %endif
%changelog %changelog
* Thu Jan 19 2023 Tom Stellard <tstellar@redhat.com> - 15.0.7-1
- Update to LLVM 15.0.7
* Tue Sep 06 2022 Nikita Popov <npopov@redhat.com> - 15.0.0-1
- Update to LLVM 15.0.0
* Tue Jun 28 2022 Tom Stellard <tstellar@redhat.com> - 14.0.6-1
- 14.0.6 Release
* Wed Jun 01 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.0-2
- Increate gcc-toolset dependency to 12
- Set GCC_INSTALL_PREFIX variable
* Thu Apr 07 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.0-1 * Thu Apr 07 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.0-1
- Update to 14.0.0 - Update to 14.0.0

View File

@ -1,3 +1,3 @@
SHA512 (clang-14.0.0.src.tar.xz) = 26e701c0c24eefee1f0c1651cba7d16dca9a463e4d41c8bbc33d7b93a68c3dac0aeef6846d836eddc07afafa8116b81c95737223296f336897f2b75e1b3895f1 SHA1 (clang-15.0.7.src.tar.xz) = 7b4d1188cce1ce4ea1cf2ea362fba685c4aca34d
SHA512 (clang-tools-extra-14.0.0.src.tar.xz) = fdf06a46a4c3d689076b41fcc0c42eedbe95924b1611a8f8fe693e4ac1013274cdea97482b48659172f133ed51607a9e979d9d717df4082b50b0c176be2515e5 SHA1 (clang-tools-extra-15.0.7.src.tar.xz) = 752fe847136eff2dfbfcc8bbddfaa9319532d104
SHA512 (tstellar-gpg-key.asc) = a6720905008fab485d24263c4a65b0b379636a2dfa38e14bbcd2cc9a48afb9f66afe179f5f455c49902512ddb76517afd456a2c02d942fec1a2d764142834f4d SHA1 (release-keys.asc) = 347bdd5ee6d6b93c9644c268511815912c0fb2dc