pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/mold



Module Name:    pkgsrc
Committed By:   fcambus
Date:           Mon Feb 21 11:47:41 UTC 2022

Modified Files:
        pkgsrc/devel/mold: Makefile distinfo
        pkgsrc/devel/mold/patches: patch-Makefile

Log Message:
mold: update to 1.1.

mold 1.1 is a new release of the high-performance linker. It contains
a few new major features and various bug fixes.

New features:

- Native LTO (link-time optimization) support has been added.
  mold used to invoke ld.bfd or ld.lld if it encountered a GCC
  IR (intermediate representation) file or an LLVM IR file to
  delegate the task to the LTO-capable linkers, respectively.
  Now, mold handles IR files directly. This feature is implemented
  using the linker plugin API which is also used by GNU ld and
  GNU gold. Note that the LTO support has been added for completeness
  and not for speed. mold is only marginally faster than the
  other linkers for LTO builds because not linking but code
  optimization dominates. (46995bc)
- RISC-V (RV64) is now supported as both host and target platforms.
  mold can link real-world large programs such as mold itself or
  LLVM Clang for RISC-V. (e76f7c0)
- The -emit-relocs option is supported. If the option is given,
  mold copies relocation sections from input files to an output
  file. This feature is used by some post-link binary optimization
  or analysis tools such as Facebook's Bolt. (26fe71d)
- mold gained the --shuffle-sections option. If the option is
  given, the linker randomly shuffle the order of input sections
  before fixing their addresses in the virtual address space.
  This feature is useful in some situations. First, it can be
  used as a strong form of ASLR (address space layout randomization).
  Second, you can enable it when you are benchmarking some other
  program to get more reliable benchmark numbers, because even
  the same machine code can vary in performance if they are laid
  out differently in the virtual address space. You want to make
  sure that you got good/bad benchmark numbers not by coincidence
  by shuffling input sections. (7e91897)
- The --print-dependencies and --print-dependencies=full options
  were added. They print out dependencies between input files in
  the CSV format. That is, they print out the information as to
  which file depends on which file to use which symbol. We added
  this feature with a few use cases in mind. First, you can use
  this to analyze why some object file was pulled out from an
  archive and got linked to an output file. Second, when you want
  to eliminate all dependencies to some library, you can find
  all of them very easy with this feature. Note that this is an
  experimental feature and may change or removed in feature
  releases of mold. (a1287c2)
- The following options are added: --warn-once (f24b997),
  --warn-textrel (6ffcae4)
- Runtime dependency to libxxhash has been eliminated. (e5f4b96)

Bug fixes and compatibility improvements:

- A PT_GNU_RELRO segment is now aligned up to the next page
  boundary. Previously, mold didn't align it up, and the runtime
  loader align it down, so the last partial page would not be
  protected by the RELRO mechanism. Now, the entire RELRO segment
  is guaranteed to be read-only at runtime. (0a0f9b3)
- The .got.plt section is now protected by RELRO if -z now is
  given. This is possible because writes to .got.plt happen only
  during process startup if all symbols are resolved on process
  startup. (73159e2)
- Previously, mold reported an error if object files created with
  old GCC (with -fgnu-unique) are mixed with ones created with
  newer GCC or Clang (with -fno-gnu-unique) (#324). Now, mold
  accepts such input files. (e65c5d2)
- mold can now be built with musl libc. (42b7eb8)
- mold-generated .symtab section now contains section symbols
  and symbols derived from input shared object files. (e4c03c2,
  1550b5a)
- mold-generated executables can now run under valgrind. Previously,
  valgrind aborted on startup due to an assertion failure because
  it didn't expect for an executable to have both .bss and .dynbss
  sections. mold generated .dynbss to contain copy-relocated
  symbols. The section has been renamed .copyrel to workaround
  the valgrind's issue. (0f8bf23)


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 pkgsrc/devel/mold/Makefile
cvs rdiff -u -r1.10 -r1.11 pkgsrc/devel/mold/distinfo
cvs rdiff -u -r1.7 -r1.8 pkgsrc/devel/mold/patches/patch-Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/mold/Makefile
diff -u pkgsrc/devel/mold/Makefile:1.8 pkgsrc/devel/mold/Makefile:1.9
--- pkgsrc/devel/mold/Makefile:1.8      Tue Feb  1 14:21:51 2022
+++ pkgsrc/devel/mold/Makefile  Mon Feb 21 11:47:41 2022
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.8 2022/02/01 14:21:51 fcambus Exp $
+# $NetBSD: Makefile,v 1.9 2022/02/21 11:47:41 fcambus Exp $
 
-DISTNAME=      mold-1.0.3
+DISTNAME=      mold-1.1
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=rui314/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -15,7 +15,7 @@ USE_LANGUAGES=        c c++20
 
 MAKE_FLAGS+=   PREFIX="${PREFIX}"
 MAKE_FLAGS+=   MANDIR="${PREFIX}/${PKGMANDIR}"
-MAKE_FLAGS+=   SYSTEM_MIMALLOC=1 SYSTEM_TBB=1 SYSTEM_XXHASH=1
+MAKE_FLAGS+=   SYSTEM_MIMALLOC=1 SYSTEM_TBB=1
 
 # This package uses a lot of C++20 features. GCC 10 is the oldest GCC that can
 # build it.
@@ -26,7 +26,6 @@ DL_AUTO_VARS=         yes
 PTHREAD_AUTO_VARS=     yes
 
 .include "../../devel/mimalloc/buildlink3.mk"
-.include "../../devel/xxhash/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../parallel/threadingbuildingblocks/buildlink3.mk"
 .include "../../security/openssl/buildlink3.mk"

Index: pkgsrc/devel/mold/distinfo
diff -u pkgsrc/devel/mold/distinfo:1.10 pkgsrc/devel/mold/distinfo:1.11
--- pkgsrc/devel/mold/distinfo:1.10     Tue Feb  1 14:21:51 2022
+++ pkgsrc/devel/mold/distinfo  Mon Feb 21 11:47:41 2022
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.10 2022/02/01 14:21:51 fcambus Exp $
+$NetBSD: distinfo,v 1.11 2022/02/21 11:47:41 fcambus Exp $
 
-BLAKE2s (mold-1.0.3.tar.gz) = 26f2d46b7595debc2b26dcb8728dea8c574bb4b409760d728460b5d995801a96
-SHA512 (mold-1.0.3.tar.gz) = 50b4a80c8b7a4925e6e85a35e92529867648df61ca016ee662b3fce7cf9d4a8fd717311ec0542aa594f44b49d48de34d51d7e94cae0f21bda01fdd4418990f38
-Size (mold-1.0.3.tar.gz) = 4501162 bytes
-SHA1 (patch-Makefile) = 58f8bd9fe926274220ce2f925ba9f26351f0e8cd
+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

Index: pkgsrc/devel/mold/patches/patch-Makefile
diff -u pkgsrc/devel/mold/patches/patch-Makefile:1.7 pkgsrc/devel/mold/patches/patch-Makefile:1.8
--- pkgsrc/devel/mold/patches/patch-Makefile:1.7        Tue Feb  1 14:21:51 2022
+++ pkgsrc/devel/mold/patches/patch-Makefile    Mon Feb 21 11:47:41 2022
@@ -1,11 +1,12 @@
-$NetBSD: patch-Makefile,v 1.7 2022/02/01 14:21:51 fcambus Exp $
+$NetBSD: patch-Makefile,v 1.8 2022/02/21 11:47:41 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-01-30 10:39:38.000000000 +0000
+--- Makefile.orig      2022-02-20 07:40:17.000000000 +0000
 +++ Makefile
-@@ -34,14 +34,14 @@ endif
+@@ -42,14 +42,14 @@ endif
  
  # If you want to compile mold for debugging, invoke make as
  # `make CXXFLAGS=-g`.
@@ -14,12 +15,12 @@ $NetBSD: patch-Makefile,v 1.7 2022/02/01
 +CFLAGS ?= -O2
 +CXXFLAGS ?= -O2
  
- MOLD_CXXFLAGS = -std=c++20 -fno-exceptions -fno-unwind-tables \
-                 -fno-asynchronous-unwind-tables -DMOLD_VERSION=\"1.0.3\" \
-                 -DLIBDIR="\"$(LIBDIR)\""
+ MOLD_CXXFLAGS := -std=c++20 -fno-exceptions -fno-unwind-tables \
+                  -fno-asynchronous-unwind-tables -Ithird-party/xxhash \
+                  -DMOLD_VERSION=\"$(VERSION)\" -DLIBDIR="\"$(LIBDIR)\""
  
--MOLD_LDFLAGS = -pthread -lz -lm
-+MOLD_LDFLAGS = -lz -lm
+-MOLD_LDFLAGS := -pthread -lz -lm -ldl
++MOLD_LDFLAGS := -lz -lm
  
- GIT_HASH = $(shell [ -d .git ] && git rev-parse HEAD)
+ GIT_HASH := $(shell [ -d .git ] && git rev-parse HEAD)
  ifneq ($(GIT_HASH),)



Home | Main Index | Thread Index | Old Index