aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorArnaud Vrac <avrac@freebox.fr>2023-09-19 12:42:19 +0200
committerChris Packham <judge.packham@gmail.com>2024-06-05 19:31:45 +1200
commitf9ab04b63aee614ddfd3b50a4c6a0eac2094a2fe (patch)
tree1eaa45408e35d60d8358443f04cdc360a2c47973 /config
parentd4953677cdb286c12409b2b5b215de56c521a8b8 (diff)
downloadcrosstool-ng-f9ab04b63aee614ddfd3b50a4c6a0eac2094a2fe.tar.gz
crosstool-ng-f9ab04b63aee614ddfd3b50a4c6a0eac2094a2fe.tar.bz2
crosstool-ng-f9ab04b63aee614ddfd3b50a4c6a0eac2094a2fe.zip
Add mold linker build
Allows building the #mold linker, which can then be used in the cross-toolchain by passing the -fuse-ld=mold to the gcc flags. It is much faster than ld or gold. This requires a C++20 compiler and cmake. Initially implemented by Arnaud, and HC added configure check for cmake. Outstanding task to validate compiler is C++20 compatible. Signed-off-by: Arnaud Vrac <avrac@freebox.fr> Signed-off-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>
Diffstat (limited to 'config')
-rw-r--r--config/config.in1
-rw-r--r--config/linker.in12
-rw-r--r--config/linker/mold.in7
3 files changed, 20 insertions, 0 deletions
diff --git a/config/config.in b/config/config.in
index bbde6a66..47effa53 100644
--- a/config/config.in
+++ b/config/config.in
@@ -8,6 +8,7 @@ source "config/kernel.in"
source "config/binutils.in"
source "config/libc.in"
source "config/cc.in"
+source "config/linker.in"
source "config/debug.in"
source "config/comp_libs.in"
source "config/comp_tools.in"
diff --git a/config/linker.in b/config/linker.in
new file mode 100644
index 00000000..b17f77fd
--- /dev/null
+++ b/config/linker.in
@@ -0,0 +1,12 @@
+menu "Linkers"
+
+if BINUTILS_LINKER_LD || BINUTILS_LINKER_BOTH
+comment "BFD enabled in binutils"
+endif # BINUTILS_LINKER_LD
+if BINUTILS_LINKER_GOLD || BINUTILS_LINKER_BOTH
+comment "GOLD enabled in binutils"
+endif # BINUTILS_LINKER_GOLD
+
+source "config/gen/linker.in"
+
+endmenu
diff --git a/config/linker/mold.in b/config/linker/mold.in
new file mode 100644
index 00000000..2e605a91
--- /dev/null
+++ b/config/linker/mold.in
@@ -0,0 +1,7 @@
+# mold options
+
+config LINKER_MOLD_has_cmake
+ def_bool $(success,which cmake)
+
+comment "mold requires cmake"
+ depends on !LINKER_MOLD_has_cmake