|
|
|
@ -1,10 +1,14 @@
|
|
|
|
|
# We are building with clang for faster/lower memory LTO builds.
|
|
|
|
|
# See https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_macros
|
|
|
|
|
%global toolchain clang
|
|
|
|
|
|
|
|
|
|
%bcond_with compat_build
|
|
|
|
|
%bcond_with bundle_compat_lib
|
|
|
|
|
%bcond_without check
|
|
|
|
|
|
|
|
|
|
%global maj_ver 14
|
|
|
|
|
%global maj_ver 15
|
|
|
|
|
%global min_ver 0
|
|
|
|
|
%global patch_ver 6
|
|
|
|
|
%global patch_ver 7
|
|
|
|
|
%global clang_version %{maj_ver}.%{min_ver}.%{patch_ver}
|
|
|
|
|
|
|
|
|
|
%if %{with compat_build}
|
|
|
|
@ -26,62 +30,64 @@
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with bundle_compat_lib}
|
|
|
|
|
%global compat_maj_ver 13
|
|
|
|
|
%global compat_ver %{compat_maj_ver}.0.1
|
|
|
|
|
%global compat_maj_ver 14
|
|
|
|
|
%global compat_ver %{compat_maj_ver}.0.6
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%ifarch ppc64le aarch64
|
|
|
|
|
# Too many threads on ppc64 systems causes OOM errors.
|
|
|
|
|
# Too many threads on ppc64 and aarch64 systems causes OOM errors.
|
|
|
|
|
%global _smp_mflags -j8
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%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: 4%{?dist}
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Summary: A C language family front-end for LLVM
|
|
|
|
|
|
|
|
|
|
License: 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
|
|
|
|
|
Source1: 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}
|
|
|
|
|
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
|
|
|
|
|
Source3: 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 %{with bundle_compat_lib}
|
|
|
|
|
Source5: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/clang-%{compat_ver}.src.tar.xz
|
|
|
|
|
Source6: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/llvm-%{compat_ver}.src.tar.xz
|
|
|
|
|
Source5: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/clang-%{compat_ver}.src.tar.xz
|
|
|
|
|
Source6: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/clang-%{compat_ver}.src.tar.xz.sig
|
|
|
|
|
Source7: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/llvm-%{compat_ver}.src.tar.xz
|
|
|
|
|
Source8: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/llvm-%{compat_ver}.src.tar.xz.sig
|
|
|
|
|
Source9: tstellar-gpg-key.asc
|
|
|
|
|
%endif
|
|
|
|
|
%if !0%{with compat_build}
|
|
|
|
|
Source7: macros.%{name}
|
|
|
|
|
Source10: 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
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
Patch2: 0002-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch
|
|
|
|
|
# TODO: Can be dropped in LLVM 16: https://reviews.llvm.org/D133316
|
|
|
|
|
Patch3: 0003-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch
|
|
|
|
|
Patch4: 0004-Reorganize-gtest-integration.patch
|
|
|
|
|
# This patch can be dropped once gcc-12.0.1-0.5.fc36 is in the repo.
|
|
|
|
|
Patch5: 0001-Work-around-gcc-miscompile.patch
|
|
|
|
|
Patch7: 0010-PATCH-clang-Produce-DWARF4-by-default.patch
|
|
|
|
|
Patch8: disable-recommonmark.patch
|
|
|
|
|
Patch9: 0001-clang-Enforce-instantiation-of-constexpr-template-fu.patch
|
|
|
|
|
Patch5: 0005-Work-around-gcc-miscompile.patch
|
|
|
|
|
Patch6: 0006-Don-t-install-static-libraries.patch
|
|
|
|
|
Patch7: 0007-Make-funwind-tables-the-default-on-all-archs.patch
|
|
|
|
|
Patch8: 0008-Produce-DWARF4-by-default.patch
|
|
|
|
|
Patch9: 0009-disable-recommonmark.patch
|
|
|
|
|
# TODO: Can be dropped in LLVM 16: https://reviews.llvm.org/D134362
|
|
|
|
|
Patch10: 0010-clang-Fix-interaction-between-asm-labels-and-inline-.patch
|
|
|
|
|
|
|
|
|
|
%if %{without compat_build}
|
|
|
|
|
# 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
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# RHEL only: We build LLVM with clang, which now defaults to using the
|
|
|
|
|
# libstdc++ from gcc-toolset-12. Since we're linking some clang
|
|
|
|
@ -90,6 +96,8 @@ Patch202: remove-test.patch
|
|
|
|
|
# to compile clang.
|
|
|
|
|
BuildRequires: gcc-toolset-12-gcc-c++
|
|
|
|
|
BuildRequires: gcc-toolset-12-annobin-plugin-gcc
|
|
|
|
|
BuildRequires: gcc-toolset-12-libatomic-devel
|
|
|
|
|
BuildRequires: clang
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
|
BuildRequires: ninja-build
|
|
|
|
|
%if %{with compat_build}
|
|
|
|
@ -120,12 +128,14 @@ BuildRequires: libatomic
|
|
|
|
|
# We need python3-devel for %%py3_shebang_fix
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
|
|
|
|
|
%if %{without compat_build}
|
|
|
|
|
# For reproducible pyc file generation
|
|
|
|
|
# See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#_byte_compilation_reproducibility
|
|
|
|
|
%if 0%{?fedora}
|
|
|
|
|
BuildRequires: /usr/bin/marshalparser
|
|
|
|
|
%global py_reproducible_pyc_path %{buildroot}%{python3_sitelib}
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Needed for %%multilib_fix_c_header
|
|
|
|
|
BuildRequires: multilib-rpm-config
|
|
|
|
@ -178,6 +188,8 @@ Summary: Runtime library for clang
|
|
|
|
|
Requires: %{name}-resource-filesystem%{?_isa} = %{version}
|
|
|
|
|
Requires: gcc-toolset-12-gcc-c++
|
|
|
|
|
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}
|
|
|
|
@ -193,11 +205,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
|
|
|
|
@ -231,6 +243,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.
|
|
|
|
@ -246,7 +265,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}.
|
|
|
|
@ -256,29 +275,27 @@ Requires: python3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE3}' --data='%{SOURCE0}'
|
|
|
|
|
%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
|
|
|
|
|
|
|
|
|
%if %{with bundle_compat_lib}
|
|
|
|
|
%{gpgverify} --keyring='%{SOURCE9}' --signature='%{SOURCE6}' --data='%{SOURCE5}'
|
|
|
|
|
%{gpgverify} --keyring='%{SOURCE9}' --signature='%{SOURCE8}' --data='%{SOURCE7}'
|
|
|
|
|
|
|
|
|
|
%setup -T -q -b 5 -n clang-%{compat_ver}.src
|
|
|
|
|
%setup -T -q -b 6 -n llvm-%{compat_ver}.src
|
|
|
|
|
%setup -T -q -b 7 -n llvm-%{compat_ver}.src
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with compat_build}
|
|
|
|
|
%autosetup -n %{clang_srcdir} -p2
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
|
|
%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE2}' --data='%{SOURCE1}'
|
|
|
|
|
%setup -T -q -b 1 -n %{clang_tools_srcdir}
|
|
|
|
|
%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE3}' --data='%{SOURCE2}'
|
|
|
|
|
%setup -T -q -b 2 -n %{clang_tools_srcdir}
|
|
|
|
|
%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/ \
|
|
|
|
@ -302,16 +319,7 @@ 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.
|
|
|
|
|
%define _lto_cflags %{nil}
|
|
|
|
|
|
|
|
|
|
%if 0%{?__isa_bits} == 64
|
|
|
|
@ -320,14 +328,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
|
|
|
|
|
|
|
|
|
|
%set_build_flags
|
|
|
|
|
CXXFLAGS="$CXXFLAGS -Wno-address -Wno-nonnull -Wno-maybe-uninitialized"
|
|
|
|
|
CFLAGS="$CFLAGS -Wno-address -Wno-nonnull -Wno-maybe-uninitialized"
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with bundle_compat_lib}
|
|
|
|
|
|
|
|
|
@ -341,10 +351,12 @@ mv ../clang-%{compat_ver}.src ../clang
|
|
|
|
|
%cmake -S ../llvm-%{compat_ver}.src -B ../clang-compat-libs -G Ninja \
|
|
|
|
|
-DLLVM_ENABLE_PROJECTS=clang \
|
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
|
-DBUILD_SHARED_LIBS=OFF \
|
|
|
|
|
-DBUILD_SHARED_LIBS:BOOL=OFF \
|
|
|
|
|
-DLLVM_ENABLE_EH=ON \
|
|
|
|
|
-DLLVM_ENABLE_RTTI=ON \
|
|
|
|
|
-DCMAKE_SKIP_RPATH:BOOL=ON
|
|
|
|
|
-DLLVM_ENABLE_RTTI:BOOL=ON \
|
|
|
|
|
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
|
|
|
|
-DLLVM_TARGETS_TO_BUILD=%{targets_to_build} \
|
|
|
|
|
-DLLVM_INCLUDE_BENCHMARKS=OFF
|
|
|
|
|
|
|
|
|
|
%ninja_build -C ../clang-compat-libs libclang.so
|
|
|
|
|
%ninja_build -C ../clang-compat-libs libclang-cpp.so
|
|
|
|
@ -352,11 +364,13 @@ mv ../clang-%{compat_ver}.src ../clang
|
|
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# -DLLVM_ENABLE_NEW_PASS_MANAGER=ON can be removed once this patch is committed:
|
|
|
|
|
# https://reviews.llvm.org/D107628
|
|
|
|
|
# We set CLANG_DEFAULT_PIE_ON_LINUX=OFF to match the default used by Fedora's GCC.
|
|
|
|
|
# See https://bugzilla.redhat.com/show_bug.cgi?id=2134146
|
|
|
|
|
%cmake -G Ninja \
|
|
|
|
|
-DCMAKE_C_COMPILER=/opt/rh/gcc-toolset-12/root/usr/bin/gcc \
|
|
|
|
|
-DCMAKE_CXX_COMPILER=/opt/rh/gcc-toolset-12/root/usr/bin/g++ \
|
|
|
|
|
%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 \
|
|
|
|
@ -373,6 +387,7 @@ mv ../clang-%{compat_ver}.src ../clang
|
|
|
|
|
-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_LIT_ARGS="-vv" \
|
|
|
|
@ -397,10 +412,8 @@ mv ../clang-%{compat_ver}.src ../clang
|
|
|
|
|
-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}} \
|
|
|
|
|
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
|
|
|
|
|
\
|
|
|
|
|
-DCLANG_BUILD_EXAMPLES:BOOL=OFF \
|
|
|
|
@ -410,7 +423,8 @@ mv ../clang-%{compat_ver}.src ../clang
|
|
|
|
|
-DCLANG_DEFAULT_LINKER=lld \
|
|
|
|
|
%endif
|
|
|
|
|
-DCLANG_DEFAULT_UNWINDLIB=libgcc \
|
|
|
|
|
-DGCC_INSTALL_PREFIX=/opt/rh/gcc-toolset-12/root/usr
|
|
|
|
|
-DGCC_INSTALL_PREFIX=/opt/rh/gcc-toolset-12/root/usr \
|
|
|
|
|
-DLLVM_INCLUDE_BENCHMARKS=OFF
|
|
|
|
|
|
|
|
|
|
%cmake_build
|
|
|
|
|
|
|
|
|
@ -437,7 +451,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 %{SOURCE10} %{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}|" \
|
|
|
|
@ -504,9 +518,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
|
|
|
|
@ -518,6 +529,18 @@ sed -i -e "s/'ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH'/'ASAN_SYMBOLIZER_PAT
|
|
|
|
|
|
|
|
|
|
%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
|
|
|
|
|
|
|
|
|
|
%if %{with bundle_compat_lib}
|
|
|
|
|
# Move the compat -cpp.so out of the way so it's not picked up
|
|
|
|
|
# by the LD_LIBRARY_PATH below.
|
|
|
|
|
compat_lib=$(find %{buildroot}%{_libdir} -name libclang-cpp.so.%{compat_maj_ver})
|
|
|
|
|
mv "$compat_lib" .
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# requires lit.py from LLVM utilities
|
|
|
|
|
# FIXME: Fix failing ARM tests
|
|
|
|
|
SOURCE_DATA_EPOCH=1629181597 LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} check-all -C %{__cmake_builddir} || \
|
|
|
|
@ -526,6 +549,11 @@ SOURCE_DATA_EPOCH=1629181597 LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja}
|
|
|
|
|
%else
|
|
|
|
|
false
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with bundle_compat_lib}
|
|
|
|
|
mv ./libclang-cpp.so.%{compat_maj_ver} "$compat_lib"
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
@ -547,11 +575,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
|
|
|
|
|
%if %{with bundle_compat_lib}
|
|
|
|
|
%{_libdir}/libclang.so.%{compat_maj_ver}*
|
|
|
|
@ -564,6 +592,7 @@ false
|
|
|
|
|
%{_includedir}/clang/
|
|
|
|
|
%{_includedir}/clang-c/
|
|
|
|
|
%{_libdir}/cmake/*
|
|
|
|
|
%{_bindir}/clang-tblgen
|
|
|
|
|
%dir %{_datadir}/clang/
|
|
|
|
|
%{_rpmmacrodir}/macros.%{name}
|
|
|
|
|
%else
|
|
|
|
@ -574,6 +603,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/
|
|
|
|
@ -612,9 +642,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
|
|
|
|
@ -642,6 +674,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
|
|
|
|
|
|
|
|
|
@ -651,15 +686,17 @@ false
|
|
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue Dec 13 2022 Konrad Kleine <kkleine@redat.com> - 14.0.6-4
|
|
|
|
|
- Bump release version
|
|
|
|
|
* Mon Jan 16 2023 Konrad Kleine <kkleine@redhat.com> - 15.0.7-2
|
|
|
|
|
- Update to 15.0.7
|
|
|
|
|
|
|
|
|
|
* Thu Dec 08 2022 Konrad Kleine<kkleine@redhat.com> - 15.0.6-1
|
|
|
|
|
- Update to 15.0.6
|
|
|
|
|
|
|
|
|
|
* Fri Dec 09 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.6-3
|
|
|
|
|
- Print executed tests
|
|
|
|
|
* Mon Oct 17 2022 Nikita Popov <npopov@redhat.com> - 15.0.1-2
|
|
|
|
|
- Default to non-pie, fix rhbz#2134146
|
|
|
|
|
|
|
|
|
|
* Tue Dec 06 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.6-2
|
|
|
|
|
- Fix upstream bug llvm#55560
|
|
|
|
|
- https://bugzilla.redhat.com/show_bug.cgi?id=2150854
|
|
|
|
|
* Mon Sep 26 2022 Konrad Kleine <kkleine@redhat.com> - 15.0.1-1
|
|
|
|
|
- Update to 15.0.1
|
|
|
|
|
|
|
|
|
|
* Tue Jul 19 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.6-1
|
|
|
|
|
- Update to 14.0.6
|
|
|
|
|