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:           Tue Jan 10 13:55:04 UTC 2023

Modified Files:
        pkgsrc/devel/mold: Makefile PLIST distinfo
Added Files:
        pkgsrc/devel/mold/patches: patch-CMakeLists.txt

Log Message:
mold: update to 1.9.0.

ChangeLog for mold 1.9.0:
-------------------------

New features:

- mold gained support for the three new targets: 32-bit PowerPC, SH-4 and
  DEC Alpha. Each porting work didn't take more than a few days for us to
  complete, which demonstrate how portable the mold linker is. You can
  typically port mold to a new target just by writing a few hundreds lines
  of target-specific code. See arch-*.cc files in mold/elf/ directory to
  see how target-specific code actually looks like.

Bug fixes and compatibility improvements:

- In a rare occasion, a statically-initialized function pointer might get
  a wrong address in a statically-linked executable. This bug has been
  fixed.
- Fixed a -gdb-index option's crash bug on big-endian hosts.
- [RISC-V] mold rewrote machine instructions in a wrong way as a result of
  a wrong R_RISCV_HI20 relaxation if the output file was being linked
  against the high address. It's not a problem for user-land programs, but
  kernels linked with mold could crash due to this bug. This bug has been
  fixed.

ChangeLog for mold 1.8.0:
-------------------------

New features:

- The --relocatable (or -r) option has been reimplemented to improve its
  performance and compatibility with the GNU linkers. That option tells the
  linker to combine input object files into another object file instead of
  into an executable or a shared library file. mold has been supporting the
  feature since version 0.9, but until now the output file created with -r
  looked fairly different from what GNU linkers would produce. GHC (Glasgow
  Haskell Compiler) in particular uses re-linkable object files as dynamic
  libraries instead of real .so files, and it didn't work with mold. Now,
  mold can produce object files that GHC can load. Note that this work was
  funded by Mercury, so thanks to the company to help us improve the product.
  (Yes, you can ask us to prioritize your feature request by funding the
  project.)
- --relocatable-merge-sections option has been added. By default, mold keeps
  original input section names for the --relocatable output and therefore
  does not merge input sections into a single output sections unless they are
  of the same name. If --relocatable-merge-sections is given, mold merges
  input by the usual default merging rule. For example, .text.foo and .text.bar
  are merged to .text if and only if --relocatable-merge-sections is given
  for the --relocatable output.
- -z [no]dynamic-undefined-weak options have been added. This option controls
  whether an undefined weak symbol is promoted to a dynamic symbol or not.
- --[no-]undefined-version options have been supported. Now, mold warns on
  a symbol name in a version script if it does not match with any defined
  symbol. This change was made so that it is easy to find a typo in a version
  script.
- mold now warns on symbol type mismatch. If two object files have the same
  symbol with different symbol types, it usually means your program has a
  bug. Chances are, you are using the same identifier as a function name in
  one translation unit and as a global variable name in another. So it makes
  sense to warn on the mismatch.
- mold now merges .gnu.note.property sections for various x86 properties.

Removed features:

- The experimental macOS/iOS support has been removed from mold. If you want
  to use it, please use our sold linker instead.

Bug fixes and compatibility improvements:

- --wrap now works with LTO.
- A global variable initialized with an IFUNC function pointer is now
  initialized correctly with the function's address. Previously, it was
  mistakenly initialized to the function resolver's address.
- The filename specified by --version-script or --dynamic-list is now
  searched from library search paths if it does not exist in the current
  working directory. This behavior is compatible with GNU linkers.
- mold now tries to avoid creating copy relocations as much as possible. This
  change fixed a compatibility issue with GHC.
- Thread-local variables are now correctly aligned even if there's a TLV with
  a large alignment.
- mold can now handle GCC LTO files created with -ffat-lto-objects.
- mold now accepts -z nopack-relative-relocs as an alias for
  --pack-dyn-relocs=none for the sake of compatibility with GNU linkers.
- mold now recognizes -z start-stop-visibility=hidden but ignores it because
  it's the default for mold. GNU linkers support this option to control the
  visibility of linker-synthesized __start_<sectname> and __stop_<sectname>
  symbols, with global as the default visibility. mold creates these symbols
  with the hidden visibility by default, which is desirable for almost all
  cases.
- [ARM32, i386] mold now emits REL-type relocations instead of RELA-type
  for the --relocatable output file.

ChangeLog for mold 1.7.1:
-------------------------

Bug fix:

- mold 1.7.0 may generate the same build-id for two different output files.
  We fixed the issue in 1.7.1 so that build-id is guaranteed to be unique
  for each different output file.

ChangeLog for mold 1.7.0:
-------------------------

New features:

- [m68k] mold now supports the Motorola 68000 series microprocessors. Yes,
  it's the processor in the original Mac or Sun workstations in the 80s.
  This work is sponsored by m68k hobbyist communities.

Bug fixes and compatibility improvements:

- We fixed a few issues for Facebook/Meta's BOLT optimizer. Starting from
  the next LLVM release (we need llvm/llvm-project@20204db), BOLT should
  work on mold-generated executables out of the box.
- We fixed a long-standing symbol resolution issue involving GNU UNIQUE
  symbols which caused a link failure for a few programs.
- Previously, if a version script contains a "C++" directive, and a symbol
  matches a non-C++ version pattern and a C++ version pattern, a wrong
  version could be assigned to the symbol. This has been fixed so that the
  mold's behavior matches with GNU ld.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 pkgsrc/devel/mold/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/devel/mold/PLIST
cvs rdiff -u -r1.23 -r1.24 pkgsrc/devel/mold/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/mold/patches/patch-CMakeLists.txt

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.26 pkgsrc/devel/mold/Makefile:1.27
--- pkgsrc/devel/mold/Makefile:1.26     Sun Nov 13 18:55:31 2022
+++ pkgsrc/devel/mold/Makefile  Tue Jan 10 13:55:03 2023
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.26 2022/11/13 18:55:31 fcambus Exp $
+# $NetBSD: Makefile,v 1.27 2023/01/10 13:55:03 fcambus Exp $
 
-DISTNAME=      mold-1.6.0
+DISTNAME=      mold-1.9.0
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=rui314/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -32,6 +32,7 @@ GCC_REQD+=    10
 DL_AUTO_VARS=          yes
 PTHREAD_AUTO_VARS=     yes
 
+.include "../../archivers/zstd/buildlink3.mk"
 .include "../../devel/mimalloc/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../parallel/threadingbuildingblocks/buildlink3.mk"

Index: pkgsrc/devel/mold/PLIST
diff -u pkgsrc/devel/mold/PLIST:1.4 pkgsrc/devel/mold/PLIST:1.5
--- pkgsrc/devel/mold/PLIST:1.4 Fri Aug 19 08:59:48 2022
+++ pkgsrc/devel/mold/PLIST     Tue Jan 10 13:55:03 2023
@@ -1,6 +1,5 @@
-@comment $NetBSD: PLIST,v 1.4 2022/08/19 08:59:48 fcambus Exp $
+@comment $NetBSD: PLIST,v 1.5 2023/01/10 13:55:03 fcambus Exp $
 bin/ld.mold
-bin/ld64.mold
 bin/mold
 lib/mold/mold-wrapper.so
 libexec/mold/ld

Index: pkgsrc/devel/mold/distinfo
diff -u pkgsrc/devel/mold/distinfo:1.23 pkgsrc/devel/mold/distinfo:1.24
--- pkgsrc/devel/mold/distinfo:1.23     Fri Oct 21 06:17:04 2022
+++ pkgsrc/devel/mold/distinfo  Tue Jan 10 13:55:03 2023
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.23 2022/10/21 06:17:04 fcambus Exp $
+$NetBSD: distinfo,v 1.24 2023/01/10 13:55:03 fcambus Exp $
 
-BLAKE2s (mold-1.6.0.tar.gz) = d802e42767c43bf25adc11ec2d9b9b43ebd74649cb4bced77e2a9d52fcece8e0
-SHA512 (mold-1.6.0.tar.gz) = dcb498da95ee02a08b175861ae24f3793705671670f6f3487eebd3aab2487fd2163fc1747c9ca2fd1c3570a5f1f0bcfd7d4d91bf6a904a1ba098be6cbbe8c857
-Size (mold-1.6.0.tar.gz) = 8270834 bytes
+BLAKE2s (mold-1.9.0.tar.gz) = 0a00ce02244f9dbef32718df0fbba45d720c2c7c8abd43685eed1a6f5f98008e
+SHA512 (mold-1.9.0.tar.gz) = c1c45bced963d4f7c9b67905177157d6f76c518b234fe3eefa2a9ba6c35a08dd6659e64b7939744355ebcd72ae343ef0249ef6a0c80b4d77b1e69e327eb3ba19
+Size (mold-1.9.0.tar.gz) = 8163212 bytes
+SHA1 (patch-CMakeLists.txt) = 9cbdb1349afe9c2f7ef0d9715d250f548e212669

Added files:

Index: pkgsrc/devel/mold/patches/patch-CMakeLists.txt
diff -u /dev/null pkgsrc/devel/mold/patches/patch-CMakeLists.txt:1.1
--- /dev/null   Tue Jan 10 13:55:04 2023
+++ pkgsrc/devel/mold/patches/patch-CMakeLists.txt      Tue Jan 10 13:55:03 2023
@@ -0,0 +1,18 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2023/01/10 13:55:03 fcambus Exp $
+
+Disable precompiled headers.
+
+cc1plus: warning: cmake_pch.hxx.gch: had text segment at different address
+
+--- CMakeLists.txt.orig        2023-01-09 21:59:36.996076626 +0000
++++ CMakeLists.txt
+@@ -378,9 +378,6 @@ if(${CMAKE_VERSION} VERSION_GREATER_EQUA
+     target_precompile_headers(mold PRIVATE
+       "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/elf/mold.h>"
+       "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/macho/mold.h>")
+-  else()
+-    target_precompile_headers(mold PRIVATE
+-      "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/elf/mold.h>")
+   endif()
+ 
+   # ccache needs this flag along with `sloppiness = pch_defines,time_macros`



Home | Main Index | Thread Index | Old Index