head 1.14; access; symbols pkgsrc-2022Q2:1.10.0.2 pkgsrc-2022Q2-base:1.10 pkgsrc-2022Q1:1.9.0.2 pkgsrc-2022Q1-base:1.9 pkgsrc-2021Q3:1.2.0.2 pkgsrc-2021Q3-base:1.2; locks; strict; comment @# @; 1.14 date 2022.09.10.15.44.29; author fcambus; state dead; branches; next 1.13; commitid SAB4leFpw4xnCkTD; 1.13 date 2022.09.04.14.37.16; author fcambus; state Exp; branches; next 1.12; commitid TsK7yjFsSDourySD; 1.12 date 2022.08.19.08.59.48; author fcambus; state Exp; branches; next 1.11; commitid 4devoGdZI3vC5tQD; 1.11 date 2022.08.06.09.13.47; author fcambus; state Exp; branches; next 1.10; commitid 37koLEgf4whfANOD; 1.10 date 2022.06.18.14.23.13; author fcambus; state Exp; branches; next 1.9; commitid Iegiqqk02trIRwID; 1.9 date 2022.03.08.14.04.57; author fcambus; state Exp; branches; next 1.8; commitid AUn1aWVIkZxz2qvD; 1.8 date 2022.02.21.11.47.41; author fcambus; state Exp; branches; next 1.7; commitid jO3WmDjWC7FWLttD; 1.7 date 2022.02.01.14.21.51; author fcambus; state Exp; branches; next 1.6; commitid iMqv11CYyAdIgVqD; 1.6 date 2022.01.31.22.44.55; author fcambus; state Exp; branches; next 1.5; commitid gCygLxtROQYf5QqD; 1.5 date 2022.01.19.02.52.24; author pho; state Exp; branches; next 1.4; commitid frfYzPGajxY7SbpD; 1.4 date 2021.12.16.08.37.31; author fcambus; state dead; branches; next 1.3; commitid UfXqJMaMEgq2SQkD; 1.3 date 2021.09.27.20.53.14; author fcambus; state Exp; branches; next 1.2; commitid i2iBsgsW6jS1wDaD; 1.2 date 2021.09.11.15.40.23; author fcambus; state Exp; branches; next 1.1; commitid QjltOMdxMBqAiy8D; 1.1 date 2021.07.29.21.17.17; author fcambus; state Exp; branches; next ; commitid 05hyGnb7IuyVzV2D; desc @@ 1.14 log @mold: switch to using CMake to build the project. The long term plan for mold is to drop the Makefile and only support CMake in the future. As wiz@@ pointed out, CMake is now called from the Makefile anyway and is required, so it makes sense to switch now. Python is now longer required as a build dependency, so clean those bits also. @ text @$NetBSD: patch-Makefile,v 1.13 2022/09/04 14:37:16 fcambus Exp $ - Do not hard-code -pthread, as it is handled by the pkgsrc infrastructure. - Do not hard-code -ldl --- Makefile.orig 2022-09-04 04:59:58.000000000 +0000 +++ Makefile @@@@ -52,7 +52,7 @@@@ MOLD_CXXFLAGS := -std=c++20 -fno-excepti ifeq ($(OS), OpenBSD) MOLD_LDFLAGS := -pthread -lz -lm else - MOLD_LDFLAGS := -pthread -lz -lm -ldl + MOLD_LDFLAGS := -lz -lm endif LTO = 0 @ 1.13 log @mold: update to 1.4.2. New features and bug fixes: - [RV32] We've fixed several issues for 32-bit RISC-V. mold can now build complex programs including itself for the target. - [ARM32] mold gained range extension thunks so that it can now link programs whose .text is larger than 16 MiB. Previously, mold couldn't link such large programs. We've also fixed general stability issues for ARM32. @ text @d1 1 a1 1 $NetBSD: patch-Makefile,v 1.12 2022/08/19 08:59:48 fcambus Exp $ @ 1.12 log @mold: update to 1.4.1. New features: - mold/macOS is now available as an alpha feature. We do not recommend using it for anything serious though. Starting from this version, we accept not only mold/Unix issues but also mold/macOS ones on our GitHub Issues. Feel free to file a bug if you encounter any problem. - We started supporting CMake in addition to Make to build mold. Our long-term plan is to migrate from Make to CMake because we want to support Windows eventually and CMake provides a better Windows support than Make does. Bug fixes and compatibility improvements: - There was a bug that mold accidentally exported a hidden symbol from an executable if a shared library linked to that executable happened to define the same symbol. This caused a build issue with Blender. The bug has been fixed. - --hash-style=both is now the default if no --hash-style option is given. Previously, --hash-style=sysv was the default. This change shouldn't affect most users because the compiler driver (cc, gcc, clang, etc.) always passes --hash-style to the linker. We made this change because GNU ld defaults to --hash-style=both. - Alias symbols defined by the --defsym option now have the same scope as the aliased symbols. Previously, alias symbols defined by --defsym were always hidden and never be exported as dynamic symbols. - mold now accepts foo = bar-style linker script directive to define symbol aliases. Previously, such statement was treated as a syntax error. This change was made to link mariadb-connector-c correctly. - Symbols in mergeable string sections now have correct output section indices instead of SHN_UNDEF. - [ARM32] Previously, calling a function from ARM code to Thumb code caused a program crash due to bug #442. This issue has been fixed. @ text @d1 1 a1 1 $NetBSD: patch-Makefile,v 1.11 2022/08/06 09:13:47 fcambus Exp $ d6 1 a6 1 --- Makefile.orig 2022-08-18 08:27:51.000000000 +0000 d8 7 a14 6 @@@@ -49,7 +49,7 @@@@ MOLD_CXXFLAGS := -std=c++20 -fno-excepti -fno-asynchronous-unwind-tables \ -DMOLD_VERSION=\"$(VERSION)\" -DLIBDIR="\"$(LIBDIR)\"" -MOLD_LDFLAGS := -pthread -lz -lm -ldl +MOLD_LDFLAGS := -lz -lm a16 1 ifeq ($(LTO), 1) @ 1.11 log @mold: update to 1.4.0. New features: - Initial support for the 32-bit RISC-V (RV32) has landed. - mold now demangles Rust symbols in error messages thanks to eddyb's rust-demangle.c. - --export-dynamic-symbol and --export-dynamic-symbol-list are now supported for the sake of compatibility with LLVM lld. With these options, you can specify symbols that should be exported using glob pattern. - [x86-64] PLT entries created by mold now always begins with ENDBR64 instruction to improve compatibility with Intel IBT (Indirect Branch Tracking.) Bug fixes and compatibility improvements: - mold now defines __dso_handle symbol. The lack of this linker-synthesized symbol caused a link error with GCC in some environments. @ text @d1 1 a1 1 $NetBSD: patch-Makefile,v 1.10 2022/06/18 14:23:13 fcambus Exp $ d6 1 a6 1 --- Makefile.orig 2022-08-04 12:47:21.000000000 +0000 d8 2 a9 2 @@@@ -48,7 +48,7 @@@@ MOLD_CXXFLAGS := -std=c++20 -fno-excepti -fno-asynchronous-unwind-tables -Ithird-party \ d15 2 a16 2 # Get a hash of the current git head. We don't want to use the git # command because the command prints out a warning if running under @ 1.10 log @mold: update to 1.3.0. Pkgsrc changes: - Remove now unneeded pkg-config from USE_TOOLS - Use on systems where doesn't exist - Link the bundled (patched) libtbb, as per upstream recommendation Bug fixes and compatibility improvements: - The --icf=safe option has been supported. This option enables a feature to find and deduplicate identical code that can be merged safely. For C++ programs, it typically reduces the output binary size by a few percent. --icf=safe needs to be used with a compiler that supports .llvm_addrsig section; if a compiler does not support it, --icf=safe doesn't do any harm but cannot optimize a given program at all. That section is supported by LLVM/Clang at the moment, and we are working on adding it to GCC. - LTO now works reliably under a heavy load. mold used to abort occasionally under such condition on Linux due to a spurious failure of pthread_create(2). - mold now prints out undefined symbol errors in a format similar to LLVM lld. - mold now prints out a better error message for the disk full situation. - mold can now build GCC 12 with LTO. - Fixed an LTO issue on 32-bits hosts such as i686. - mold is now AddressSanitizer and UndefinedSanitizer clean. - mold used to create broken debug info on 32-bits hosts. The bug has been fixed. - mold used to accept not only a single dash but also double dashes for single-letter options. For example, --S was accidentally accepted as an alias for-S. This is unconventional, and such options are no longer accepted. - --color-diagnostics is now an alias for --color-diagnostics=auto instead of --color-diagnostics=always for compatibility with LLVM lld. - pkg-config is no longer needed to build mold. - The --package-metadata option is supported. Removed features: - An experimental --preload flag has been removed. @ text @d1 1 a1 1 $NetBSD: patch-Makefile,v 1.9 2022/03/08 14:04:57 fcambus Exp $ d6 1 a6 1 --- Makefile.orig 2022-06-18 03:29:18.000000000 +0000 d8 2 a9 2 @@@@ -42,7 +42,7 @@@@ MOLD_CXXFLAGS := -std=c++20 -fno-excepti -fno-asynchronous-unwind-tables -Ithird-party/xxhash \ @ 1.9 log @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=. (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) @ text @d1 1 a1 1 $NetBSD: patch-Makefile,v 1.8 2022/02/21 11:47:41 fcambus Exp $ d6 1 a6 1 --- Makefile.orig 2022-03-07 10:38:14.000000000 +0000 d8 1 a8 1 @@@@ -49,7 +49,7 @@@@ MOLD_CXXFLAGS := -std=c++20 -fno-excepti d15 2 a16 2 GIT_HASH := $(shell [ -d .git ] && git rev-parse HEAD) ifneq ($(GIT_HASH),) @ 1.8 log @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) @ text @d1 1 a1 1 $NetBSD: patch-Makefile,v 1.6 2022/01/31 22:44:55 fcambus Exp $ a2 1 - Honour CFLAGS and CXXFLAGS d6 1 a6 1 --- Makefile.orig 2022-02-20 07:40:17.000000000 +0000 d8 1 a8 10 @@@@ -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 \ @ 1.7 log @mold: update to 1.0.3. mold 1.0.3 is a maintenance release of the high-speed linker. It contains only the following bug fix: build-static.sh didn't create a statically-linked mold executable (#315). The problem is now fixed. (601b9e6) @ text @d5 1 d7 1 a7 1 --- Makefile.orig 2022-01-30 10:39:38.000000000 +0000 d9 1 a9 1 @@@@ -34,14 +34,14 @@@@ endif d18 3 a20 3 MOLD_CXXFLAGS = -std=c++20 -fno-exceptions -fno-unwind-tables \ -fno-asynchronous-unwind-tables -DMOLD_VERSION=\"1.0.3\" \ -DLIBDIR="\"$(LIBDIR)\"" d22 2 a23 2 -MOLD_LDFLAGS = -pthread -lz -lm +MOLD_LDFLAGS = -lz -lm d25 1 a25 1 GIT_HASH = $(shell [ -d .git ] && git rev-parse HEAD) @ 1.6 log @mold: update to 1.0.2. New features: - mold now automatically falls back to ld.bfd or ld.lld if GCC-based LTO (link time optimization) or LLVM-based LTO are requested, respectively. This is a temporary hack until mold gains native LTO support. (a5029d1) - The following flags have been added: -z ibt (9ca6a9d), -z cet-report (31a43a7), -z shstk (e29bd8f), -z ibtplt (fbfa01d) - [ARM64] Range extension thunks are now supported. Previously, mold reported "relocation overflow" errors when the output file's text segment is larger than some threshold (~60 MiB). Now, it can link large programs just fine. (9287682) - [NetBSD] mold is now usable on NetBSD. (948248b) - [x86-64] mold now emits compact 8-byte PLT entries instead of the regular 16-byte PLT entries if -z now is given. (0370e7f) - RELR-type packed dynamic relocations are now supported. You can enable it by passing -z pack-dyn-relocs=relr. The good news is that it can typically reduce PIE (position-independent executable) size by a few percent. This is not a negligible saving because PIE is now default on many systems for security reasons. The bad news is that it needs a runtime support. To our knowledge, it's supported only on ChromeOS, Android, Fuchsia and SerenityOS at this moment. We need to wait for a while for other systems to catch up. (bd6afa1) Performance improvements: - Version script processor was rewritten with the Aho-Corasick string matching algorithm. If your program uses a version script that contains lots of glob patterns with the * metacharacter, you'll likely to see a significant speedup. (d0c1c4d) - Relocation processing for non-memory-allocated sections has been optimized. You'll likely to see a speedup if your binary contains large size of debug info. (d8dc8a6) Bug fixes and compatibility improvements: - mold can now link ICC-generated object files with GCC-generated ones even if the -static flag is given. (#271, be6ae07) - mold can now handle archive files (.a files) larger than 4 GiB. (bba506d) - mold no longer have "GNU gold" in its --version string. We had this identification string for some ./configure scripts that didn't work without it, but it causes other compatibility issue such as #284. Now, mold --version prints out something like mold 1.0.2 (compatible with GNU ld). We still need "GNU ld" for many ./configure scripts. (cea6a56) - Symbol resolution algorithm has been completely rewritten. The previous implementation was non-deterministic in some edge cases, meaning that outcomes from multiple runs of the linker with the same command line parameters could be different due to thread scheduling randomness or some other internal randomness. Now it is guaranteed to be deterministic. (ce5749c) - mold now try to pull out an object file from an archive if it's needed to resolve an undefined symbol with a common symbol. mold used to ignore common symbols in archives, so it could fail with an unresolved symbol error even if the undefined symbol could be resolved using a file in an archive. (27d8361) - mold no longer converts .ctors/.dtors sections into .init_array/.fini_array sections. mold used to convert them but in a wrong way. Since .ctors/.dtors have been superseded by .init_array/.fini_array long ago, it should be fine to stop doing this now. (4348417) - [i386] mold now ignores some legacy symbols in an i386 CRT files to avoid duplicate symbol errors. (#270, 0c19046) @ text @d1 1 a1 1 $NetBSD: patch-Makefile,v 1.5 2022/01/19 02:52:24 pho Exp $ d6 1 a6 1 --- Makefile.orig 2022-01-23 08:19:40.000000000 +0000 d18 1 a18 1 -fno-asynchronous-unwind-tables -DMOLD_VERSION=\"1.0.2\" \ @ 1.5 log @Compatibility with NetBSD @ text @d1 1 a1 1 $NetBSD$ d3 2 a4 2 Do not hard-code -ldl, -pthread, or -fPIE as they are handled by the pkgsrc infrastructure. d6 1 a6 1 --- Makefile.orig 2021-12-31 05:10:03.000000000 +0000 d8 1 a8 2 @@@@ -19,7 +19,7 @@@@ STRIP ?= strip OS ?= $(shell uname -s) d10 6 a15 3 # Used for both C and C++ -COMMON_FLAGS = -pthread -fPIE -fno-unwind-tables -fno-asynchronous-unwind-tables +COMMON_FLAGS = -fno-unwind-tables -fno-asynchronous-unwind-tables d17 3 a19 8 CFLAGS ?= -O2 CFLAGS += $(COMMON_FLAGS) @@@@ -27,7 +27,7 @@@@ CFLAGS += $(COMMON_FLAGS) CXXFLAGS ?= -O2 CXXFLAGS += $(COMMON_FLAGS) -std=c++20 -fno-exceptions CPPFLAGS += -DMOLD_VERSION=\"1.0.1\" -DLIBDIR="\"$(LIBDIR)\"" -LIBS = -pthread -lz -ldl -lm +LIBS = -lz -lm d21 2 a22 4 SRCS=$(wildcard *.cc elf/*.cc macho/*.cc) HEADERS=$(wildcard *.h elf/*.h macho/*.h) @@@@ -120,7 +120,7 @@@@ mold: $(OBJS) $(MIMALLOC_LIB) $(TBB_LIB) ln -sf mold ld64.mold d24 2 a25 6 mold-wrapper.so: elf/mold-wrapper.c Makefile - $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -shared -o $@@ $(LDFLAGS) $< -ldl + $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -shared -o $@@ $(LDFLAGS) $< out/%.o: %.cc $(HEADERS) Makefile out/elf/.keep out/macho/.keep $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@@ $< @ 1.4 log @mold: update to 1.0.0. mold 1.0 is the first stable and production-ready release of the high-speed linker. On Linux-based systems, it should "just work" as a faster drop-in replacement for the default GNU linker for most user-land programs. If you are building a large executable which takes a long time to link, mold is worth a try to see if it can shorten your build time. mold is easy to build and easy to use. For more details, see README. mold is created by a person who knows very well as to how the Unix linker should behave, as I'm also the original creator of the current version of the LLVM lld linker. There's no fancy new features in 1.0. Actually, 1.0 is very similar to 0.9.6. That being said, we'd like to make it clear by incrementing a major version number that mold for Linux is now stable. Changes since mold 0.9.6: - -start-lib and -end-lib options are added for compatibility with GNU gold and LLVM lld. - More ARM64 relocations are supported. - Compatibility with glibc 2.2 or prior has improved. (#120) - Compatibility with valgrind has improved. (#118) - -Bno-symbolic option has been supported. - -require-defined option has been supported. @ text @d1 1 a1 1 $NetBSD: patch-Makefile,v 1.3 2021/09/27 20:53:14 fcambus Exp $ d3 2 a4 4 - Remove hardcoded debug flag. - Remove hardcoded optimizations. - Do not gzip manual pages. - Fix manual page installation path. d6 1 a6 1 --- Makefile.orig 2021-09-27 05:54:15.000000000 +0000 d8 2 a9 1 @@@@ -10,7 +10,7 @@@@ GIT_HASH ?= $(shell [ -d .git ] && git r d11 3 a13 1 OS ?= $(shell uname -s) d15 8 a22 11 -CPPFLAGS = -g -pthread -std=c++20 -fPIE \ +CPPFLAGS = -pthread -std=c++20 -fPIE \ -DMOLD_VERSION=\"0.9.6\" \ -DGIT_HASH=\"$(GIT_HASH)\" \ $(EXTRA_CPPFLAGS) @@@@ -31,7 +31,6 @@@@ TSAN ?= 0 ifeq ($(DEBUG), 1) CPPFLAGS += -O0 else - CPPFLAGS += -O2 endif d24 4 a27 4 ifeq ($(LTO), 1) @@@@ -104,10 +103,8 @@@@ install: all install -m 644 mold-wrapper.so $(DEST)/lib/mold strip $(DEST)/lib/mold/mold-wrapper.so d29 3 a31 6 - install -m 755 -d $(DEST)/share/man/man1 - install -m 644 docs/mold.1 $(DEST)/share/man/man1 - rm -f $(DEST)/share/man/man1/mold.1.gz - gzip -9 $(DEST)/share/man/man1/mold.1 + install -m 755 -d $(DESTDIR)$(MAN_DIR)/man1 + install -m 644 docs/mold.1 $(DESTDIR)$(MAN_DIR)/man1 d33 2 a34 2 uninstall: rm -f $(DEST)/bin/mold @ 1.3 log @mold: update to 0.9.6. mold 0.9.6 is a maintenance release of the mold linker. This release contains only a single change to fix the following issue: mold used to create dynamic relocations for imported symbols when creating a position-dependent executable. That worked fine in an environment in which position-independent code (PIC) is enabled by default such as recent versions of most Linux distros. However, it failed with the "recompile with -fPIC" error if PIC was disabled and a dynamic relocation was created in a read-only section. mold 0.9.6 fixed the issue by creating copy relocations and PLTs for such symbols. @ text @d1 1 a1 1 $NetBSD: patch-Makefile,v 1.2 2021/09/11 15:40:23 fcambus Exp $ @ 1.2 log @mold: update to 0.9.5. Highlights of mold 0.9.5: - In 0.9.4, we changed the mold's behavior on remaining weak undefined symbols, so that they would be resolved to address zero if we were creating a shared object file with the -z defs option. Now, such symbols will be promoted to dynamic symbols so that they'll get another chance to be resolved at run-time. This change fixes a regression of Firefox build failure (#114), which depends on this particular linker behavior to export symbols from libxul.so. - mold can now be built on macOS. Note that mold is still able to produce only ELF (Unix) files — so you can use it for cross compilation on macOS for Linux, but you can't use mold for macOS native development. - Relocation overflow are now reported as errors on AArch64 and i386. Previously, such relocations were silently producing incorrect output. Highlights of mold 0.9.4: - mold -run now intercepts invocations of ld, ld.lld and ld.gold wherever they are in the directory hierarchy. Previously, they were intercepted only if they were in /usr/bin. This change was made because it is not uncommon to install a compiler toolchain into a directory other than the system bin directory. - AArch64 (Arm 64-bit) support has been significantly improved. mold can now link many real-world programs including itself for AArch64. - Fix an issue that relocation addends were not handled correctly for i386. - mold is now able to link LLVM compiler-rt's CRT files. - Fix an issue that a dynamic relocation was created for a read-only section if the relocation refers an unresolved weak symbol. - Undefined weak symbols are now always resolved to address 0 instead of being promoted to dynamic symbols. @ text @d1 1 a1 1 $NetBSD: patch-Makefile,v 1.1 2021/07/29 21:17:17 fcambus Exp $ d8 1 a8 1 --- Makefile.orig 2021-09-06 12:06:34.000000000 +0000 d16 1 a16 1 -DMOLD_VERSION=\"0.9.5\" \ @ 1.1 log @devel/mold: import mold-0.9.3. mold is a new linker that is optimized for modern multi-core machines. mold is command-line compatible with the other major linkers, GNU ld, GNU gold and LLVM lld, yet it is several times faster than them. Its goal is to increase programmer productivity by speeding up program build time, especially for rapid edit-build-test-debug cycles. @ text @d1 1 a1 1 $NetBSD$ a2 1 - Do not hardcode CC and CXX. d8 1 a8 1 --- Makefile.orig 2021-07-29 09:10:45.841721744 +0000 d10 1 a10 5 @@@@ -1,9 +1,9 @@@@ -CC = clang -CXX = clang++ +CC ?= clang +CXX ?= clang++ d12 1 a12 1 GIT_HASH ?= $(shell [ -d .git ] && git rev-parse HEAD) d14 3 a16 3 -CPPFLAGS = -g -Imimalloc/include -pthread -std=c++20 \ +CPPFLAGS = -Imimalloc/include -pthread -std=c++20 \ -DMOLD_VERSION=\"0.9.3\" \ d19 1 a19 1 @@@@ -25,7 +25,6 @@@@ TSAN ?= 0 d27 3 a29 3 @@@@ -95,10 +95,8 @@@@ install: all install -m 644 mold-wrapper.so $(DESTDIR)$(PREFIX)/lib/mold strip $(DESTDIR)$(PREFIX)/lib/mold/mold-wrapper.so d31 4 a34 4 - install -m 755 -d $(DESTDIR)$(PREFIX)/share/man/man1 - install -m 644 docs/mold.1 $(DESTDIR)$(PREFIX)/share/man/man1 - rm -f $(DESTDIR)$(PREFIX)/share/man/man1/mold.1.gz - gzip -9 $(DESTDIR)$(PREFIX)/share/man/man1/mold.1 d39 1 a39 1 rm -f $(DESTDIR)$(PREFIX)/bin/mold @