Compare commits

..

1 commit

Author SHA1 Message Date
Josh Stone
6d21f2afa7 Port to EPEL7 2021-06-17 19:04:10 -07:00
6 changed files with 65 additions and 1393 deletions

View file

@ -1,20 +0,0 @@
--- a/llvm-11.1.0.src/include/llvm/Support/Base64.h 2021-02-03 14:51:10.000000000 -0700
+++ b/llvm-11.1.0.src/include/llvm/Support/Base64.h 2023-01-30 10:58:39.424270016 -0700
@@ -13,6 +13,7 @@
#ifndef LLVM_SUPPORT_BASE64_H
#define LLVM_SUPPORT_BASE64_H
+#include <cstdint>
#include <string>
namespace llvm {
--- a/llvm-11.1.0.src/include/llvm/Support/Signals.h 2021-02-03 14:51:10.000000000 -0700
+++ b/llvm-11.1.0.src/include/llvm/Support/Signals.h 2023-01-30 09:51:35.823901524 -0700
@@ -14,6 +14,7 @@
#ifndef LLVM_SUPPORT_SIGNALS_H
#define LLVM_SUPPORT_SIGNALS_H
+#include <cstdint>
#include <string>
namespace llvm {

View file

@ -1,5 +1,11 @@
%global devtoolset_name devtoolset-9
# Components enabled if supported by target architecture:
%if 0%{?rhel} && 0%{?rhel} < 8
%define gold_arches %{ix86} x86_64 %{arm} aarch64
%else
%define gold_arches %{ix86} x86_64 %{arm} aarch64 %{power64} s390x
%endif
%ifarch %{gold_arches}
%bcond_without gold
%else
@ -7,11 +13,12 @@
%endif
%bcond_without compat_build
%bcond_with docs
%global llvm_libdir %{_libdir}/%{name}
%global build_llvm_libdir %{buildroot}%{llvm_libdir}
#global rc_ver 2
%global baserelease 16
%global baserelease 1
%global llvm_srcdir llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src
%global maj_ver 11
%global min_ver 1
@ -32,9 +39,7 @@
%global pkg_name llvm
%global install_prefix /usr
%global install_libdir %{_libdir}
%global pkg_bindir %{_bindir}
%global pkg_libdir %{install_libdir}
%global exec_suffix %{nil}
%endif
%global targets_to_build "all"
@ -60,22 +65,21 @@ Source4: lit.fedora.cfg.py
# Fix coreos-installer test crash on s390x (rhbz#1883457), https://reviews.llvm.org/D89034
Patch1: 0001-SystemZ-Use-LA-instead-of-AGR-in-eliminateFrameIndex.patch
Patch2: 0001-gcc11.patch
Patch2: 0001-gcc11.patch
Patch3: 0001-SystemZ-Assign-the-full-space-for-promoted-and-split.patch
Patch4: 0001-MemCpyOpt-Correctly-merge-alias-scopes-during-call-s.patch
Patch5: gcc12.patch
Patch6: typename.patch
Patch7: test-go-py-pipes.patch
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: %{devtoolset_name}-gcc
BuildRequires: %{devtoolset_name}-gcc-c++
BuildRequires: cmake3
BuildRequires: ninja-build
BuildRequires: zlib-devel
BuildRequires: libffi-devel
BuildRequires: ncurses-devel
%if %{with docs}
BuildRequires: python3-sphinx
BuildRequires: python3-recommonmark
%endif
BuildRequires: multilib-rpm-config
%if %{with gold}
BuildRequires: binutils-devel
@ -88,7 +92,6 @@ BuildRequires: valgrind-devel
BuildRequires: libedit-devel
# We need python3-devel for pathfix.py.
BuildRequires: python3-devel
BuildRequires: python3-setuptools
# For origin certification
BuildRequires: gnupg2
@ -132,6 +135,7 @@ Provides: llvm-devel(major) = %{maj_ver}
This package contains library and header files needed to develop new native
programs that use the LLVM infrastructure.
%if %{with docs}
%package doc
Summary: Documentation for LLVM
BuildArch: noarch
@ -139,6 +143,7 @@ Requires: %{name} = %{version}-%{release}
%description doc
Documentation for the LLVM compiler infrastructure.
%endif
%package libs
Summary: LLVM shared libraries
@ -150,8 +155,6 @@ Shared libraries for the LLVM compiler infrastructure.
Summary: LLVM static libraries
Conflicts: %{name}-devel < 8
Provides: llvm-static(major) = %{maj_ver}
%description static
Static libraries for the LLVM compiler infrastructure.
@ -187,7 +190,7 @@ LLVM's modified googletest sources.
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -n %{llvm_srcdir} -p2
%{__python3} %{_rpmconfigdir}/redhat/pathfix.py -i %{__python3} -pn \
pathfix.py -i %{__python3} -pn \
test/BugPoint/compile-custom.ll.py \
tools/opt-viewer/*.py \
utils/update_cc_test_checks.py
@ -209,12 +212,16 @@ LLVM's modified googletest sources.
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
%endif
%undefine __cmake3_in_source_build
# force off shared libs as cmake macros turns it on.
%cmake -G Ninja \
%cmake3 -G Ninja \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DLLVM_PARALLEL_LINK_JOBS=1 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DCMAKE_C_COMPILER=/opt/rh/%{devtoolset_name}/root/usr/bin/gcc \
-DCMAKE_CXX_COMPILER=/opt/rh/%{devtoolset_name}/root/usr/bin/g++ \
%ifarch s390 %{arm} %ix86
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
@ -257,10 +264,12 @@ LLVM's modified googletest sources.
-DLLVM_TOOLS_INSTALL_DIR:PATH=bin \
%endif
\
%if %{with docs}
-DLLVM_INCLUDE_DOCS:BOOL=ON \
-DLLVM_BUILD_DOCS:BOOL=ON \
-DLLVM_ENABLE_SPHINX:BOOL=ON \
-DLLVM_ENABLE_DOXYGEN:BOOL=OFF \
%endif
\
%if %{without compat_build}
-DLLVM_VERSION_SUFFIX='' \
@ -279,19 +288,25 @@ LLVM's modified googletest sources.
# 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.
%cmake_build --target LLVM
%cmake_build
%cmake3_build --target LLVM
%cmake3_build
%install
%cmake_install
%cmake3_install
mkdir -p %{buildroot}/%{_bindir}
%if %{without compat_build}
mkdir -p %{buildroot}/%{_bindir}
mv %{buildroot}/%{_bindir}/llvm-config %{buildroot}/%{_bindir}/llvm-config-%{__isa_bits}
# ghost presence
touch %{buildroot}%{_bindir}/llvm-config
%if %{with docs}
# Fix some man pages
ln -s llvm-config.1 %{buildroot}%{_mandir}/man1/llvm-config%{exec_suffix}-%{__isa_bits}.1
mv %{buildroot}%{_mandir}/man1/*tblgen.1 %{buildroot}%{_mandir}/man1/llvm-tblgen.1
ln -s llvm-config.1 %{buildroot}%{_mandir}/man1/llvm-config-%{__isa_bits}.1
mv %{buildroot}%{_mandir}/man1/tblgen.1 %{buildroot}%{_mandir}/man1/llvm-tblgen.1
%endif
# Install binaries needed for lit tests
%global test_binaries llvm-isel-fuzzer llvm-opt-fuzzer
@ -382,6 +397,7 @@ ln -s %{_libdir}/LLVMgold.so %{buildroot}%{_libdir}/bfd-plugins/
%else
# Add version suffix to binaries
mkdir -p %{buildroot}/%{_bindir}
for f in %{buildroot}/%{install_bindir}/*; do
filename=`basename $f`
ln -s ../../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix}
@ -393,6 +409,7 @@ ln -s ../../../%{install_includedir}/llvm %{buildroot}/%{pkg_includedir}/llvm
ln -s ../../../%{install_includedir}/llvm-c %{buildroot}/%{pkg_includedir}/llvm-c
# Fix multi-lib
mv %{buildroot}%{_bindir}/llvm-config{%{exec_suffix},%{exec_suffix}-%{__isa_bits}}
%multilib_fix_c_header --file %{install_includedir}/llvm/Config/llvm-config.h
# Create ld.so.conf.d entry
@ -401,38 +418,20 @@ cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf << EOF
%{pkg_libdir}
EOF
%if %{with docs}
# Add version suffix to man pages and move them to mandir.
mkdir -p %{buildroot}/%{_mandir}/man1
for f in %{build_install_prefix}/share/man/man1/*; do
filename=`basename $f | cut -f 1 -d '.'`
mv $f %{buildroot}%{_mandir}/man1/$filename%{exec_suffix}.1
done
%endif
# Remove opt-viewer, since this is just a compatibility package.
rm -Rf %{build_install_prefix}/share/opt-viewer
%endif
# llvm-config special casing. llvm-config is managed by update-alternatives.
# the original file must remain available for compatibility with the CMake
# infrastructure. Without compat, cmake points to the symlink, with compat it
# points to the original file.
%if %{without compat_build}
mv %{buildroot}/%{pkg_bindir}/llvm-config %{buildroot}/%{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
%else
rm %{buildroot}%{_bindir}/llvm-config%{exec_suffix}
(cd %{buildroot}/%{pkg_bindir} ; ln -s llvm-config llvm-config%{exec_suffix}-%{__isa_bits} )
%endif
# ghost presence
touch %{buildroot}%{_bindir}/llvm-config%{exec_suffix}
%check
# TODO: Fix the failures below
@ -440,6 +439,8 @@ touch %{buildroot}%{_bindir}/llvm-config%{exec_suffix}
rm test/tools/llvm-readobj/ELF/dependent-libraries.test
%endif
rm test/ExecutionEngine/Interpreter/intrinsics.ll
# non reproducible errors
rm test/tools/dsymutil/X86/swift-interface.test
@ -448,24 +449,29 @@ LD_LIBRARY_PATH=%{buildroot}/%{pkg_libdir} %{__ninja} check-all -C %{_vpath_bui
%ldconfig_scriptlets libs
%if %{without compat_build}
%post devel
%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config%{exec_suffix} llvm-config%{exec_suffix} %{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits}
%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config llvm-config %{_bindir}/llvm-config-%{__isa_bits} %{__isa_bits}
%postun devel
if [ $1 -eq 0 ]; then
%{_sbindir}/update-alternatives --remove llvm-config%{exec_suffix} %{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
%{_sbindir}/update-alternatives --remove llvm-config %{_bindir}/llvm-config-%{__isa_bits}
fi
%endif
%files
%license LICENSE.TXT
%if %{with docs}
%exclude %{_mandir}/man1/llvm-config*
%{_mandir}/man1/*
%endif
%{_bindir}/*
%exclude %{_bindir}/llvm-config%{exec_suffix}
%exclude %{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
%if %{without compat_build}
%exclude %{_bindir}/llvm-config
%exclude %{_bindir}/llvm-config-%{__isa_bits}
%exclude %{_bindir}/not
%exclude %{_bindir}/count
%exclude %{_bindir}/yaml-bench
@ -474,6 +480,7 @@ fi
%exclude %{_bindir}/llvm-opt-fuzzer
%{_datadir}/opt-viewer
%else
%exclude %{pkg_bindir}/llvm-config
%{pkg_bindir}
%endif
@ -500,17 +507,22 @@ fi
%files devel
%license LICENSE.TXT
%ghost %{_bindir}/llvm-config%{exec_suffix}
%{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
%{_mandir}/man1/llvm-config*
%if %{without compat_build}
%ghost %{_bindir}/llvm-config
%{_bindir}/llvm-config-%{__isa_bits}
%if %{with docs}
%{_mandir}/man1/llvm-config*
%endif
%{_includedir}/llvm
%{_includedir}/llvm-c
%{_libdir}/libLLVM.so
%{_libdir}/cmake/llvm
%else
%{_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
%{pkg_bindir}/llvm-config
%if %{with docs}
%{_mandir}/man1/llvm-config%{exec_suffix}.1.gz
%endif
%{install_includedir}/llvm
%{install_includedir}/llvm-c
%{pkg_includedir}/llvm
@ -520,9 +532,11 @@ fi
%{pkg_libdir}/cmake/llvm
%endif
%if %{with docs}
%files doc
%license LICENSE.TXT
%doc %{_pkgdocdir}/html
%endif
%files static
%license LICENSE.TXT
@ -562,55 +576,6 @@ fi
%endif
%changelog
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 11.1.0-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 11.1.0-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 11.1.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 11.1.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 11.1.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 11.1.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Mon Jan 30 2023 Jerry James <loganjerry@gmail.com> - 11.1.0-10
- Add gcc12 patch to add includes needed for GCC 12
- Add typename patch to fix test failures
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 11.1.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 11.1.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 11.1.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sat Jan 08 2022 Miro Hrončok <mhroncok@redhat.com> - 11.1.0-7
- Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 11.1.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed May 19 2021 sguelton@redhat.com - 11.1.0-5
- Fix handling of llvm-config
* Thu May 06 2021 sguelton@redhat.com - 11.1.0-4
- Harmonize llvm-config handling with non-compat version
* Tue Apr 27 2021 sguelton@redhat.com - 11.1.0-3
- Fix llvm-config11 install path
* Tue Apr 13 2021 sguelton@redhat.com - 11.1.0-2
- Fix llvm-config-11 handling, see rhbz#1937816
* Tue Mar 23 2021 Josh Stone <jistone@redhat.com> - 11.1.0-1
- Update to 11.1.0 final
- Add fixes for rustc codegen

View file

@ -1,18 +0,0 @@
--- a/llvm-13.0.1.src/test/Bindings/Go/lit.local.cfg 2022-01-21 05:31:59.000000000 +0800
+++ b/llvm-13.0.1.src/test/Bindings/Go/lit.local.cfg 2024-07-19 21:33:42.775023065 +0800
@@ -1,5 +1,4 @@
import os
-import pipes
import shlex
import sys
@@ -56,7 +55,7 @@
except (AttributeError, OSError):
pass
- return ' '.join([pipes.quote(arg) for arg in args])
+ return ' '.join([shlex.quote(arg) for arg in args])
config.environment['CC'] = fixup_compiler_path(config.host_cc)
config.environment['CXX'] = fixup_compiler_path(config.host_cxx)

View file

@ -1,5 +0,0 @@
#!/bin/bash
set -ex
echo '#include "llvm/Support/Error.h"' | clang++ -x c++ -E `llvm-config-11 --cxxflags` -

View file

@ -1,9 +0,0 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
required_packages:
- clang
tests:
- llvm-config

File diff suppressed because it is too large Load diff