aboutsummaryrefslogtreecommitdiff
path: root/extra/mold
diff options
context:
space:
mode:
Diffstat (limited to 'extra/mold')
-rwxr-xr-xextra/mold/build24
-rw-r--r--extra/mold/checksums3
-rw-r--r--extra/mold/depends3
-rw-r--r--extra/mold/meta3
-rw-r--r--extra/mold/sources2
-rw-r--r--extra/mold/version1
6 files changed, 36 insertions, 0 deletions
diff --git a/extra/mold/build b/extra/mold/build
new file mode 100755
index 00000000..477dc98c
--- /dev/null
+++ b/extra/mold/build
@@ -0,0 +1,24 @@
+#!/bin/sh -e
+
+# Create static library of xxhash to link locally.
+make -C xxhash
+
+export CXXFLAGS="$CXXFLAGS -I$PWD/xxhash -L$PWD/xxhash -static-libgcc -static-libstdc++"
+
+export DESTDIR="$1"
+
+cmake -B build \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DMI_BUILD_SHARED=OFF \
+ -DMOLD_MOSTLY_STATIC=ON
+
+cmake --build build
+cmake --install build
+
+ln -s mold "$1/usr/bin/ld"
+
+# Create symbolic link for GCC to use mold.
+mkdir -p "$1/usr/lib/mold"
+ln -s ../../bin/mold "$1/usr/lib/mold/ld"
diff --git a/extra/mold/checksums b/extra/mold/checksums
new file mode 100644
index 00000000..71790334
--- /dev/null
+++ b/extra/mold/checksums
@@ -0,0 +1,3 @@
+%BLAKE3
+8ea28f268341381e2869e9b0d90315ca420ec9710fed92c009ef8085c3ae782c v1.10.1.tar.gz
+65ffa3883d271c3949c4d7b69d3140196c02d4b3a0338ea163fb5bdd60a6161e v0.8.1.tar.gz
diff --git a/extra/mold/depends b/extra/mold/depends
new file mode 100644
index 00000000..ba0aaf32
--- /dev/null
+++ b/extra/mold/depends
@@ -0,0 +1,3 @@
+cmake make
+libressl make
+zlib make
diff --git a/extra/mold/meta b/extra/mold/meta
new file mode 100644
index 00000000..1df1bcc0
--- /dev/null
+++ b/extra/mold/meta
@@ -0,0 +1,3 @@
+description: A modern linker
+license: AGPL-3.0-or-later
+maintainer: Cem Keylan <cem@carbslinux.org>
diff --git a/extra/mold/sources b/extra/mold/sources
new file mode 100644
index 00000000..13d4e280
--- /dev/null
+++ b/extra/mold/sources
@@ -0,0 +1,2 @@
+https://github.com/rui314/mold/archive/refs/tags/v1.10.1.tar.gz
+https://github.com/Cyan4973/xxHash/archive/refs/tags/v0.8.1.tar.gz xxhash
diff --git a/extra/mold/version b/extra/mold/version
new file mode 100644
index 00000000..2c5565d6
--- /dev/null
+++ b/extra/mold/version
@@ -0,0 +1 @@
+1.10.1 1