pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/lld lld: updated to 8.0.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b7b9fecdebaa
branches:  trunk
changeset: 334660:b7b9fecdebaa
user:      adam <adam%pkgsrc.org@localhost>
date:      Sun Jun 02 08:37:39 2019 +0000

description:
lld: updated to 8.0.0

lld 8.0.0:

Non-comprehensive list of changes in this release

ELF Improvements
* lld now supports RISC-V. (r339364)
* Default image base address has changed from 65536 to 2 MiB for i386 and 4 MiB for AArch64 to make lld-generated executables work better with automatic superpage promotion. FreeBSD can promote 
contiguous non-superpages to a superpage if they are aligned to the superpage size. (r342746)
* lld now attempts to place a .note segment in the first page of a generated file, so that you can find some important information (.note.gnu.build-id in particular) in a core file even if a core 
file is truncated by ulimit. (r349524)
* lld now reports an error if _GLOBAL_OFFSET_TABLE_ symbol is defined by an input object file, as the symbol is supposed to be synthesized by the linker. (r347854)
* lld/Hexagon can now link Linux kernel and musl libc for Qualcomm Hexagon ISA.
* Initial MSP430 ISA support has landed.
* lld now uses the sigrie instruction as a trap instruction for MIPS targets.
* lld now creates a TLS segment for AArch64 with a slightly larger alignment requirement, so that the loader makes a few bytes room before each TLS segment at runtime. The aim of this change is to 
make room to accomodate nonstandard Android TLS slots while keeping the compatibility with the standard AArch64 ABI. (r350681)
* The following flags have been added: --call-graph-profile, --no-call-graph-profile, --warn-ifunc-textrel, -z interpose, -z global, -z nodefaultlib

COFF Improvements
* PDB GUID is set to hash of PDB contents instead to a random byte sequence for build reproducibility.
* /pdbsourcepath: is now also used to make "cwd", "exe", "pdb" in the env block of PDB outputs absolute if they are relative, and to make paths to obj files referenced in PDB outputs absolute if they 
are relative. Together with the previous item, this makes it possible to generate executables and PDBs that are fully deterministic and independent of the absolute path to the build directory, so 
that different machines building the same code in different directories can produce exactly the same output.
* The following flags have been added: /force:multiple
* lld now can link against import libraries produced by GNU tools.
* lld can create thunks for ARM and ARM64, to allow linking larger images (over 16 MB for ARM and over 128 MB for ARM64)
* Several speed and memory usage improvements.
* lld now creates debug info for typedefs.
* lld can now link obj files produced by cl.exe /Z7 /Yc.
* lld now understands %_PDB% and %_EXT% in /pdbaltpath:.
* Undefined symbols are now printed in demangled form in addition to raw form.

MinGW Improvements
* lld can now automatically import data variables from DLLs without the use of the dllimport attribute.
* lld can now use existing normal MinGW sysroots with import libraries and CRT startup object files for GNU binutils. lld can handle most object files produced by GCC, and thus works as a drop-in 
replacement for ld.bfd in such environments. (There are known issues with linking crtend.o from GCC in setups with DWARF exceptions though, where object files are linked in a different order than 
with GNU ld, inserting a DWARF exception table terminator too early.)
* lld now supports COFF embedded directives for linking to nondefault libraries, just like for the normal COFF target.
* Actually generate a codeview build id signature, even if not creating a PDB. Previously, the --build-id option did not actually generate a build id unless --pdb was specified.

WebAssembly Improvements
* Add initial support for creating shared libraries (-shared). Note: The shared library format is still under active development and may undergo significant changes in future versions. See: 
https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md

diffstat:

 devel/lld/Makefile                     |  22 +++----
 devel/lld/buildlink3.mk                |   4 +-
 devel/lld/distinfo                     |  20 +++----
 devel/lld/patches/patch-ELF_Config.h   |  10 +-
 devel/lld/patches/patch-ELF_Driver.cpp |  86 +++++++--------------------------
 devel/lld/patches/patch-docs_ld.lld.1  |   8 +-
 6 files changed, 48 insertions(+), 102 deletions(-)

diffs (297 lines):

diff -r c514871f5e23 -r b7b9fecdebaa devel/lld/Makefile
--- a/devel/lld/Makefile        Sun Jun 02 08:35:55 2019 +0000
+++ b/devel/lld/Makefile        Sun Jun 02 08:37:39 2019 +0000
@@ -1,17 +1,15 @@
-# $NetBSD: Makefile,v 1.3 2019/04/26 15:33:08 schmonz Exp $
+# $NetBSD: Makefile,v 1.4 2019/06/02 08:37:39 adam Exp $
 
-PKGNAME=               lld-7.0.1
-PKGREVISION=           1
-DISTNAME=              ${PKGNAME_NOREV}.src
-CATEGORIES=            devel
-MASTER_SITES=          http://llvm.org/releases/${PKGVERSION_NOREV}/
-EXTRACT_SUFX=          .tar.xz
-DISTFILES=             ${DEFAULT_DISTFILES}
+DISTNAME=      lld-8.0.0.src
+PKGNAME=       ${DISTNAME:S/.src//}
+CATEGORIES=    devel
+MASTER_SITES=  http://llvm.org/releases/${PKGVERSION_NOREV}/
+EXTRACT_SUFX=  .tar.xz
 
-MAINTAINER=            mgorny%NetBSD.org@localhost
-HOMEPAGE=              http://lld.llvm.org/
-COMMENT=               The LLVM Linker
-LICENSE=               modified-bsd
+MAINTAINER=    mgorny%NetBSD.org@localhost
+HOMEPAGE=      http://lld.llvm.org/
+COMMENT=       The LLVM Linker
+LICENSE=       modified-bsd
 
 USE_LANGUAGES=         c c++11
 USE_CMAKE=             yes
diff -r c514871f5e23 -r b7b9fecdebaa devel/lld/buildlink3.mk
--- a/devel/lld/buildlink3.mk   Sun Jun 02 08:35:55 2019 +0000
+++ b/devel/lld/buildlink3.mk   Sun Jun 02 08:37:39 2019 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: buildlink3.mk,v 1.1 2019/02/01 16:30:00 mgorny Exp $
+# $NetBSD: buildlink3.mk,v 1.2 2019/06/02 08:37:39 adam Exp $
 
 BUILDLINK_TREE+=       lld
 
 .if !defined(LLD_BUILDLINK3_MK)
 LLD_BUILDLINK3_MK:=
 
-BUILDLINK_API_DEPENDS.lld+=    lld>=7.0.0
+BUILDLINK_API_DEPENDS.lld+=    lld>=8.0.0
 BUILDLINK_PKGSRCDIR.lld?=      ../../devel/lld
 
 .include "../../lang/llvm/buildlink3.mk"
diff -r c514871f5e23 -r b7b9fecdebaa devel/lld/distinfo
--- a/devel/lld/distinfo        Sun Jun 02 08:35:55 2019 +0000
+++ b/devel/lld/distinfo        Sun Jun 02 08:37:39 2019 +0000
@@ -1,18 +1,14 @@
-$NetBSD: distinfo,v 1.1 2019/02/01 16:30:00 mgorny Exp $
+$NetBSD: distinfo,v 1.2 2019/06/02 08:37:39 adam Exp $
 
-SHA1 (lld-7.0.1.src.tar.xz) = 3b69e107f27d466488838d5fa65bdfd77b885007
-RMD160 (lld-7.0.1.src.tar.xz) = 44e0e851b957fef86352ebe6c2a37096f8595dcb
-SHA512 (lld-7.0.1.src.tar.xz) = e5d3ed280d8ac6014cd6bbe080b11e2c4ebbae81dc14b637e779ec027d818dbae91c6f0de9e94bcecd6bdaa37f12c35141b5d81f0a15251d27932aa9bebd4047
-Size (lld-7.0.1.src.tar.xz) = 912812 bytes
-SHA1 (llvm-7.0.1.src.tar.xz) = f97632fcc3186eb0d396492ef8acfc807648580f
-RMD160 (llvm-7.0.1.src.tar.xz) = dae96c6f85afb60e73564dc40d02171d01ffdb8f
-SHA512 (llvm-7.0.1.src.tar.xz) = ac43a3cb71a53deb55e3693653847cf20bf6f5d9056f224e6956c96d63bc59ebee9404f088eec9cabe65337b4607a905ef931354b373cf64e0004c6905a6b5df
-Size (llvm-7.0.1.src.tar.xz) = 28311056 bytes
+SHA1 (lld-8.0.0.src.tar.xz) = b9062249ef61316e3450fc26e7238432673036bb
+RMD160 (lld-8.0.0.src.tar.xz) = bf3932f1b8d6e610bc1692cbbefec047a1a9a19b
+SHA512 (lld-8.0.0.src.tar.xz) = 43b671546f26a2293c27496584fcae43a99caabfffdbc7f72e06689e489005215b9a8607a4dc66a5469b3139d362486a46d1fbbdc2c657195fd3d3f1a72d2fa0
+Size (lld-8.0.0.src.tar.xz) = 999864 bytes
 SHA1 (patch-CMakeLists.txt) = df8e32f5f23bf2f2615a891177f61dc65359e955
-SHA1 (patch-ELF_Config.h) = 767eebd5787ae5351e3275f7d6666cd905f34f05
-SHA1 (patch-ELF_Driver.cpp) = d3ba099bf4a72a90cb126a6da4af9bdc7b97ba70
+SHA1 (patch-ELF_Config.h) = de2578f6c447aade843c59f78189da4f1d79b29a
+SHA1 (patch-ELF_Driver.cpp) = abb0cf1fb577cc6df04f5ca7d7edab17d27e3217
 SHA1 (patch-ELF_Driver.h) = e100fb0c86cc7d20b0f64919e73888a81a4836df
 SHA1 (patch-ELF_Options.td) = c8107a2c599b2444e52bdefe5f2dc539d277a092
 SHA1 (patch-ELF_Writer.cpp) = ab4ca25f832f20a5b4c80fe0f5f28822c09fb4ee
-SHA1 (patch-docs_ld.lld.1) = d61a228b5eb760a0ac4f691b9001d5505ebfe6ed
+SHA1 (patch-docs_ld.lld.1) = a6865d0099216094422aede3d65f43ee6fee22fe
 SHA1 (patch-test_ELF_gnustack.s) = b3827436dcfc67d51b8d293b11538808537ddeec
diff -r c514871f5e23 -r b7b9fecdebaa devel/lld/patches/patch-ELF_Config.h
--- a/devel/lld/patches/patch-ELF_Config.h      Sun Jun 02 08:35:55 2019 +0000
+++ b/devel/lld/patches/patch-ELF_Config.h      Sun Jun 02 08:37:39 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-ELF_Config.h,v 1.1 2019/02/01 16:30:00 mgorny Exp $
+$NetBSD: patch-ELF_Config.h,v 1.2 2019/06/02 08:37:39 adam Exp $
 
 Add support for customizing LLD behavior on target triple.
 https://reviews.llvm.org/D56650
@@ -6,7 +6,7 @@
 Add '-z nognustack' option to disable emitting PT_GNU_STACK.
 https://reviews.llvm.org/D56554
 
---- ELF/Config.h.orig  2018-07-31 13:41:59.000000000 +0000
+--- ELF/Config.h.orig  2019-01-17 13:46:36.000000000 +0000
 +++ ELF/Config.h
 @@ -14,6 +14,7 @@
  #include "llvm/ADT/MapVector.h"
@@ -16,15 +16,15 @@
  #include "llvm/BinaryFormat/ELF.h"
  #include "llvm/Support/CachePruning.h"
  #include "llvm/Support/CodeGen.h"
-@@ -185,6 +186,7 @@ struct Configuration {
-   bool ZKeepTextSectionPrefix;
+@@ -194,6 +195,7 @@ struct Configuration {
+   bool ZNodefaultlib;
    bool ZNodelete;
    bool ZNodlopen;
 +  bool ZNognustack;
    bool ZNow;
    bool ZOrigin;
    bool ZRelro;
-@@ -267,6 +269,10 @@ struct Configuration {
+@@ -277,6 +279,10 @@ struct Configuration {
  
    // 4 for ELF32, 8 for ELF64.
    int Wordsize;
diff -r c514871f5e23 -r b7b9fecdebaa devel/lld/patches/patch-ELF_Driver.cpp
--- a/devel/lld/patches/patch-ELF_Driver.cpp    Sun Jun 02 08:35:55 2019 +0000
+++ b/devel/lld/patches/patch-ELF_Driver.cpp    Sun Jun 02 08:37:39 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-ELF_Driver.cpp,v 1.1 2019/02/01 16:30:00 mgorny Exp $
+$NetBSD: patch-ELF_Driver.cpp,v 1.2 2019/06/02 08:37:39 adam Exp $
 
 Add support for customizing LLD behavior on target triple.
 https://reviews.llvm.org/D56650
@@ -12,7 +12,7 @@
 * disable PT_GNU_STACK (meaningless on NetBSD)
 * disable 'new dtags', i.e. force RPATH instead of RUNPATH
 
---- ELF/Driver.cpp.orig        2018-07-31 21:58:26.000000000 +0000
+--- ELF/Driver.cpp.orig        2019-02-14 10:49:15.000000000 +0000
 +++ ELF/Driver.cpp
 @@ -54,6 +54,7 @@
  #include "llvm/Support/LEB128.h"
@@ -22,7 +22,7 @@
  #include "llvm/Support/TargetSelect.h"
  #include "llvm/Support/raw_ostream.h"
  #include <cstdlib>
-@@ -309,6 +310,9 @@ static void checkOptions(opt::InputArgLi
+@@ -318,6 +319,9 @@ static void checkOptions() {
  
      if (Config->SingleRoRx && !Script->HasSectionsCommand)
        error("-execute-only and -no-rosegment cannot be used together");
@@ -32,16 +32,15 @@
    }
  }
  
-@@ -341,7 +345,7 @@ static bool isKnown(StringRef S) {
-          S == "execstack" || S == "hazardplt" || S == "initfirst" ||
+@@ -352,6 +356,7 @@ static bool isKnownZFlag(StringRef S) {
           S == "keep-text-section-prefix" || S == "lazy" || S == "muldefs" ||
-          S == "nocombreloc" || S == "nocopyreloc" || S == "nodelete" ||
--         S == "nodlopen" || S == "noexecstack" ||
-+         S == "nodlopen" || S == "noexecstack" || S == "nognustack" ||
+          S == "nocombreloc" || S == "nocopyreloc" || S == "nodefaultlib" ||
+          S == "nodelete" || S == "nodlopen" || S == "noexecstack" ||
++         S == "nognustack" ||
           S == "nokeep-text-section-prefix" || S == "norelro" || S == "notext" ||
           S == "now" || S == "origin" || S == "relro" || S == "retpolineplt" ||
           S == "rodynamic" || S == "text" || S == "wxneeded" ||
-@@ -355,6 +359,56 @@ static void checkZOptions(opt::InputArgL
+@@ -365,6 +370,56 @@ static void checkZOptions(opt::InputArgL
        error("unknown -z value: " + StringRef(Arg->getValue()));
  }
  
@@ -98,37 +97,16 @@
  void LinkerDriver::main(ArrayRef<const char *> ArgsArr) {
    ELFOptTable Parser;
    opt::InputArgList Args = Parser.parse(ArgsArr.slice(1));
-@@ -368,6 +422,29 @@ void LinkerDriver::main(ArrayRef<const c
+@@ -378,6 +433,8 @@ void LinkerDriver::main(ArrayRef<const c
      return;
    }
  
-+  if (const char *Path = getReproduceOption(Args)) {
-+    // Note that --reproduce is a debug option so you can ignore it
-+    // if you are trying to understand the whole picture of the code.
-+    Expected<std::unique_ptr<TarWriter>> ErrOrWriter =
-+        TarWriter::create(Path, path::stem(Path));
-+    if (ErrOrWriter) {
-+      Tar = ErrOrWriter->get();
-+      Tar->append("response.txt", createResponseFile(Args));
-+      Tar->append("version.txt", getLLDVersion() + "\n");
-+      make<std::unique_ptr<TarWriter>>(std::move(*ErrOrWriter));
-+    } else {
-+      error(Twine("--reproduce: failed to open ") + Path + ": " +
-+            toString(ErrOrWriter.takeError()));
-+    }
-+  }
-+
-+
-+  initLLVM();
-+  setTargetTriple(ArgsArr[0], Args);
-+  readConfigs(Args);
-+  checkZOptions(Args);
 +  appendDefaultSearchPaths();
 +
    // Handle -v or -version.
    //
    // A note about "compatible with GNU linkers" message: this is a hack for
-@@ -383,8 +460,10 @@ void LinkerDriver::main(ArrayRef<const c
+@@ -393,8 +450,10 @@ void LinkerDriver::main(ArrayRef<const c
    // lot of "configure" scripts out there that are generated by old version
    // of Libtool. We cannot convince every software developer to migrate to
    // the latest version and re-generate scripts. So we have this hack.
@@ -138,35 +116,9 @@
 +    message("Target: " + Config->TargetTriple.str());
 +  }
  
-   // The behavior of -v or --version is a bit strange, but this is
-   // needed for compatibility with GNU linkers.
-@@ -393,25 +472,6 @@ void LinkerDriver::main(ArrayRef<const c
-   if (Args.hasArg(OPT_version))
-     return;
- 
--  if (const char *Path = getReproduceOption(Args)) {
--    // Note that --reproduce is a debug option so you can ignore it
--    // if you are trying to understand the whole picture of the code.
--    Expected<std::unique_ptr<TarWriter>> ErrOrWriter =
--        TarWriter::create(Path, path::stem(Path));
--    if (ErrOrWriter) {
--      Tar = ErrOrWriter->get();
--      Tar->append("response.txt", createResponseFile(Args));
--      Tar->append("version.txt", getLLDVersion() + "\n");
--      make<std::unique_ptr<TarWriter>>(std::move(*ErrOrWriter));
--    } else {
--      error(Twine("--reproduce: failed to open ") + Path + ": " +
--            toString(ErrOrWriter.takeError()));
--    }
--  }
--
--  readConfigs(Args);
--  checkZOptions(Args);
--  initLLVM();
-   createFiles(Args);
-   if (errorCount())
-     return;
-@@ -725,6 +785,34 @@ static void parseClangOption(StringRef O
+   if (const char *Path = getReproduceOption(Args)) {
+     // Note that --reproduce is a debug option so you can ignore it
+@@ -746,6 +805,34 @@ static void parseClangOption(StringRef O
    error(Msg + ": " + StringRef(Err).trim());
  }
  
@@ -201,9 +153,9 @@
  // Initializes Config members by the command line options.
  void LinkerDriver::readConfigs(opt::InputArgList &Args) {
    errorHandler().Verbose = Args.hasArg(OPT_verbose);
-@@ -755,7 +843,8 @@ void LinkerDriver::readConfigs(opt::Inpu
-       Args.hasFlag(OPT_eh_frame_hdr, OPT_no_eh_frame_hdr, false);
-   Config->EmitRelocs = Args.hasArg(OPT_emit_relocs);
+@@ -779,7 +866,8 @@ void LinkerDriver::readConfigs(opt::Inpu
+   Config->CallGraphProfileSort = Args.hasFlag(
+       OPT_call_graph_profile_sort, OPT_no_call_graph_profile_sort, true);
    Config->EnableNewDtags =
 -      Args.hasFlag(OPT_enable_new_dtags, OPT_disable_new_dtags, true);
 +      Args.hasFlag(OPT_enable_new_dtags, OPT_disable_new_dtags,
@@ -211,16 +163,16 @@
    Config->Entry = Args.getLastArgValue(OPT_entry);
    Config->ExecuteOnly =
        Args.hasFlag(OPT_execute_only, OPT_no_execute_only, false);
-@@ -842,6 +931,8 @@ void LinkerDriver::readConfigs(opt::Inpu
+@@ -869,6 +957,8 @@ void LinkerDriver::readConfigs(opt::Inpu
    Config->ZCombreloc = getZFlag(Args, "combreloc", "nocombreloc", true);
    Config->ZCopyreloc = getZFlag(Args, "copyreloc", "nocopyreloc", true);
    Config->ZExecstack = getZFlag(Args, "execstack", "noexecstack", false);
 +  Config->ZNognustack = hasZOption(Args, "nognustack") ||
 +    Config->TargetTriple.isOSNetBSD();
+   Config->ZGlobal = hasZOption(Args, "global");
    Config->ZHazardplt = hasZOption(Args, "hazardplt");
    Config->ZInitfirst = hasZOption(Args, "initfirst");
-   Config->ZKeepTextSectionPrefix = getZFlag(
-@@ -1137,7 +1228,7 @@ void LinkerDriver::inferMachineType() {
+@@ -1173,7 +1263,7 @@ void LinkerDriver::inferMachineType() {
  // each target.
  static uint64_t getMaxPageSize(opt::InputArgList &Args) {
    uint64_t Val = args::getZOptionValue(Args, OPT_z, "max-page-size",
diff -r c514871f5e23 -r b7b9fecdebaa devel/lld/patches/patch-docs_ld.lld.1
--- a/devel/lld/patches/patch-docs_ld.lld.1     Sun Jun 02 08:35:55 2019 +0000
+++ b/devel/lld/patches/patch-docs_ld.lld.1     Sun Jun 02 08:37:39 2019 +0000
@@ -1,13 +1,13 @@
-$NetBSD: patch-docs_ld.lld.1,v 1.1 2019/02/01 16:30:00 mgorny Exp $
+$NetBSD: patch-docs_ld.lld.1,v 1.2 2019/06/02 08:37:39 adam Exp $
 
 Add '-z nognustack' option to disable emitting PT_GNU_STACK.
 https://reviews.llvm.org/D56554
 
---- docs/ld.lld.1.orig 2018-07-30 23:07:44.000000000 +0000
+--- docs/ld.lld.1.orig 2019-01-17 13:46:36.000000000 +0000
 +++ docs/ld.lld.1
-@@ -462,6 +462,10 @@ Set the
+@@ -511,6 +511,10 @@ Set the
  .Dv DF_1_NOOPEN
- flag to indcate that the object may not be opened by
+ flag to indicate that the object may not be opened by
  .Xr dlopen 3 .
 +.It Cm nognustack
 +Do not emit the



Home | Main Index | Thread Index | Old Index