import llvm-15.0.7-1.module+el8.8.0+17939+b58878af

This commit is contained in:
CentOS Sources 2023-05-16 06:10:47 +00:00 committed by Stepan Oksanichenko
parent 379eb95ac2
commit c143e4f101
7 changed files with 111 additions and 62 deletions

5
.gitignore vendored
View File

@ -1,2 +1,3 @@
SOURCES/llvm-14.0.6.src.tar.xz
SOURCES/tstellar-gpg-key.asc
SOURCES/cmake-15.0.7.src.tar.xz
SOURCES/llvm-15.0.7.src.tar.xz
SOURCES/release-keys.asc

View File

@ -1,2 +1,3 @@
975020d4f7164d84a89f0f9b2153dd870d06e02d SOURCES/llvm-14.0.6.src.tar.xz
b8d2648a01d36ed0186fd2c5af325fd28797f9a0 SOURCES/tstellar-gpg-key.asc
8f06060871953422820098346da9a3b63b90120d SOURCES/cmake-15.0.7.src.tar.xz
497ca3b2010cc0e3e38bc9dc6dda19041dbd7066 SOURCES/llvm-15.0.7.src.tar.xz
347bdd5ee6d6b93c9644c268511815912c0fb2dc SOURCES/release-keys.asc

View File

@ -1,6 +1,6 @@
From 9320ffeda3915c8f7be744c983a3470a89107bd7 Mon Sep 17 00:00:00 2001
From 01529ba2c76be37e41713cf7f3eca8b61833e320 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Tue, 14 Sep 2021 20:21:20 -0700
Date: Tue, 9 Nov 2021 15:05:07 +0100
Subject: [PATCH] XFAIL missing-abstract-variable.ll test on ppc64le
It's seems the strategy with this test is to XFAIL it on all
@ -16,18 +16,18 @@ Differential Revision: https://reviews.llvm.org/D109806
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll b/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll
index bd0de60268b6..cc5d56b0c512 100644
index 8f8d404..07a8778 100644
--- a/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll
+++ b/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll
@@ -4,7 +4,7 @@
; powerpc64 (and on x86_64 at at least -O2). Presumably this is a SelectionDAG
; issue.
; FIXME: arm64 is an alias for aarch64 on macs, apparently?
-; XFAIL: powerpc64, aarch64, arm64, hexagon, riscv
+; XFAIL: powerpc64, aarch64, arm64, hexagon, riscv, ppc64le
-; XFAIL: powerpc64, aarch64, arm64, hexagon, riscv, sparc
+; XFAIL: powerpc64, aarch64, arm64, hexagon, riscv, sparc, ppc64le
; Build from the following source with clang -O2.
--
2.31.1
1.8.3.1

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -13,16 +13,12 @@
%bcond_with compat_build
%bcond_without check
%global llvm_libdir %{_libdir}/%{name}
%global build_llvm_libdir %{buildroot}%{llvm_libdir}
#global rc_ver 4
%global maj_ver 14
#global rc_ver 3
%global maj_ver 15
%global min_ver 0
%global patch_ver 6
%if !%{maj_ver} && 0%{?rc_ver}
%global abi_revision 2
%endif
%global patch_ver 7
%global llvm_srcdir llvm-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
%global cmake_srcdir cmake-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
%if %{with compat_build}
%global pkg_name llvm%{maj_ver}
@ -44,35 +40,55 @@
%global exec_suffix %{nil}
%endif
%if 0%{?rhel}
%global targets_to_build "X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF;WebAssembly"
%global experimental_targets_to_build ""
%global _smp_mflags -j8
%else
%global targets_to_build "all"
%global experimental_targets_to_build "AVR"
%endif
%global build_install_prefix %{buildroot}%{install_prefix}
# Lower memory usage of dwz on s390x
%global _dwz_low_mem_die_limit_s390x 1
%global _dwz_max_die_limit_s390x 1000000
%ifarch %{arm}
# koji overrides the _gnu variable to be gnu, which is not correct for clang, so
# we need to hard-code the correct triple here.
%global llvm_triple armv7l-redhat-linux-gnueabihf
%else
%global llvm_triple %{_host}
%endif
# https://fedoraproject.org/wiki/Changes/PythonSafePath#Opting_out
# Don't add -P to Python shebangs
# The executable Python scripts in /usr/share/opt-viewer/ import each other
%undefine _py3_shebang_P
%global llvm_triple %{_host}
################################################################################
# OS Specific Configuration
################################################################################
########
# RHEL #
########
%if 0%{?rhel}
%global targets_to_build "X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF;WebAssembly"
%global experimental_targets_to_build ""
%global _smp_mflags -j8
%if 0%{?rhel} == 8
%undefine __cmake_in_source_build
%if !0%{?rhel}
# libedit-devel is a buildroot-only package in RHEL8, so we can't have a
# any run-time depencies on it.
%global use_libedit 0
%endif
%if 0%{?rhel} > 8
%global use_libedit 1
%endif
%else
##########
# FEDORA #
##########
%global targets_to_build "all"
%global experimental_targets_to_build "AVR"
%endif
################################################################################
# Spec File
################################################################################
Name: %{pkg_name}
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}
Release: 1%{?dist}
@ -82,16 +98,15 @@ License: NCSA
URL: http://llvm.org
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{llvm_srcdir}.tar.xz
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{llvm_srcdir}.tar.xz.sig
Source2: tstellar-gpg-key.asc
Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz
Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz.sig
Source4: release-keys.asc
%if %{without compat_build}
Source3: run-lit-tests
Source4: lit.fedora.cfg.py
Source5: run-lit-tests
Source6: lit.fedora.cfg.py
%endif
%if 0%{?abi_revision}
Patch0: 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch
%endif
Patch2: 0001-XFAIL-missing-abstract-variable.ll-test-on-ppc64le.patch
# RHEL-specific patches.
@ -107,7 +122,6 @@ BuildRequires: libffi-devel
BuildRequires: ncurses-devel
BuildRequires: python3-psutil
BuildRequires: python3-sphinx
BuildRequires: pandoc
BuildRequires: multilib-rpm-config
%if %{with gold}
BuildRequires: binutils-devel
@ -120,7 +134,16 @@ BuildRequires: valgrind-devel
# LLVM's LineEditor library will use libedit if it is available.
BuildRequires: libedit-devel
%endif
# We need python3-devel for pathfix.py.
# Need pandoc to cover markdown to rst, because RHEL does not have recommonmark,
# so we can't build the documentation as is.
%if !0%{?rhel}
BuildRequires: python3-recommonmark
%endif
%if 0%{?rhel} == 8
# RHEL8 has pandoc which we can use instead of python3-recommonmark for some things.
BuildRequires: pandoc
%endif
# We need python3-devel for pathfix.py and %%py3_shebang_fix.
BuildRequires: python3-devel
BuildRequires: python3-setuptools
@ -209,10 +232,30 @@ Summary: LLVM's modified googletest sources
%description googletest
LLVM's modified googletest sources.
%if 0%{?rhel}
%package toolset
Summary: Package that installs llvm-toolset
Requires: clang = %{version}
Requires: llvm = %{version}
%ifnarch s390x
Requires: lld = %{version}
%endif
%description toolset
This is the main package for llvm-toolset.
%endif
%endif
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE3}' --data='%{SOURCE2}'
%setup -T -q -b 2 -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
%autosetup -n %{llvm_srcdir} -p2
%py3_shebang_fix \
@ -220,15 +263,14 @@ LLVM's modified googletest sources.
tools/opt-viewer/*.py \
utils/update_cc_test_checks.py
%if 0%{?rhel} == 8
# Convert markdown files to rst to cope with the absence of compatible md parser in rhel.
# The sed expression takes care of a slight difference between pandoc markdown and sphinx markdown.
find -name '*.md' | while read md; do sed -r -e 's/^( )*\* /\n\1\* /' ${md} | pandoc -f markdown -o ${md%.md}.rst ; done
%endif
%build
mkdir -p %{_vpath_builddir}
cd %{_vpath_builddir}
%ifarch s390 s390x
# Fails with "exceeded PCRE's backtracking limit"
%global _lto_cflags %nil
@ -241,12 +283,8 @@ cd %{_vpath_builddir}
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
%endif
# Need to explicitly call set_build_flags if we want to update LDFLAGS
%set_build_flags
export LDFLAGS="${LDFLAGS} -Wl,--build-id=md5"
# force off shared libs as cmake macros turns it on.
%cmake .. -G Ninja \
%cmake -G Ninja \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DLLVM_PARALLEL_LINK_JOBS=1 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
@ -307,7 +345,6 @@ export LDFLAGS="${LDFLAGS} -Wl,--build-id=md5"
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
-DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=ON \
-DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF \
%{?abi_revision:-DLLVM_ABI_REVISION=%{abi_revision}} \
\
-DLLVM_DEFAULT_TARGET_TRIPLE=%{llvm_triple} \
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
@ -319,11 +356,11 @@ export LDFLAGS="${LDFLAGS} -Wl,--build-id=md5"
# Build libLLVM.so first. This ensures that when libLLVM.so is linking, there
# are no other compile jobs running. This will help reduce OOM errors on the
# builders without having to artificially limit the number of concurrent jobs.
%ninja_build LLVM
%ninja_build
%cmake_build --target LLVM
%cmake_build
%install
%ninja_install -C %{_vpath_builddir}
%cmake_install
mkdir -p %{buildroot}/%{_bindir}
@ -355,9 +392,6 @@ rm -rf test/tools/UpdateTestChecks
install %{build_libdir}/libLLVMTestingSupport.a %{buildroot}%{_libdir}
%global install_srcdir %{buildroot}%{_datadir}/llvm/src
%global lit_cfg test/%{_arch}.site.cfg.py
%global lit_unit_cfg test/Unit/%{_arch}.site.cfg.py
%global lit_fedora_cfg %{_datadir}/llvm/lit.fedora.cfg.py
# Install gtest sources so clang can use them for gtest
install -d %{install_srcdir}
@ -371,7 +405,7 @@ cp -R utils/UpdateTestChecks %{install_srcdir}/utils/
%if %{with gold}
# Add symlink to lto plugin in the binutils plugin directory.
%{__mkdir_p} %{buildroot}%{_libdir}/bfd-plugins/
ln -s %{_libdir}/LLVMgold.so %{buildroot}%{_libdir}/bfd-plugins/
ln -s -t %{buildroot}%{_libdir}/bfd-plugins/ ../LLVMgold.so
%endif
%else
@ -379,7 +413,7 @@ ln -s %{_libdir}/LLVMgold.so %{buildroot}%{_libdir}/bfd-plugins/
# Add version suffix to binaries
for f in %{buildroot}/%{install_bindir}/*; do
filename=`basename $f`
ln -s ../../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix}
ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix}
done
# Move header files
@ -507,7 +541,6 @@ fi
%{_libdir}/bfd-plugins/LLVMgold.so
%endif
%{_libdir}/libLLVM-%{maj_ver}.%{min_ver}*.so
%{_libdir}/libLLVM-%{maj_ver}.so%{?abi_revision:.%{abi_revision}}
%{_libdir}/libLTO.so*
%else
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
@ -573,9 +606,23 @@ fi
%{_datadir}/llvm/src/utils
%{_libdir}/libLLVMTestingSupport.a
%if 0%{?rhel}
%files toolset
%license LICENSE.TXT
%endif
%endif
%changelog
* Thu Jan 19 2023 Tom Stellard <tstellar@redhat.com> - 15.0.7-1
- 15.0.7 Release
* Mon Oct 31 2022 Tom Stellard <tstellar@redhat.com> - 15.0.0-2
- Re-enable debuginfo for ppc64le
* Tue Sep 06 2022 Nikita Popov <npopov@redhat.com> - 15.0.0-1
- Update to LLVM 15.0.0
* Mon Jun 27 2022 Tom Stellard <tstellar@redhat.com> - 14.0.6-1
- 14.0.6 Release