RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/lld#5baec8dff67c12abc0448e72ca11142f76c03089
This commit is contained in:
parent
0adbf00a8a
commit
7bf0075934
51
.gitignore
vendored
51
.gitignore
vendored
@ -0,0 +1,51 @@
|
||||
/lld-4.0.0.src.tar.xz
|
||||
/lld-4.0.1.src.tar.xz
|
||||
/lld-5.0.0.src.tar.xz
|
||||
/lld-5.0.1.src.tar.xz
|
||||
/lld-6.0.0rc1.src.tar.xz
|
||||
/lld-6.0.0rc2.src.tar.xz
|
||||
/lld-6.0.0.src.tar.xz
|
||||
/lld-6.0.1rc1.src.tar.xz
|
||||
/lld-6.0.1.src.tar.xz
|
||||
/lld-7.0.0rc1.src.tar.xz
|
||||
/lld-7.0.0rc2.src.tar.xz
|
||||
/lld-7.0.0rc3.src.tar.xz
|
||||
/lld-7.0.0.src.tar.xz
|
||||
/lld-7.0.1.src.tar.xz
|
||||
/lld-8.0.0rc1.src.tar.xz
|
||||
/lld-8.0.0rc2.src.tar.xz
|
||||
/lld-8.0.0rc3.src.tar.xz
|
||||
/lld-8.0.0rc4.src.tar.xz
|
||||
/lld-8.0.0.src.tar.xz
|
||||
/lld-9.0.0rc2.src.tar.xz
|
||||
/lld-9.0.0rc3.src.tar.xz
|
||||
/lld-9.0.0.src.tar.xz
|
||||
/lld-9.0.0.src.tar.xz.sig
|
||||
/lld-9.0.1.src.tar.xz
|
||||
/lld-9.0.1.src.tar.xz.sig
|
||||
/lld-10.0.0rc1.src.tar.xz
|
||||
/lld-10.0.0rc1.src.tar.xz.sig
|
||||
/lld-10.0.0rc2.src.tar.xz
|
||||
/lld-10.0.0rc2.src.tar.xz.sig
|
||||
/lld-10.0.0rc3.src.tar.xz
|
||||
/lld-10.0.0rc3.src.tar.xz.sig
|
||||
/lld-10.0.0rc4.src.tar.xz
|
||||
/lld-10.0.0rc4.src.tar.xz.sig
|
||||
/lld-10.0.0rc5.src.tar.xz
|
||||
/lld-10.0.0rc5.src.tar.xz.sig
|
||||
/lld-10.0.0rc6.src.tar.xz
|
||||
/lld-10.0.0rc6.src.tar.xz.sig
|
||||
/lld-10.0.0.src.tar.xz
|
||||
/lld-10.0.0.src.tar.xz.sig
|
||||
/lld-11.0.0rc1.src.tar.xz
|
||||
/lld-11.0.0rc1.src.tar.xz.sig
|
||||
/lld-11.0.0rc2.src.tar.xz
|
||||
/lld-11.0.0rc2.src.tar.xz.sig
|
||||
/lld-11.0.0rc3.src.tar.xz
|
||||
/lld-11.0.0rc3.src.tar.xz.sig
|
||||
/lld-11.0.0rc5.src.tar.xz
|
||||
/lld-11.0.0rc5.src.tar.xz.sig
|
||||
/lld-11.0.0rc6.src.tar.xz
|
||||
/lld-11.0.0rc6.src.tar.xz.sig
|
||||
/lld-11.0.0.src.tar.xz
|
||||
/lld-11.0.0.src.tar.xz.sig
|
@ -0,0 +1,47 @@
|
||||
From e5bdf4580677da063abe8d3880fbab9eaa7a7efe Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Thu, 30 Aug 2018 08:53:56 -0700
|
||||
Subject: [PATCH] CMake: Check for gtest headers even if lit.py is not present
|
||||
|
||||
This makes it possible to build the unittests even withotu a full
|
||||
checkout of the llvm source tree.
|
||||
---
|
||||
CMakeLists.txt | 15 +++++++++------
|
||||
1 file changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e2fbdbf..c9b2927 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -75,6 +75,15 @@ Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
|
||||
set(LLVM_UTILS_PROVIDED ON)
|
||||
endif()
|
||||
|
||||
+ # Check for gtest
|
||||
+ set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
|
||||
+ if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
|
||||
+ AND NOT EXISTS ${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
+ AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
|
||||
+ add_subdirectory(${UNITTEST_DIR} utils/unittest)
|
||||
+ endif()
|
||||
+
|
||||
+ # Check for lit
|
||||
if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
|
||||
# Note: path not really used, except for checking if lit was found
|
||||
set(LLVM_LIT ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
|
||||
@@ -84,12 +93,6 @@ Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
|
||||
set(LLVM_UTILS_PROVIDED ON)
|
||||
set(LLD_TEST_DEPS FileCheck not)
|
||||
endif()
|
||||
- set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
|
||||
- if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
|
||||
- AND NOT EXISTS ${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
- AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
|
||||
- add_subdirectory(${UNITTEST_DIR} utils/unittest)
|
||||
- endif()
|
||||
else()
|
||||
# Seek installed Lit.
|
||||
find_program(LLVM_LIT
|
||||
--
|
||||
1.8.3.1
|
||||
|
48
0001-ELF-Only-unlink-regular-files.patch
Normal file
48
0001-ELF-Only-unlink-regular-files.patch
Normal file
@ -0,0 +1,48 @@
|
||||
From d146e98b7f94940386f60a902031b2a9b6237730 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Tue, 4 Jul 2017 16:03:34 +0000
|
||||
Subject: [PATCH] ELF: Only unlink regular files
|
||||
|
||||
Summary:
|
||||
If the output file is a character file (e.g. /dev/null) unlinking it could
|
||||
potentially destabilize the user's system. For example,
|
||||
unlinking causes `lld %input -o /dev/null` to replace /dev/null with a
|
||||
regular file, which will lead to unexpected behavior in other programs
|
||||
that read from /dev/null, and worse than expected peformance for
|
||||
programs that write to /dev/null.
|
||||
|
||||
This makes it possible to run the test-release.sh script as root.
|
||||
Prior to this patch, the ELF/basic.s test would replace
|
||||
/dev/null with a regular file, which would cause crashes in llvm
|
||||
test-suite programs that piped /dev/null to stdin.
|
||||
|
||||
For example, if you run the test-relase.sh script as root,
|
||||
|
||||
Reviewers: ruiu
|
||||
|
||||
Reviewed By: ruiu
|
||||
|
||||
Subscribers: emaste, llvm-commits
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D34917
|
||||
---
|
||||
ELF/Writer.cpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ELF/Writer.cpp b/ELF/Writer.cpp
|
||||
index b004a4f..d52165b 100644
|
||||
--- a/ELF/Writer.cpp
|
||||
+++ b/ELF/Writer.cpp
|
||||
@@ -1650,7 +1650,8 @@ template <class ELFT> void Writer<ELFT>::writeHeader() {
|
||||
// This function spawns a background thread to call unlink.
|
||||
// The calling thread returns almost immediately.
|
||||
static void unlinkAsync(StringRef Path) {
|
||||
- if (!Config->Threads || !sys::fs::exists(Config->OutputFile))
|
||||
+ if (!Config->Threads || !sys::fs::exists(Config->OutputFile) ||
|
||||
+ !sys::fs::is_regular_file(Config->OutputFile))
|
||||
return;
|
||||
|
||||
// First, rename Path to avoid race condition. We cannot remove
|
||||
--
|
||||
1.8.3.1
|
||||
|
0
0001-PATCH-llvm-config.patch
Normal file
0
0001-PATCH-llvm-config.patch
Normal file
7986
0001-Revert-lld-Initial-commit-for-new-Mach-O-backend.patch
Normal file
7986
0001-Revert-lld-Initial-commit-for-new-Mach-O-backend.patch
Normal file
File diff suppressed because it is too large
Load Diff
12
gating.yaml
Normal file
12
gating.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_testing
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_stable
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
52
hans-gpg-key.asc
Normal file
52
hans-gpg-key.asc
Normal file
@ -0,0 +1,52 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBFS+1SABEACnmkESkY7eZq0GhDjbkWpKmURGk9+ycsfAhA44NqUvf4tk1GPM
|
||||
5SkJ/fYedYZJaDVhIp98fHgucD0O+vjOzghtgwtITusYjiPHPFBd/MN+MQqSEAP+
|
||||
LUa/kjHLjgyXxKhFUIDGVaDWL5tKOA7/AQKl1TyJ8lz89NHQoUHFsF/hu10+qhJe
|
||||
V65d32MXFehIUSvegh8DrPuExrliSiORO4HOhuc6151dWA4YBWVg4rX5kfKrGMMT
|
||||
pTWnSSZtgoRhkKW2Ey8cmZUqPuUJIfWyeNVu1e4SFtAivLvu/Ymz2WBJcNA1ZlTr
|
||||
RCOR5SIRgZ453pQnI/Bzna2nnJ/TV1gGJIGRahj/ini0cs2x1CILfS/YJQ3rWGGo
|
||||
OxwG0BVmPk0cmLVtyTq8gUPwxcPUd6WcBKhot3TDMlrffZACnQwQjlVjk5S1dEEz
|
||||
atUfpEuNitU9WOM4jr/gjv36ZNCOWm95YwLhsuci/NddBN8HXhyvs+zYTVZEXa2W
|
||||
l/FqOdQsQqZBcJjjWckGKhESdd7934+cesGD3O8KaeSGxww7slJrS0+6QJ8oBoAB
|
||||
P/WCn/y2AiY2syEKp3wYIGJyAbsm542zMZ4nc7pYfSu49mcyhQQICmqN5QvOyYUx
|
||||
OSqwbAOUNtlOyeRLZNIKoXtTqWDEu5aEiDROTw6Rkq+dIcxPNgOLdeQ3HwAR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Ei5avJ4WgIbTLJUoZMi70riPmU8ThjpzA7S+Nk0g7rMPq+X
|
||||
l1whjKU/u0udlsrIJjzkh6ftqKUmIkbxYTpjhnEujNrEr5m2S6Z6x3y9E5QagBMR
|
||||
dxRhfk+HbyACcP/p9rXOzl4M291DoKeAAH70GHniGxyNs9rAoMr/hD5XW/Wrz3dc
|
||||
KMc2s555E6MZILE2ZiolcRn+bYOMPZtWlbx98t8uqMf49gY4FGQBZAwPglMrx7mr
|
||||
m7HTIiXahThQGOJg6izJDAD5RwSEGlAcL28T8KAuM6CLLkhlBfQwiKsUBNnh9r8w
|
||||
V3lB+pV0GhL+3i077gTYfZBRwLzjFdhm9xUKEaZ6rN1BX9lzix4eSNK5nln0jUq1
|
||||
67H2IH//2sf8dw==
|
||||
=ADVe
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
12
lit.lld-test.cfg.py
Normal file
12
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)
|
407
lld.spec
Normal file
407
lld.spec
Normal file
@ -0,0 +1,407 @@
|
||||
#%%global rc_ver 6
|
||||
%global baserelease 1
|
||||
%global lld_srcdir lld-%{version}%{?rc_ver:rc%{rc_ver}}.src
|
||||
%global maj_ver 11
|
||||
%global min_ver 0
|
||||
%global patch_ver 0
|
||||
|
||||
# Don't include unittests in automatic generation of provides or requires.
|
||||
%global __provides_exclude_from ^%{_libdir}/lld/.*$
|
||||
%global __requires_exclude ^libgtest.*$
|
||||
|
||||
Name: lld
|
||||
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
|
||||
Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist}
|
||||
Summary: The LLVM Linker
|
||||
|
||||
License: NCSA
|
||||
URL: http://llvm.org
|
||||
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{lld_srcdir}.tar.xz
|
||||
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{lld_srcdir}.tar.xz.sig
|
||||
Source2: https://prereleases.llvm.org/%{version}/hans-gpg-key.asc
|
||||
Source3: run-lit-tests
|
||||
Source4: lit.lld-test.cfg.py
|
||||
|
||||
Patch0: 0001-CMake-Check-for-gtest-headers-even-if-lit.py-is-not-.patch
|
||||
Patch1: 0001-Revert-lld-Initial-commit-for-new-Mach-O-backend.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: cmake
|
||||
BuildRequires: ninja-build
|
||||
BuildRequires: llvm-devel = %{version}
|
||||
BuildRequires: llvm-test = %{version}
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: zlib-devel
|
||||
|
||||
# For make check:
|
||||
BuildRequires: python3-rpm-macros
|
||||
BuildRequires: python3-lit
|
||||
BuildRequires: llvm-googletest = %{version}
|
||||
|
||||
# For gpg source verification
|
||||
BuildRequires: gnupg2
|
||||
|
||||
Requires(post): %{_sbindir}/update-alternatives
|
||||
Requires(preun): %{_sbindir}/update-alternatives
|
||||
|
||||
Requires: lld-libs = %{version}-%{release}
|
||||
|
||||
%description
|
||||
The LLVM project linker.
|
||||
|
||||
%package devel
|
||||
Summary: Libraries and header files for LLD
|
||||
Requires: lld-libs%{?_isa} = %{version}-%{release}
|
||||
# lld tools are referenced in the cmake files, so we need to add lld as a
|
||||
# dependency.
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
This package contains library and header files needed to develop new native
|
||||
programs that use the LLD infrastructure.
|
||||
|
||||
%package libs
|
||||
Summary: LLD shared libraries
|
||||
|
||||
%description libs
|
||||
Shared libraries for LLD.
|
||||
|
||||
%package test
|
||||
Summary: LLD regression tests
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: python3-lit
|
||||
Requires: llvm-test(major) = %{maj_ver}
|
||||
Requires: lld-libs = %{version}-%{release}
|
||||
|
||||
%description test
|
||||
LLVM regression tests.
|
||||
|
||||
%prep
|
||||
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
||||
%setup -q -n %{lld_srcdir}
|
||||
|
||||
%patch0 -p1 -b .gtest-fix
|
||||
# Remove the MachO backend since it doesn't seem to work on big-endian hosts.
|
||||
%ifarch s390x
|
||||
%patch1 -p2 -b .remove-MachO
|
||||
%endif
|
||||
|
||||
|
||||
%build
|
||||
|
||||
# Disable lto since it causes the COFF/libpath.test lit test to crash.
|
||||
%global _lto_cflags %{nil}
|
||||
|
||||
%cmake \
|
||||
-GNinja \
|
||||
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
|
||||
-DLLVM_DYLIB_COMPONENTS="all" \
|
||||
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
||||
-DPYTHON_EXECUTABLE=%{__python3} \
|
||||
-DLLVM_INCLUDE_TESTS=ON \
|
||||
-DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \
|
||||
-DLLVM_EXTERNAL_LIT=%{_bindir}/lit \
|
||||
-DLLVM_LIT_ARGS="-sv \
|
||||
--path %{_libdir}/llvm" \
|
||||
%if 0%{?__isa_bits} == 64
|
||||
-DLLVM_LIBDIR_SUFFIX=64
|
||||
%else
|
||||
-DLLVM_LIBDIR_SUFFIX=
|
||||
%endif
|
||||
|
||||
%cmake_build
|
||||
|
||||
# Build the unittests so we can install them.
|
||||
%cmake_build --target lld-test-depends
|
||||
|
||||
%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 %{SOURCE4} %{buildroot}%{_datadir}/lld/
|
||||
|
||||
# The various tar options are there to make sur the archive is the same on 32 and 64 bit arch, i.e.
|
||||
# the archive creation is reproducible. Move arch-specific content out of the tarball
|
||||
mv %{lit_cfg} %{buildroot}%{_datadir}/lld/src/%{_arch}.site.cfg.py
|
||||
mv %{lit_unit_cfg} %{buildroot}%{_datadir}/lld/src/%{_arch}.Unit.site.cfg.py
|
||||
tar --sort=name --mtime='UTC 2020-01-01' -c test/ | gzip -n > %{buildroot}%{_datadir}/lld/src/test.tar.gz
|
||||
|
||||
install -d %{buildroot}%{_libexecdir}/tests/lld
|
||||
cp %{SOURCE3} %{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
|
||||
%cmake_install
|
||||
|
||||
# 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
|
||||
|
||||
%check
|
||||
|
||||
# armv7lhl tests disabled because of arm issue, see https://koji.fedoraproject.org/koji/taskinfo?taskID=33660162
|
||||
%ifnarch %{arm}
|
||||
%cmake_build --target check-lld
|
||||
%endif
|
||||
|
||||
%ldconfig_scriptlets libs
|
||||
|
||||
%files
|
||||
%license LICENSE.TXT
|
||||
%ghost %{_bindir}/ld
|
||||
%{_bindir}/lld*
|
||||
%{_bindir}/ld.lld
|
||||
%{_bindir}/ld64.lld
|
||||
%{_bindir}/wasm-ld
|
||||
|
||||
%files devel
|
||||
%{_includedir}/lld
|
||||
%{_libdir}/liblld*.so
|
||||
%{_libdir}/cmake/lld/
|
||||
|
||||
%files libs
|
||||
%{_libdir}/liblld*.so.*
|
||||
|
||||
%files test
|
||||
%{_libexecdir}/tests/lld/
|
||||
%{_libdir}/lld/
|
||||
%{_datadir}/lld/src/test.tar.gz
|
||||
%{_datadir}/lld/src/%{_arch}.site.cfg.py
|
||||
%{_datadir}/lld/src/%{_arch}.Unit.site.cfg.py
|
||||
%{_datadir}/lld/lit.lld-test.cfg.py
|
||||
|
||||
%changelog
|
||||
* Thu Oct 15 2020 sguelton@redhat.com - 11.0.0-1
|
||||
- Fix NVR
|
||||
|
||||
* Mon Oct 12 2020 sguelton@redhat.com - 11.0.0-0.6
|
||||
- llvm 11.0.0 - final release
|
||||
|
||||
* Thu Oct 08 2020 sguelton@redhat.com - 11.0.0-0.5.rc6
|
||||
- 11.0.0-rc6
|
||||
|
||||
* Wed Oct 07 2020 sguelton@redhat.com - 11.0.0-0.4.rc5
|
||||
- Update CI tests
|
||||
|
||||
* Fri Oct 02 2020 sguelton@redhat.com - 11.0.0-0.3.rc5
|
||||
- 11.0.0-rc5 Release
|
||||
|
||||
* Sun Sep 27 2020 sguelton@redhat.com - 11.0.0-0.2.rc3
|
||||
- Fix NVR
|
||||
|
||||
* Thu Sep 24 2020 sguelton@redhat.com - 11.0.0-0.1.rc3
|
||||
- 11.0.0-rc3 Release
|
||||
|
||||
* Tue Sep 01 2020 sguelton@redhat.com - 11.0.0-0.1.rc2
|
||||
- 11.0.0-rc2 Release
|
||||
|
||||
* Mon Aug 10 2020 Tom Stellard <tstellar@redhat.com> - 11.0.0-0.1.rc1
|
||||
- 11.0.0-rc1 Release
|
||||
|
||||
* Mon Aug 10 2020 sguelton@redhat.com - 10.0.0-7
|
||||
- use %%license macro
|
||||
|
||||
* Mon Aug 10 2020 Tom Stellard <tstellar@redhat.com> - 10.0.0-6
|
||||
- Disable LTO
|
||||
|
||||
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 10.0.0-5
|
||||
- Second attempt - Rebuilt for
|
||||
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 10.0.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Mon Jul 20 2020 sguelton@redhat.com - 10.0.0-3
|
||||
- Use generic cmake macros
|
||||
- Use Ninja as build system
|
||||
- Remove chrpath dependency
|
||||
|
||||
* Fri Jul 17 2020 sguelton@redhat.com - 10.0.0-2
|
||||
- Make test archive arch-independent
|
||||
|
||||
* Mon Mar 30 2020 sguelton@redhat.com - 10.0.0-1
|
||||
- 10.0.0 final
|
||||
|
||||
* Wed Mar 25 2020 sguelton@redhat.com - 10.0.0-0.6.rc6
|
||||
- 10.0.0 rc6
|
||||
|
||||
* Fri Mar 20 2020 sguelton@redhat.com - 10.0.0-0.5.rc5
|
||||
- 10.0.0 rc5
|
||||
|
||||
* Sun Mar 15 2020 sguelton@redhat.com - 10.0.0-0.4.rc4
|
||||
- 10.0.0 rc4
|
||||
|
||||
* Thu Mar 05 2020 sguelton@redhat.com - 10.0.0-0.3.rc3
|
||||
- 10.0.0 rc3
|
||||
|
||||
* Fri Feb 14 2020 sguelton@redhat.com - 10.0.0-0.2.rc2
|
||||
- 10.0.0 rc2
|
||||
|
||||
* Fri Jan 31 2020 sguelton@redhat.com - 10.0.0-0.1.rc1
|
||||
- 10.0.0 rc1
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 9.0.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Thu Dec 19 2019 Tom Stellard <tstellar@redhat.com> -9.0.1-1
|
||||
- 9.0.1 Release
|
||||
|
||||
* Sat Dec 14 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-6
|
||||
- Fix some rpmdiff errors
|
||||
|
||||
* Fri Dec 13 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-5
|
||||
- Remove build artifacts installed with unittests
|
||||
|
||||
* Thu Dec 05 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-4
|
||||
- Enable GPG-based source file verification
|
||||
|
||||
* 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 19 2019 Tom Stellard <tstellar@redhat.com> -9.0.0-1
|
||||
- 9.0.0 Release
|
||||
|
||||
* Thu Aug 22 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-0.1.rc3
|
||||
- 9.0.0-rc3 Release
|
||||
|
||||
* Tue Aug 20 2019 Tom Stellard <tstellar@redhat.com> - 8.0.0-3
|
||||
- touch /usr/bin/ld as required by the packaging guidelines for
|
||||
update-alternatives
|
||||
|
||||
* Tue Aug 13 2019 Tom Stellard <tstellar@redhat.com> - 8.0.0-2
|
||||
- Add update-alternative for ld
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.0-1.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Wed Mar 20 2019 sguelton@redhat.com - 8.0.0-1
|
||||
- 8.0.0 final
|
||||
|
||||
* Tue Mar 12 2019 sguelton@redhat.com - 8.0.0-0.4.rc4
|
||||
- 8.0.0 Release candidate 4
|
||||
|
||||
* Tue Mar 5 2019 sguelton@redhat.com - 8.0.0-0.4.rc3
|
||||
- Cleanup specfile after llvm specfile update
|
||||
|
||||
* Mon Mar 4 2019 sguelton@redhat.com - 8.0.0-0.3.rc3
|
||||
- 8.0.0 Release candidate 3
|
||||
|
||||
* Fri Feb 22 2019 sguelton@redhat.com - 8.0.0-0.2.rc2
|
||||
- 8.0.0 Release candidate 2
|
||||
|
||||
* Mon Feb 11 2019 sguelton@redhat.com - 8.0.0-0.1.rc1
|
||||
- 8.0.0 Release candidate 1
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.1-3.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Mon Jan 14 2019 sguelton@redhat.com - 7.0.1-3
|
||||
- Fix lld + annobin integration & Setup basic CI tests
|
||||
|
||||
* Mon Dec 17 2018 sguelton@redhat.com - 7.0.1-2
|
||||
- Update lit dependency
|
||||
|
||||
* Mon Dec 17 2018 sguelton@redhat.com - 7.0.1-1
|
||||
- 7.0.1 Release
|
||||
|
||||
* Tue Dec 04 2018 sguelton@redhat.com - 7.0.0-2
|
||||
- Ensure rpmlint passes on specfile
|
||||
|
||||
* Mon Sep 24 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-1
|
||||
- 7.0.1 Release
|
||||
|
||||
* Tue Sep 11 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.4.rc3
|
||||
- 7.0.0-rc3 Release
|
||||
|
||||
* Fri Aug 31 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.3.rc2
|
||||
- 7.0.0-rc2 Release
|
||||
|
||||
* Thu Aug 30 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.2.rc1
|
||||
- Enable make check
|
||||
|
||||
* Mon Aug 13 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.1.rc1
|
||||
- 7.0.0-rc1 Release
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Wed Jun 27 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-1
|
||||
- 6.0.1 Release
|
||||
|
||||
* Fri May 11 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-0.1.rc1
|
||||
- 6.0.1-rc1 Release
|
||||
|
||||
* Thu Mar 08 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-1
|
||||
- 6.0.0 Release
|
||||
|
||||
* Tue Feb 13 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.3.rc2
|
||||
- 6.0.0-rc2 Release
|
||||
|
||||
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-0.2.rc1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Thu Jan 25 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.1.rc1
|
||||
- 6.0.0-rc1 Release
|
||||
|
||||
* Thu Dec 21 2017 Tom Stellard <tstellar@redhat.com> - 5.0.1-1
|
||||
- 5.0.1 Release
|
||||
|
||||
* Mon Sep 11 2017 Tom Stellard <tstellar@redhat.com> - 5.0.0-1
|
||||
- 5.0.0 Release
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Thu Jul 06 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-2
|
||||
- Backport r307092
|
||||
|
||||
* Tue Jul 04 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-1
|
||||
- 4.0.1 Release
|
||||
|
||||
* Tue Jul 04 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-4
|
||||
- Fix build without llvm-static
|
||||
|
||||
* Wed May 31 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-3
|
||||
- Remove llvm-static dependency
|
||||
|
||||
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
|
||||
|
||||
* Tue Mar 14 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-1
|
||||
- lld 4.0.0 Final Release
|
66
run-lit-tests
Normal file
66
run-lit-tests
Normal 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 /usr/share/lld/src/$ARCH.site.cfg.py test/lit.site.cfg.py
|
||||
ln -s /usr/share/lld/src/$ARCH.Unit.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
|
2
sources
Normal file
2
sources
Normal file
@ -0,0 +1,2 @@
|
||||
SHA512 (lld-11.0.0.src.tar.xz) = 35c6bdd435942696a1d0deedf3606c30bde8b9bf83d856c218fb875b4caebee3e8956a75155d463d666ee56f08ff8e1909548bfdccdd41ddf3d4a2e0c26b5ba2
|
||||
SHA512 (lld-11.0.0.src.tar.xz.sig) = 05d5c730ef12a4eae27c60d4449140dc7fef818a9add722dfea6281452ef14956c4419cc2e623a69c0e31c25c0c4d3d6a394d2ee4bd901dd9cafcaf3bf460169
|
32
tests/ld-alternative/runtest.sh
Executable file
32
tests/ld-alternative/runtest.sh
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This test assumes lld is already installed.
|
||||
|
||||
set -ex
|
||||
|
||||
function verify_ld_bfd {
|
||||
|
||||
# Verify that /usr/bin/ld points to ld.bfd.
|
||||
ls -l /etc/alternatives/ld | grep ld.bfd
|
||||
|
||||
# Run ld and verify it invokes ld.bfd
|
||||
/usr/bin/ld --version | grep 'GNU ld'
|
||||
}
|
||||
|
||||
|
||||
# Verify ld.bfd is still the system linker when lld is installed
|
||||
verify_ld_bfd
|
||||
|
||||
# Set lld as the system linker
|
||||
update-alternatives --set ld /usr/bin/ld.lld
|
||||
|
||||
# Verify that /usr/bin/ld points to lld
|
||||
ls -l /etc/alternatives/ld | grep ld.lld
|
||||
|
||||
# Run ld and verify it invokes lld
|
||||
/usr/bin/ld --version | grep 'LLD'
|
||||
|
||||
# Uninstall lld and make sure the /usr/bin/ld is reset to ld.bfd
|
||||
dnf -y remove --noautoremove lld
|
||||
|
||||
verify_ld_bfd
|
8
tests/lit-tests/runtest.sh
Normal file
8
tests/lit-tests/runtest.sh
Normal file
@ -0,0 +1,8 @@
|
||||
set -ex
|
||||
|
||||
|
||||
if ! id -u lld; then
|
||||
useradd lld
|
||||
fi
|
||||
|
||||
su lld -c 'bash /usr/libexec/tests/lld/run-lit-tests --threads 1'
|
14
tests/tests-ld-alternative.yml
Normal file
14
tests/tests-ld-alternative.yml
Normal file
@ -0,0 +1,14 @@
|
||||
# The ld-alternative test uninstalls lld, so it needs to be run by
|
||||
# itself in a separate .yml file so it doesn't modify the test
|
||||
# environment for other tests.
|
||||
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
required_packages:
|
||||
- binutils
|
||||
- lld
|
||||
tests:
|
||||
- ld-alternative
|
19
tests/tests.yml
Normal file
19
tests/tests.yml
Normal file
@ -0,0 +1,19 @@
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
required_packages:
|
||||
- lld
|
||||
- clang
|
||||
- gcc
|
||||
- lld-test
|
||||
tests:
|
||||
- basic:
|
||||
dir: ./
|
||||
run: echo "int main(){ return 0; }" | clang -x c -fuse-ld=lld -
|
||||
- gcc-compat-basic:
|
||||
dir: ./
|
||||
run: echo "int main(){ return 0; }" | gcc -x c -fuse-ld=lld -
|
||||
# Causes filesystem issues on Fedora CI
|
||||
# - lit-tests
|
BIN
tstellar-gpg-key.asc
Normal file
BIN
tstellar-gpg-key.asc
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user