From 9ade9818c1ec247147316971b33cdf47fc98e1a7 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Wed, 13 Feb 2019 15:57:08 +0000 Subject: [PATCH] 8.0.0rc1 --- .gitignore | 1 + 0001-PATCH-llvm-config.patch | 0 ...al-support-of-SHT_GROUP-without-flag.patch | 25 +++++++++++-------- lld.spec | 16 +++++++++--- sources | 2 +- 5 files changed, 29 insertions(+), 15 deletions(-) create mode 100644 0001-PATCH-llvm-config.patch diff --git a/.gitignore b/.gitignore index 5788433..7a9a10c 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /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 diff --git a/0001-PATCH-llvm-config.patch b/0001-PATCH-llvm-config.patch new file mode 100644 index 0000000..e69de29 diff --git a/0001-Partial-support-of-SHT_GROUP-without-flag.patch b/0001-Partial-support-of-SHT_GROUP-without-flag.patch index c060ba3..218da0a 100644 --- a/0001-Partial-support-of-SHT_GROUP-without-flag.patch +++ b/0001-Partial-support-of-SHT_GROUP-without-flag.patch @@ -1,7 +1,7 @@ -diff -r -u --new-file lld-7.0.1.src.orig/ELF/InputFiles.cpp lld-7.0.1.src/ELF/InputFiles.cpp ---- lld-7.0.1.src.orig/ELF/InputFiles.cpp 2019-01-25 10:12:56.412850573 +0000 -+++ lld-7.0.1.src/ELF/InputFiles.cpp 2019-01-25 10:14:50.557726268 +0000 -@@ -324,17 +324,6 @@ +diff -ru --new-file lld-8.0.0rc1.src.orig/ELF/InputFiles.cpp lld-8.0.0rc1.src/ELF/InputFiles.cpp +--- lld-8.0.0rc1.src.orig/ELF/InputFiles.cpp 2019-02-12 08:09:21.746416886 +0000 ++++ lld-8.0.0rc1.src/ELF/InputFiles.cpp 2019-02-13 10:41:49.565275043 +0000 +@@ -320,17 +320,6 @@ return Signature; } @@ -19,13 +19,17 @@ diff -r -u --new-file lld-7.0.1.src.orig/ELF/InputFiles.cpp lld-7.0.1.src/ELF/In template bool ObjFile::shouldMerge(const Elf_Shdr &Sec) { // On a regular link we don't merge sections if -O0 (default is -O1). This // sometimes makes the linker significantly faster, although the output will -@@ -439,22 +428,33 @@ +@@ -440,18 +429,24 @@ case SHT_GROUP: { // De-duplicate section groups by their signatures. StringRef Signature = getShtGroupSignature(ObjSections, Sec); - bool IsNew = ComdatGroups.insert(CachedHashStringRef(Signature)).second; this->Sections[I] = &InputSection::Discarded; +- // We only support GRP_COMDAT type of group. Get the all entries of the +- // section here to let getShtGroupEntries to check the type early for us. +- ArrayRef Entries = getShtGroupEntries(Sec); +- - // If it is a new section group, we want to keep group members. - // Group leader sections, which contain indices of group members, are - // discarded because they are useless beyond this point. The only @@ -50,19 +54,18 @@ diff -r -u --new-file lld-7.0.1.src.orig/ELF/InputFiles.cpp lld-7.0.1.src/ELF/In if (IsNew) { if (Config->Relocatable) this->Sections[I] = createInputSection(Sec); - continue; +@@ -459,7 +454,7 @@ } -+ // Otherwise, discard group members. -- for (uint32_t SecIndex : getShtGroupEntries(Sec)) { +- for (uint32_t SecIndex : Entries) { + for (uint32_t SecIndex : Entries.slice(1)) { if (SecIndex >= Size) fatal(toString(this) + ": invalid section index in group: " + Twine(SecIndex)); -diff -r -u --new-file lld-7.0.1.src.orig/test/ELF/sht-group-empty.test lld-7.0.1.src/test/ELF/sht-group-empty.test ---- lld-7.0.1.src.orig/test/ELF/sht-group-empty.test 1970-01-01 00:00:00.000000000 +0000 -+++ lld-7.0.1.src/test/ELF/sht-group-empty.test 2019-01-25 10:13:19.312026250 +0000 +diff -ru --new-file lld-8.0.0rc1.src.orig/test/ELF/sht-group-empty.test lld-8.0.0rc1.src/test/ELF/sht-group-empty.test +--- lld-8.0.0rc1.src.orig/test/ELF/sht-group-empty.test 1970-01-01 00:00:00.000000000 +0000 ++++ lld-8.0.0rc1.src/test/ELF/sht-group-empty.test 2019-02-13 10:40:11.958253274 +0000 @@ -0,0 +1,55 @@ +# RUN: yaml2obj %s -o %t.o +# RUN: ld.lld %t.o %t.o -o %t -r diff --git a/lld.spec b/lld.spec index c224b9b..447e187 100644 --- a/lld.spec +++ b/lld.spec @@ -1,9 +1,9 @@ -#%%global rc_ver 3 +%global rc_ver 1 %global lld_srcdir lld-%{version}%{?rc_ver:rc%{rc_ver}}.src Name: lld -Version: 7.0.1 -Release: 3%{?rc_ver:.rc%{rc_ver}}%{?dist}.1 +Version: 8.0.0 +Release: 1%{?rc_ver:.rc%{rc_ver}}%{?dist} Summary: The LLVM Linker License: NCSA @@ -58,6 +58,7 @@ cd %{_target_platform} -DLLVM_INCLUDE_TESTS=ON \ -DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \ -DLLVM_EXTERNAL_LIT=%{_bindir}/lit \ + -DLLVM_TABLEGEN_EXE=%{_libdir}/llvm/llvm-tblgen\ -DLLVM_LIT_ARGS="-sv \ -DFileCheck=%{_libdir}/llvm/FileCheck \ -Dcount=%{_libdir}/llvm/count \ @@ -79,6 +80,12 @@ cd %{_target_platform} chrpath --delete %{buildroot}%{_bindir}/* chrpath --delete %{buildroot}%{_libdir}/*.so* +for target in ld.lld ld64.lld wasm-ld +do + ln -s lld %{buildroot}%{_bindir}/${target} +done + + %check make -C %{_target_platform} %{?_smp_mflags} check-lld @@ -98,6 +105,9 @@ make -C %{_target_platform} %{?_smp_mflags} check-lld %{_libdir}/liblld*.so.* %changelog +* Mon Feb 11 2019 sguelton@redhat.com - 8.0.0-1.rc1 +- 8.0.0 Release candidate 1 + * Fri Feb 01 2019 Fedora Release Engineering - 7.0.1-3.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 5d4895e..904f4f3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (lld-7.0.1.src.tar.xz) = e5d3ed280d8ac6014cd6bbe080b11e2c4ebbae81dc14b637e779ec027d818dbae91c6f0de9e94bcecd6bdaa37f12c35141b5d81f0a15251d27932aa9bebd4047 +SHA512 (lld-8.0.0rc1.src.tar.xz) = d766fc989132a34b0d975da02897fee40e9a4cb0027333c2bf5fde5311e78bccc813185d2afb32203f639003e34a9c042f546d3e9a5f709faa995dd5f4b54700