pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel lld lldb: updated to 12.0.1



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6c1912a14f8d
branches:  trunk
changeset: 455820:6c1912a14f8d
user:      adam <adam%pkgsrc.org@localhost>
date:      Mon Jul 12 18:47:15 2021 +0000

description:
lld lldb: updated to 12.0.1

12.0.1
Non-comprehensive list of changes in this release
ELF Improvements
--dependency-file has been added. (Similar to cc -M -MF.) (D82437)
--error-handling-script has been added to allow for user-defined handlers upon missing libraries. (D87758)
--exclude-libs can now localize defined version symbols and bitcode referenced libcall symbols. (D94280)
--gdb-index now works with DWARF v5 and --icf={safe,all}. (D85579) (D89751)
--gdb-index --emit-relocs can now be used together. (D94354)
--icf={safe,all} conservatively no longer fold text sections with LSDA. Previously ICF on -fexceptions code could be unsafe. (D84610)
--icf={safe,all} can now fold two sections with relocations referencing aliased symbols. (D88830)
--lto-pseudo-probe-for-profiling has been added. (D95056)
--no-lto-whole-program-visibility has been added. (D92060)
--oformat-binary has been fixed to respect LMA. (D85086)
--reproduce includes --lto-sample-profile, --just-symbols, --call-graph-ordering-file, --retain-symbols-file files.
-r --gc-sections is now supported. (D84131)
A -u specified symbol will no longer change the binding to STB_WEAK. (D88945)
--wrap support has been improved. + If foo is not referenced, there is no longer an undefined symbol __wrap_foo. + If __real_foo is not referenced, there is no longer an undefined symbol foo.
SHF_LINK_ORDER sections can now have zero sh_link values.
SHF_LINK_ORDER and non-SHF_LINK_ORDER sections can now be mixed within an input section description. (D84001)
LOG2CEIL is now supported in linker scripts. (D84054)
DEFINED has been fixed to check whether the symbol is defined. (D83758)
An input section description may now have multiple SORT_*. The matched sections are ordered by radix sort with the keys being (SORT*, --sort-section, input order). (D91127)
Users can now provide a GNU style linker script to convert .ctors into .init_array. (D91187)
An empty output section can now be discarded even if it is assigned to a program header. (D92301)
Non-SHF_ALLOC sections now have larger file offsets than SHF_ALLOC sections. (D85867)
Some symbol versioning improvements. + Defined foo@@v1 now resolve undefined foo@v1 (D92259) + Undefined foo@v1 now gets an error (D92260)
The AArch64 port now has support for STO_AARCH64_VARIANT_PCS and DT_AARCH64_VARIANT_PCS. (D93045)
The AArch64 port now has support for R_AARCH64_LD64_GOTPAGE_LO15.
The PowerPC64 port now detects missing R_PPC64_TLSGD/R_PPC64_TLSLD and disables TLS relaxation. This allows linking with object files produced by very old IBM XL compilers. (D92959)
Many PowerPC PC-relative relocations are now supported.
R_PPC_ADDR24 and R_PPC64_ADDR16_HIGH are now supported.
powerpcle is now supported. Tested with FreeBSD loader and freestanding. (D93917)
RISC-V: the first SHT_RISCV_ATTRIBUTES section is now retained. (D86309)
LTO pipeline now defaults to the new PM if the CMake variable ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER is on. (D92885)

diffstat:

 devel/lld/Makefile                                                             |    3 +-
 devel/lld/PLIST                                                                |    9 +-
 devel/lld/distinfo                                                             |   20 +-
 devel/lld/patches/patch-CMakeLists.txt                                         |   17 +-
 devel/lld/patches/patch-ELF_Config.h                                           |    8 +-
 devel/lld/patches/patch-ELF_Driver.cpp                                         |   19 +-
 devel/lld/patches/patch-tools_lld_lld.cpp                                      |  135 -----
 devel/lld/patches/patch-tools_nb.lld_CMakeLists.txt                            |   29 -
 devel/lld/patches/patch-tools_nb.lld_Options.td                                |   15 -
 devel/lld/patches/patch-tools_nb.lld_nb.lld.cpp                                |  231 ----------
 devel/lldb/Makefile                                                            |    6 +-
 devel/lldb/PLIST                                                               |   34 +-
 devel/lldb/buildlink3.mk                                                       |    4 +-
 devel/lldb/distinfo                                                            |   16 +-
 devel/lldb/patches/patch-source_API_CMakeLists.txt                             |    8 +-
 devel/lldb/patches/patch-source_Host_CMakeLists.txt                            |   23 -
 devel/lldb/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp |   16 +-
 17 files changed, 79 insertions(+), 514 deletions(-)

diffs (truncated from 936 to 300 lines):

diff -r 3e738d7ac7c1 -r 6c1912a14f8d devel/lld/Makefile
--- a/devel/lld/Makefile        Mon Jul 12 18:46:50 2021 +0000
+++ b/devel/lld/Makefile        Mon Jul 12 18:47:15 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2020/04/18 08:00:49 adam Exp $
+# $NetBSD: Makefile,v 1.16 2021/07/12 18:47:15 adam Exp $
 
 .include "../../lang/llvm/version.mk"
 
@@ -29,5 +29,6 @@
 
 .include "options.mk"
 .include "../../lang/llvm/buildlink3.mk"
+.include "../../lang/libunwind/buildlink3.mk"
 .include "../../lang/python/tool.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 3e738d7ac7c1 -r 6c1912a14f8d devel/lld/PLIST
--- a/devel/lld/PLIST   Mon Jul 12 18:46:50 2021 +0000
+++ b/devel/lld/PLIST   Mon Jul 12 18:47:15 2021 +0000
@@ -1,9 +1,9 @@
-@comment $NetBSD: PLIST,v 1.4 2020/04/18 08:00:49 adam Exp $
+@comment $NetBSD: PLIST,v 1.5 2021/07/12 18:47:15 adam Exp $
 bin/ld.lld
 bin/ld64.lld
+bin/ld64.lld.darwinnew
 bin/lld
 bin/lld-link
-bin/nb.lld
 bin/wasm-ld
 include/lld/Common/Args.h
 include/lld/Common/DWARF.h
@@ -15,7 +15,6 @@
 include/lld/Common/Reproduce.h
 include/lld/Common/Strings.h
 include/lld/Common/TargetOptionsCommandFlags.h
-include/lld/Common/Threads.h
 include/lld/Common/Timer.h
 include/lld/Common/Version.h
 include/lld/Core/AbsoluteAtom.h
@@ -40,12 +39,16 @@
 include/lld/Core/Writer.h
 include/lld/ReaderWriter/MachOLinkingContext.h
 include/lld/ReaderWriter/YamlContext.h
+lib/cmake/lld/LLDConfig.cmake
+lib/cmake/lld/LLDTargets-release.cmake
+lib/cmake/lld/LLDTargets.cmake
 lib/liblldCOFF.a
 lib/liblldCommon.a
 lib/liblldCore.a
 lib/liblldDriver.a
 lib/liblldELF.a
 lib/liblldMachO.a
+lib/liblldMachO2.a
 lib/liblldMinGW.a
 lib/liblldReaderWriter.a
 lib/liblldWasm.a
diff -r 3e738d7ac7c1 -r 6c1912a14f8d devel/lld/distinfo
--- a/devel/lld/distinfo        Mon Jul 12 18:46:50 2021 +0000
+++ b/devel/lld/distinfo        Mon Jul 12 18:47:15 2021 +0000
@@ -1,14 +1,10 @@
-$NetBSD: distinfo,v 1.11 2020/07/26 19:20:12 adam Exp $
+$NetBSD: distinfo,v 1.12 2021/07/12 18:47:15 adam Exp $
 
-SHA1 (lld-10.0.1.src.tar.xz) = 8581337dba00041c2633f61bfb5be778df83cff7
-RMD160 (lld-10.0.1.src.tar.xz) = e445e5a1a81dfce3428d3c05a2afcb3a31ec02f7
-SHA512 (lld-10.0.1.src.tar.xz) = cc0d206739db4c3876eb4718690e11b3eb1a2278e0d4a17a9576eef2320a2e25e1f548768f74f0877e4d00ef50471af1ce179eae9e514d41a0d93285c537941a
-Size (lld-10.0.1.src.tar.xz) = 1134580 bytes
-SHA1 (patch-CMakeLists.txt) = 87d32f66488541ba68e219f5fa83646b48bf9c71
-SHA1 (patch-ELF_Config.h) = 3f2a310bc2c8f625493b0b73702feaac22769c9c
-SHA1 (patch-ELF_Driver.cpp) = d1bd9821f2d952dfa86d4f0cf3afc4e7fb477001
+SHA1 (lld-12.0.1.src.tar.xz) = 3b7e4908f6cf3a51590e37b4194180582cc1c32c
+RMD160 (lld-12.0.1.src.tar.xz) = 35904df314f41d6e8c3052fbf7f3c2677e0c62b6
+SHA512 (lld-12.0.1.src.tar.xz) = 4292e45c54f61b8bf8b0a412f1423e062fb7c88ab3d143de3bccf010ea84fcf672ec432068a6adc461f605993d5c4e7e720e9b719d7bf8cbe670115f75e1fb2a
+Size (lld-12.0.1.src.tar.xz) = 1351580 bytes
+SHA1 (patch-CMakeLists.txt) = 32163a5bcd7d9456065e48ef6e6f0e2c3380a820
+SHA1 (patch-ELF_Config.h) = c449bf971088da671df5da507347fe8dc8c9da82
+SHA1 (patch-ELF_Driver.cpp) = 7de88cf37fb7045fb2af73faaeac79d6880ddb52
 SHA1 (patch-ELF_Options.td) = 22a1f293681b86a9aac87624efcfeeb20a4ba51c
-SHA1 (patch-tools_lld_lld.cpp) = c8b0c166cb15b045fc1651985004fc9694264d0f
-SHA1 (patch-tools_nb.lld_CMakeLists.txt) = 231ed112512d23001a8e9d1d1821838a483c2e37
-SHA1 (patch-tools_nb.lld_Options.td) = d56ff977f24d97eda30f10aae5818c618b3c7915
-SHA1 (patch-tools_nb.lld_nb.lld.cpp) = 2425426beb2f4d80f96781977e3a4019eed601fc
diff -r 3e738d7ac7c1 -r 6c1912a14f8d devel/lld/patches/patch-CMakeLists.txt
--- a/devel/lld/patches/patch-CMakeLists.txt    Mon Jul 12 18:46:50 2021 +0000
+++ b/devel/lld/patches/patch-CMakeLists.txt    Mon Jul 12 18:47:15 2021 +0000
@@ -1,15 +1,12 @@
-$NetBSD: patch-CMakeLists.txt,v 1.2 2019/11/03 12:10:29 kamil Exp $
+$NetBSD: patch-CMakeLists.txt,v 1.3 2021/07/12 18:47:15 adam Exp $
 
 LLD 7.0.1 is incompatible with gtest version in pkgsrc.  Remove
 the condition that prevents it from building its own copy when system
 version is installed.
 
-[LLD] Add NetBSD support as a new flavor of LLD (nb.lld)
-https://reviews.llvm.org/D69755
-
---- CMakeLists.txt.orig        2019-08-26 12:32:18.000000000 +0000
+--- CMakeLists.txt.orig        2021-04-06 16:38:18.000000000 +0000
 +++ CMakeLists.txt
-@@ -85,7 +85,6 @@ Please install Python or specify the PYT
+@@ -76,7 +76,6 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRE
        endif()
        set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
        if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
@@ -17,11 +14,3 @@
            AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
          add_subdirectory(${UNITTEST_DIR} utils/unittest)
        endif()
-@@ -212,6 +211,7 @@ endif()
- add_subdirectory(Common)
- add_subdirectory(lib)
- add_subdirectory(tools/lld)
-+add_subdirectory(tools/nb.lld)
- 
- if (LLVM_INCLUDE_TESTS)
-   add_subdirectory(test)
diff -r 3e738d7ac7c1 -r 6c1912a14f8d devel/lld/patches/patch-ELF_Config.h
--- a/devel/lld/patches/patch-ELF_Config.h      Mon Jul 12 18:46:50 2021 +0000
+++ b/devel/lld/patches/patch-ELF_Config.h      Mon Jul 12 18:47:15 2021 +0000
@@ -1,14 +1,14 @@
-$NetBSD: patch-ELF_Config.h,v 1.7 2020/04/18 08:00:50 adam Exp $
+$NetBSD: patch-ELF_Config.h,v 1.8 2021/07/12 18:47:15 adam Exp $
 
 Add dummy option for an AArch64 erratum.
 
---- ELF/Config.h.orig  2020-03-23 15:01:02.000000000 +0000
+--- ELF/Config.h.orig  2020-10-07 10:10:48.000000000 +0000
 +++ ELF/Config.h
-@@ -150,6 +150,7 @@ struct Configuration {
+@@ -156,6 +156,7 @@ struct Configuration {
    bool enableNewDtags;
    bool executeOnly;
    bool exportDynamic;
 +  bool fixCortexA53Errata835769;
    bool fixCortexA53Errata843419;
    bool fixCortexA8;
-   bool forceBTI;
+   bool formatBinary = false;
diff -r 3e738d7ac7c1 -r 6c1912a14f8d devel/lld/patches/patch-ELF_Driver.cpp
--- a/devel/lld/patches/patch-ELF_Driver.cpp    Mon Jul 12 18:46:50 2021 +0000
+++ b/devel/lld/patches/patch-ELF_Driver.cpp    Mon Jul 12 18:47:15 2021 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-ELF_Driver.cpp,v 1.8 2020/04/18 08:00:50 adam Exp $
+$NetBSD: patch-ELF_Driver.cpp,v 1.9 2021/07/12 18:47:15 adam Exp $
 
 Add dummy option for an AArch64 erratum.
 
---- ELF/Driver.cpp.orig        2020-03-23 15:01:02.000000000 +0000
+--- ELF/Driver.cpp.orig        2020-10-07 10:10:48.000000000 +0000
 +++ ELF/Driver.cpp
-@@ -132,7 +132,7 @@ static std::tuple<ELFKind, uint16_t, uin
+@@ -135,7 +135,7 @@ static std::tuple<ELFKind, uint16_t, uin
    std::pair<ELFKind, uint16_t> ret =
        StringSwitch<std::pair<ELFKind, uint16_t>>(s)
            .Cases("aarch64elf", "aarch64linux", "aarch64_elf64_le_vec",
@@ -13,7 +13,7 @@
            .Cases("armelf", "armelf_linux_eabi", {ELF32LEKind, EM_ARM})
            .Case("elf32_x86_64", {ELF32LEKind, EM_X86_64})
            .Cases("elf32btsmip", "elf32btsmipn32", {ELF32BEKind, EM_MIPS})
-@@ -296,6 +296,9 @@ static void checkOptions() {
+@@ -300,6 +300,9 @@ static void checkOptions() {
    if (config->emachine == EM_MIPS && config->gnuHash)
      error("the .gnu.hash section is not compatible with the MIPS target");
  
@@ -23,11 +23,12 @@
    if (config->fixCortexA53Errata843419 && config->emachine != EM_AARCH64)
      error("--fix-cortex-a53-843419 is only supported on AArch64 targets");
  
-@@ -879,6 +882,7 @@ static void readConfigs(opt::InputArgLis
+@@ -937,6 +940,8 @@ static void readConfigs(opt::InputArgLis
        args.hasFlag(OPT_export_dynamic, OPT_no_export_dynamic, false);
    config->filterList = args::getStrings(args, OPT_filter);
    config->fini = args.getLastArgValue(OPT_fini, "_fini");
-+  config->fixCortexA53Errata835769 = args.hasArg(OPT_fix_cortex_a53_843419);
-   config->fixCortexA53Errata843419 = args.hasArg(OPT_fix_cortex_a53_843419);
-   config->fixCortexA8 = args.hasArg(OPT_fix_cortex_a8);
-   config->forceBTI = hasZOption(args, "force-bti");
++  config->fixCortexA53Errata835769 = args.hasArg(OPT_fix_cortex_a53_843419) &&
++                                     !args.hasArg(OPT_relocatable);
+   config->fixCortexA53Errata843419 = args.hasArg(OPT_fix_cortex_a53_843419) &&
+                                      !args.hasArg(OPT_relocatable);
+   config->fixCortexA8 =
diff -r 3e738d7ac7c1 -r 6c1912a14f8d devel/lld/patches/patch-tools_lld_lld.cpp
--- a/devel/lld/patches/patch-tools_lld_lld.cpp Mon Jul 12 18:46:50 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-$NetBSD: patch-tools_lld_lld.cpp,v 1.2 2020/04/18 08:00:50 adam Exp $
-
-[LLD] Add NetBSD support as a new flavor of LLD (nb.lld)
-https://reviews.llvm.org/D69755
-
---- tools/lld/lld.cpp.orig     2020-03-23 15:01:02.000000000 +0000
-+++ tools/lld/lld.cpp
-@@ -10,12 +10,13 @@
- // function is a thin wrapper which dispatches to the platform specific
- // driver.
- //
--// lld is a single executable that contains four different linkers for ELF,
--// COFF, WebAssembly and Mach-O. The main function dispatches according to
--// argv[0] (i.e. command name). The most common name for each target is shown
-+// lld is a single executable that contains five different linkers for ELF,
-+// NetBSD, COFF, WebAssembly and Mach-O. The main function dispatches according
-+// to argv[0] (i.e. command name). The most common name for each target is shown
- // below:
- //
- //  - ld.lld:    ELF (Unix)
-+//  - nb.lld:    ELF (NetBSD)
- //  - ld64:      Mach-O (macOS)
- //  - lld-link:  COFF (Windows)
- //  - ld-wasm:   WebAssembly
-@@ -36,6 +37,9 @@
- #include "llvm/Support/Host.h"
- #include "llvm/Support/InitLLVM.h"
- #include "llvm/Support/Path.h"
-+#include "llvm/Support/Program.h"
-+#include "llvm/Support/WithColor.h"
-+#include "llvm/Support/raw_ostream.h"
- #include <cstdlib>
- 
- using namespace lld;
-@@ -45,6 +49,7 @@ using namespace llvm::sys;
- enum Flavor {
-   Invalid,
-   Gnu,     // -flavor gnu
-+  NetBSD,  // -flavor netbsd
-   WinLink, // -flavor link
-   Darwin,  // -flavor darwin
-   Wasm,    // -flavor wasm
-@@ -58,6 +63,7 @@ LLVM_ATTRIBUTE_NORETURN static void die(
- static Flavor getFlavor(StringRef s) {
-   return StringSwitch<Flavor>(s)
-       .CasesLower("ld", "ld.lld", "gnu", Gnu)
-+      .CasesLower("nb.lld", "netbsd", NetBSD)
-       .CasesLower("wasm", "ld-wasm", Wasm)
-       .CaseLower("link", WinLink)
-       .CasesLower("ld64", "ld64.lld", "darwin", Darwin)
-@@ -100,10 +106,15 @@ static Flavor parseProgname(StringRef pr
- #endif
- 
- #if LLVM_ON_UNIX
--  // Use GNU driver for "ld" on other Unix-like system.
--  if (progname == "ld")
-+  // Use GNU or NetBSD driver for "ld" on other Unix-like system.
-+  if (progname == "ld") {
-+#if defined(__NetBSD__)
-+    return NetBSD;
-+#else
-     return Gnu;
- #endif
-+  }
-+#endif
- 
-   // Progname may be something like "lld-gnu". Parse it.
-   SmallVector<StringRef, 3> v;
-@@ -133,6 +144,38 @@ static Flavor parseFlavor(std::vector<co
-   return parseProgname(arg0);
- }
- 
-+// The NetBSD linker flavor will mutate arguments and call the GNU linker.
-+static int exec_nb_lld(int argc, const char **argv) {
-+  auto Program = sys::findProgramByName("nb.lld");
-+  if (!Program) {
-+    WithColor::error() << "unable to find `nb.lld' in PATH: "
-+                       << Program.getError().message() << "\n";
-+    return 1;
-+  }
-+
-+  std::vector<StringRef> Argv;
-+  Argv.push_back("nb.lld");
-+
-+  // Trim -flavor option.
-+  if (argc > 1 && argv[0] == StringRef("-flavor")) {
-+    if (argc <= 2)
-+      die("missing arg value for '-flavor'");
-+    argc -= 2;
-+    argv += 2;
-+  }
-+
-+  for (int i = 0; i < argc; ++i)
-+    Argv.push_back(argv[i]);
-+
-+  std::string ErrMsg;
-+  int Result = sys::ExecuteAndWait(*Program, Argv, None, {}, 0, 0, &ErrMsg);
-+  if (Result < 0) {
-+    WithColor::error() << ErrMsg << "\n";
-+    return 1;
-+  }
-+  return Result;
-+}
-+
- // If this function returns true, lld calls _exit() so that it quickly
- // exits without invoking destructors of globally allocated objects.
- //
-@@ -141,7 +184,7 @@ static Flavor parseFlavor(std::vector<co
- // and we use it to detect whether we are running tests or not.
- static bool canExitEarly() { return StringRef(getenv("LLD_IN_TEST")) != "1"; }
- 
--/// Universal linker main(). This linker emulates the gnu, darwin, or
-+/// Universal linker main(). This linker emulates the gnu, netbsd, darwin, or
- /// windows linker based on the argv[0] or -flavor option.



Home | Main Index | Thread Index | Old Index