pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/mold mold: update to 1.1.1.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4f7cdc007d0c
branches:  trunk
changeset: 375186:4f7cdc007d0c
user:      fcambus <fcambus%pkgsrc.org@localhost>
date:      Tue Mar 08 14:04:57 2022 +0000

description:
mold: update to 1.1.1.

New features:

- The --dependency-file option has been added. The option is analogous to
  the compiler's -MM option; it generates a text file containing dependency
  information in the Makefile format, so that you can include a generated
  file into a Makefile to automate the file dependency management. (a054bcd)
- mold has gained the --reverse-sections option. If the option is given,
  mold reverses the list of input sections before assigning them the
  addresses in an output file. This option is useful to find a bug in global
  initializers (e.g. constructors of global variables.) In C++, the execution
  order of global initializers is guaranteed only within a single compilation
  unit (they are executed from top to bottom.) If two global initializers
  are in different object files, they can be executed in any order. Reversing
  the execution order of the global initializers in different input files
  should help you identify a bug in your program. If your program does not
  work with -Wl,--reverse-sections, your program depends on the undefined
  behavior.
- --shuffle-sections now takes an optional seed for the random number
  generator in the form of --shuffle-sections=<number>. (8f21cc3)
- mold now supports the following LTO-related options for compatibility
  with LLVM lld: --disable-verify, --lto-O, --lto-cs-profile-file,
  --lto-cs-profile-generate, --lto-debug-pass-manager, --lto-emit-asm,
  --lto-obj-path, --lto-partitions, --lto-pseudo-probe-for-profiling,
  --lto-sample-profile, --no-legacy-pass-manager,
  --no-lto-legacy-pass-manager, --opt-remarks-filename, --opt-remarks-format,
  --opt-remarks-hotness-threshold, --opt-remarks-passes,
  --opt-remarks-with_hotness, --save-temps, --thinlto-emit-imports-files,
  --thinlto-index-only, --thinlto-index-only, --thinlto-jobs, --thinlto-jobs,
  --thinlto-object-suffix-replace, --thinlto-prefix-replace (e413433)
- -noinhibit-exec and --warn-shared-textrel have been supported.

Performance improvements:

- We optimized mold's memory usage by reducing the sizes of
  frequently-allocated objects. Compared to mold 1.1, we observed ~6%
  reduction of maximum resident set size (RSS) when linking Chromium. Our
  maximum RSS is smaller than LLVM lld and GNU gold as far as we tested. We
  measured maximum RSSes with time -v. (f2d27d8, 7068c0c, 83e05da, 4dae896)
- If Intel CET-based security-enhanced PLT is enabled (i.e. -z ibtplt is
  given), mold used to create a PLT section in which each entry is 32 bytes
  long. We optimized the machine code sequence of the CET-enabled PLT
  section, so each PLT entry now occupies only 16 bytes, reducing the size
  of .plt by almost half. (480efde)

Bug fixes and compatibility improvements:

- -static-pie now works with recent versions of glibc. Previously,
  statically-linked position-independent executable would crash on startup
  when linked with mold. (3999aa8)
- Previously, mold sometimes created corrupted output file on x86-64 if
  an input file containing thread-local variables were compiled with
  -mcmodel=large (#360). This issue has been fixed. (4aa4bfa)
- Previously, mold created corrupted debug info section on i386 if an
  input debug section is also compressed using the compiler -gz option.
  (#361) This issue has been fixed. (3068364)
- mold used to create multiple .init_array sections if input files contain
  both writable and non-writable .int_array sections. That caused an issue
  that some initializer functions would not be executed on process startup.
  (#363). This issue has been fixed. (4198627)
- When building a large program with GCC LTO, mold occasionally failed
  with "too many open files" error. This issue has been resolved. (e67f460)
- Previously, mold created a corrupted dynamic relocation table if .got.plt
  is missing. This issue has been fixed by always creating
  _GLOBAL_OFFSET_TABLE_ symbol in .got on any target. mold used to try to
  create the symbol in .got.plt on x86-64 or i386. (eb79859)

diffstat:

 devel/mold/Makefile               |   6 ++++--
 devel/mold/distinfo               |  10 +++++-----
 devel/mold/patches/patch-Makefile |  16 +++-------------
 3 files changed, 12 insertions(+), 20 deletions(-)

diffs (64 lines):

diff -r cdfd83d6c228 -r 4f7cdc007d0c devel/mold/Makefile
--- a/devel/mold/Makefile       Tue Mar 08 13:50:30 2022 +0000
+++ b/devel/mold/Makefile       Tue Mar 08 14:04:57 2022 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.9 2022/02/21 11:47:41 fcambus Exp $
+# $NetBSD: Makefile,v 1.10 2022/03/08 14:04:57 fcambus Exp $
 
-DISTNAME=      mold-1.1
+DISTNAME=      mold-1.1.1
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=rui314/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -13,6 +13,8 @@
 USE_TOOLS+=    gmake
 USE_LANGUAGES= c c++20
 
+MAKE_FLAGS+=   CFLAGS="${CFLAGS}"
+MAKE_FLAGS+=   CXXFLAGS="${CXXFLAGS}"
 MAKE_FLAGS+=   PREFIX="${PREFIX}"
 MAKE_FLAGS+=   MANDIR="${PREFIX}/${PKGMANDIR}"
 MAKE_FLAGS+=   SYSTEM_MIMALLOC=1 SYSTEM_TBB=1
diff -r cdfd83d6c228 -r 4f7cdc007d0c devel/mold/distinfo
--- a/devel/mold/distinfo       Tue Mar 08 13:50:30 2022 +0000
+++ b/devel/mold/distinfo       Tue Mar 08 14:04:57 2022 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.11 2022/02/21 11:47:41 fcambus Exp $
+$NetBSD: distinfo,v 1.12 2022/03/08 14:04:57 fcambus Exp $
 
-BLAKE2s (mold-1.1.tar.gz) = 7980e10d71e758ffbfce0c0640364ba593ae98270f1e9f2ec182cae8ad406357
-SHA512 (mold-1.1.tar.gz) = b8b125c77563abe2741c2f32d73ab2b12dff275b92b633fcd015336c6ea735e38e95c3d2afb50e5baace2023d4f9de3eb50d53053eabc2cd2f045110eef4cc1e
-Size (mold-1.1.tar.gz) = 4522886 bytes
-SHA1 (patch-Makefile) = 2abe38249ccd2691dd86e163cf11fd4c93429f7d
+BLAKE2s (mold-1.1.1.tar.gz) = 0180e64eedb0b4b08927dbbf2ce43a45707e5de2a306ad3ad3f754377b49a609
+SHA512 (mold-1.1.1.tar.gz) = 981d9737ed7a23134b9bafc04db0cd0233ab4fd588a3b250688dba64936fe84f6736168379fc3e4485273bcef11bca70e5c426b043b5d8b9775ae1cd3aea5b52
+Size (mold-1.1.1.tar.gz) = 4530297 bytes
+SHA1 (patch-Makefile) = b2df4dd7894bfc9df45253bb93ca768b8d8e091a
diff -r cdfd83d6c228 -r 4f7cdc007d0c devel/mold/patches/patch-Makefile
--- a/devel/mold/patches/patch-Makefile Tue Mar 08 13:50:30 2022 +0000
+++ b/devel/mold/patches/patch-Makefile Tue Mar 08 14:04:57 2022 +0000
@@ -1,21 +1,11 @@
-$NetBSD: patch-Makefile,v 1.8 2022/02/21 11:47:41 fcambus Exp $
+$NetBSD: patch-Makefile,v 1.9 2022/03/08 14:04:57 fcambus Exp $
 
-- Honour CFLAGS and CXXFLAGS
 - Do not hard-code -pthread, as it is handled by the pkgsrc infrastructure.
 - Do not hard-code -ldl
 
---- Makefile.orig      2022-02-20 07:40:17.000000000 +0000
+--- Makefile.orig      2022-03-07 10:38:14.000000000 +0000
 +++ Makefile
-@@ -42,14 +42,14 @@ endif
- 
- # If you want to compile mold for debugging, invoke make as
- # `make CXXFLAGS=-g`.
--CFLAGS = -O2
--CXXFLAGS = -O2
-+CFLAGS ?= -O2
-+CXXFLAGS ?= -O2
- 
- MOLD_CXXFLAGS := -std=c++20 -fno-exceptions -fno-unwind-tables \
+@@ -49,7 +49,7 @@ MOLD_CXXFLAGS := -std=c++20 -fno-excepti
                   -fno-asynchronous-unwind-tables -Ithird-party/xxhash \
                   -DMOLD_VERSION=\"$(VERSION)\" -DLIBDIR="\"$(LIBDIR)\""
  



Home | Main Index | Thread Index | Old Index