import lld-9.0.0-4.module+el8.2.0+5233+375ee001
This commit is contained in:
parent
bbdd73051f
commit
24875af1a5
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/lld-8.0.0.src.tar.xz
|
SOURCES/lld-9.0.0.src.tar.xz
|
||||||
|
@ -1 +1 @@
|
|||||||
b9062249ef61316e3450fc26e7238432673036bb SOURCES/lld-8.0.0.src.tar.xz
|
021a8c38cf27d63db37d939c7cdec46ffd627be2 SOURCES/lld-9.0.0.src.tar.xz
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
From 39ce39a20a0854380997df7912e739b6c348f8a1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tom Stellard <tstellar@redhat.com>
|
|
||||||
Date: Thu, 30 Aug 2018 14:59:06 -0700
|
|
||||||
Subject: [PATCH] [lld] Prefer using the newest installed python version rather
|
|
||||||
than 2.7
|
|
||||||
|
|
||||||
This only affects the lit tests, which seem to pass fine with python3.
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 1 -
|
|
||||||
1 file changed, 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 087377d..6e5f2a7 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -56,7 +56,6 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
|
||||||
include(HandleLLVMOptions)
|
|
||||||
|
|
||||||
if(LLVM_INCLUDE_TESTS)
|
|
||||||
- set(Python_ADDITIONAL_VERSIONS 2.7)
|
|
||||||
include(FindPythonInterp)
|
|
||||||
if(NOT PYTHONINTERP_FOUND)
|
|
||||||
message(FATAL_ERROR
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
12
SOURCES/lit.lld-test.cfg.py
Normal file
12
SOURCES/lit.lld-test.cfg.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#Clear lld_tools_dir so we don't accidently pick up tools from somewhere else
|
||||||
|
config.lld_tools_dir = ""
|
||||||
|
|
||||||
|
if hasattr(config, 'have_zlib'):
|
||||||
|
# Regression tests write output to this directory, so we need to be able to specify
|
||||||
|
# a temp directory when invoking lit. e.g. lit -Dlld_obj_root=/tmp/lit
|
||||||
|
config.lld_obj_root = "%(lld_obj_root)s" % lit_config.params
|
||||||
|
lit_config.load_config(config, '%(lld_test_root)s/lit.cfg.py' % lit_config.params)
|
||||||
|
else:
|
||||||
|
# For unit tests, llvm_obj_root is used to find the unit test binaries.
|
||||||
|
config.lld_obj_root = '%(lld_unittest_bindir)s' % lit_config.params
|
||||||
|
lit_config.load_config(config, '%(lld_test_root)s/Unit/lit.cfg.py' % lit_config.params)
|
66
SOURCES/run-lit-tests
Executable file
66
SOURCES/run-lit-tests
Executable file
@ -0,0 +1,66 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
cat << EOF
|
||||||
|
usage: `basename $0` [OPTIONS]
|
||||||
|
--threads NUM The number of threads to use for running tests.
|
||||||
|
--multilib-arch ARCH Use this option to test 32-bit libs/binaries on
|
||||||
|
64-bit hosts.
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
threads_arg=''
|
||||||
|
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
case $1 in
|
||||||
|
--threads)
|
||||||
|
shift
|
||||||
|
threads_arg="--threads $1"
|
||||||
|
;;
|
||||||
|
--multilib-arch)
|
||||||
|
shift
|
||||||
|
ARCH=$1
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
echo "unknown option: $1"
|
||||||
|
echo ""
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ `whoami` = "root" ]; then
|
||||||
|
echo "error: lld tests do not support running as root."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -xe
|
||||||
|
|
||||||
|
if [ -z "$ARCH" ]; then
|
||||||
|
ARCH=`rpm --eval '%_arch'`
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $ARCH in
|
||||||
|
arm)
|
||||||
|
;&
|
||||||
|
i686)
|
||||||
|
LIB_DIR="/usr/lib/"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
LIB_DIR="/usr/lib64/"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
cd $(mktemp -d)
|
||||||
|
ln -s /usr/include include
|
||||||
|
tar -xzf /usr/share/lld/src/test.tar.gz
|
||||||
|
ln -s $ARCH.site.cfg.py test/lit.site.cfg.py
|
||||||
|
ln -s $ARCH.site.cfg.py test/Unit/lit.site.cfg.py
|
||||||
|
|
||||||
|
LD_LIBRARY_PATH=$LIB_DIR/lld:$LD_LIBRARY_PATH \
|
||||||
|
lit -v -s $threads_arg test \
|
||||||
|
-Dlld_obj_root=`pwd` \
|
||||||
|
-Dlld_test_root=`pwd`/test \
|
||||||
|
-Dlld_unittest_bindir=$LIB_DIR/lld
|
121
SPECS/lld.spec
121
SPECS/lld.spec
@ -1,30 +1,32 @@
|
|||||||
#%%global rc_ver 4
|
#%%global rc_ver 3
|
||||||
|
%global baserelease 4
|
||||||
%global lld_srcdir lld-%{version}%{?rc_ver:rc%{rc_ver}}.src
|
%global lld_srcdir lld-%{version}%{?rc_ver:rc%{rc_ver}}.src
|
||||||
|
%global maj_ver 9
|
||||||
|
|
||||||
# armv7lhl tests disabled because of arm issue, see https://koji.fedoraproject.org/koji/taskinfo?taskID=33660162
|
# Don't include unittests in automatic generation of provides or requires.
|
||||||
%ifnarch i686 %{arm}
|
%global __provides_exclude_from ^%{_libdir}/lld/.*$
|
||||||
%global enable_test_pkg 1
|
%global __requires_exclude ^libgtest.*$
|
||||||
%endif
|
|
||||||
|
%bcond_with ld_alternative
|
||||||
|
|
||||||
Name: lld
|
Name: lld
|
||||||
Version: 8.0.0
|
Version: %{maj_ver}.0.0
|
||||||
Release: 1%{?rc_ver:.rc%{rc_ver}}%{?dist}
|
Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist}
|
||||||
Summary: The LLVM Linker
|
Summary: The LLVM Linker
|
||||||
|
|
||||||
License: NCSA
|
License: NCSA
|
||||||
URL: http://llvm.org
|
URL: http://llvm.org
|
||||||
Source0: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{lld_srcdir}.tar.xz
|
Source0: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{lld_srcdir}.tar.xz
|
||||||
|
Source1: run-lit-tests
|
||||||
|
Source2: lit.lld-test.cfg.py
|
||||||
|
|
||||||
Patch0: 0001-CMake-Check-for-gtest-headers-even-if-lit.py-is-not-.patch
|
Patch0: 0001-CMake-Check-for-gtest-headers-even-if-lit.py-is-not-.patch
|
||||||
Patch1: 0001-lld-Prefer-using-the-newest-installed-python-version.patch
|
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: llvm-devel = %{version}
|
BuildRequires: llvm-devel = %{version}
|
||||||
%if 0%{?enable_test_pkg}
|
|
||||||
BuildRequires: llvm-test = %{version}
|
BuildRequires: llvm-test = %{version}
|
||||||
%endif
|
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
BuildRequires: chrpath
|
BuildRequires: chrpath
|
||||||
@ -34,11 +36,19 @@ BuildRequires: python3-rpm-macros
|
|||||||
BuildRequires: python3-lit
|
BuildRequires: python3-lit
|
||||||
BuildRequires: llvm-googletest = %{version}
|
BuildRequires: llvm-googletest = %{version}
|
||||||
|
|
||||||
|
%if %{with ld_alternative}
|
||||||
|
Requires(post): %{_sbindir}/alternatives
|
||||||
|
Requires(preun): %{_sbindir}/alternatives
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Requires: lld-libs = %{version}-%{release}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The LLVM project linker.
|
The LLVM project linker.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Libraries and header files for LLD
|
Summary: Libraries and header files for LLD
|
||||||
|
Requires: lld-libs = %{version}-%{release}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
This package contains library and header files needed to develop new native
|
This package contains library and header files needed to develop new native
|
||||||
@ -50,6 +60,15 @@ Summary: LLD shared libraries
|
|||||||
%description libs
|
%description libs
|
||||||
Shared libraries for LLD.
|
Shared libraries for LLD.
|
||||||
|
|
||||||
|
%package test
|
||||||
|
Summary: LLD regression tests
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: python3-lit
|
||||||
|
Requires: llvm-test(major) = %{maj_ver}
|
||||||
|
|
||||||
|
%description test
|
||||||
|
LLVM regression tests.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{version}%{?rc_ver:rc%{rc_ver}}.src -p1
|
%autosetup -n %{name}-%{version}%{?rc_ver:rc%{rc_ver}}.src -p1
|
||||||
|
|
||||||
@ -75,7 +94,42 @@ cd %{_target_platform}
|
|||||||
|
|
||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
|
# Build the unittests so we can install them.
|
||||||
|
%make_build lld-test-depends
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
|
||||||
|
%global lit_cfg test/%{_arch}.site.cfg.py
|
||||||
|
%global lit_unit_cfg test/Unit/%{_arch}.site.cfg.py
|
||||||
|
%global lit_lld_test_cfg_install_path %{_datadir}/lld/lit.lld-test.cfg.py
|
||||||
|
|
||||||
|
# Generate lit config files. Strip off the last line that initiates the
|
||||||
|
# test run, so we can customize the configuration.
|
||||||
|
head -n -1 %{_target_platform}/test/lit.site.cfg.py >> %{lit_cfg}
|
||||||
|
head -n -1 %{_target_platform}/test/Unit/lit.site.cfg.py >> %{lit_unit_cfg}
|
||||||
|
|
||||||
|
# Patch lit config files to load custom config:
|
||||||
|
for f in %{lit_cfg} %{lit_unit_cfg}; do
|
||||||
|
echo "lit_config.load_config(config, '%{lit_lld_test_cfg_install_path}')" >> $f
|
||||||
|
done
|
||||||
|
|
||||||
|
# Install test files
|
||||||
|
install -d %{buildroot}%{_datadir}/lld/src
|
||||||
|
cp %{SOURCE2} %{buildroot}%{_datadir}/lld/
|
||||||
|
|
||||||
|
tar -czf %{buildroot}%{_datadir}/lld/src/test.tar.gz test/
|
||||||
|
install -d %{buildroot}%{_libexecdir}/tests/lld
|
||||||
|
cp %{SOURCE1} %{buildroot}%{_libexecdir}/tests/lld
|
||||||
|
|
||||||
|
# Install unit test binaries
|
||||||
|
install -d %{buildroot}%{_libdir}/lld/
|
||||||
|
cp -R %{_target_platform}/unittests %{buildroot}%{_libdir}/lld/
|
||||||
|
rm -rf `find %{buildroot}%{_libdir}/lld/ -iname '*make*'`
|
||||||
|
|
||||||
|
# Install gtest libraries
|
||||||
|
cp %{_target_platform}/%{_lib}/libgtest*so* %{buildroot}%{_libdir}/lld/
|
||||||
|
|
||||||
|
# Install libraries and binaries
|
||||||
cd %{_target_platform}
|
cd %{_target_platform}
|
||||||
%make_install
|
%make_install
|
||||||
|
|
||||||
@ -83,15 +137,33 @@ cd %{_target_platform}
|
|||||||
chrpath --delete %{buildroot}%{_bindir}/*
|
chrpath --delete %{buildroot}%{_bindir}/*
|
||||||
chrpath --delete %{buildroot}%{_libdir}/*.so*
|
chrpath --delete %{buildroot}%{_libdir}/*.so*
|
||||||
|
|
||||||
|
%if %{with ld_alternative}
|
||||||
|
# Required when using update-alternatives:
|
||||||
|
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/
|
||||||
|
touch %{buildroot}%{_bindir}/ld
|
||||||
|
|
||||||
|
%post
|
||||||
|
%{_sbindir}/update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.lld 1
|
||||||
|
|
||||||
|
%postun
|
||||||
|
if [ $1 -eq 0 ] ; then
|
||||||
|
%{_sbindir}/update-alternatives --remove ld %{_bindir}/ld.lld
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
|
||||||
%if 0%{?enable_test_pkg}
|
# armv7lhl tests disabled because of arm issue, see https://koji.fedoraproject.org/koji/taskinfo?taskID=33660162
|
||||||
|
%ifnarch %{arm}
|
||||||
make -C %{_target_platform} %{?_smp_mflags} check-lld
|
make -C %{_target_platform} %{?_smp_mflags} check-lld
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ldconfig_scriptlets libs
|
%ldconfig_scriptlets libs
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
%if %{with ld_alternative}
|
||||||
|
%ghost %{_bindir}/ld
|
||||||
|
%endif
|
||||||
%{_bindir}/lld*
|
%{_bindir}/lld*
|
||||||
%{_bindir}/ld.lld
|
%{_bindir}/ld.lld
|
||||||
%{_bindir}/ld64.lld
|
%{_bindir}/ld64.lld
|
||||||
@ -104,7 +176,34 @@ make -C %{_target_platform} %{?_smp_mflags} check-lld
|
|||||||
%files libs
|
%files libs
|
||||||
%{_libdir}/liblld*.so.*
|
%{_libdir}/liblld*.so.*
|
||||||
|
|
||||||
|
%files test
|
||||||
|
%{_libexecdir}/tests/lld/
|
||||||
|
%{_libdir}/lld/
|
||||||
|
%{_datadir}/lld/src/test.tar.gz
|
||||||
|
%{_datadir}/lld/lit.lld-test.cfg.py
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Dec 13 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-4
|
||||||
|
- Remove build artifacts installed with unittests
|
||||||
|
|
||||||
|
* Thu Dec 05 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-3
|
||||||
|
- Add lld-test package
|
||||||
|
|
||||||
|
* Thu Nov 14 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-2
|
||||||
|
- Add explicit lld-libs requires to fix rpmdiff errors
|
||||||
|
|
||||||
|
* Thu Sep 26 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-1
|
||||||
|
- 9.0.0 Release
|
||||||
|
|
||||||
|
* Thu Aug 1 2019 sguelton@redhat.com - 8.0.1-1
|
||||||
|
- 8.0.1 release
|
||||||
|
|
||||||
|
* Mon Jun 17 2019 sguelton@redhat.com - 8.0.1-0.2.rc2
|
||||||
|
- Remove unnecessary threading patch
|
||||||
|
|
||||||
|
* Thu Jun 13 2019 sguelton@redhat.com - 8.0.1-0.1.rc2
|
||||||
|
- 8.0.1rc2 Release
|
||||||
|
|
||||||
* Tue Apr 16 2019 sguelton@redhat.com - 8.0.0-1
|
* Tue Apr 16 2019 sguelton@redhat.com - 8.0.0-1
|
||||||
- 8.0.0 Release
|
- 8.0.0 Release
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user