diff options
author | Cem Keylan <cem@ckyln.com> | 2023-02-03 17:01:35 +0100 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2023-02-03 17:01:35 +0100 |
commit | 47997ed3d660a2e73664bd001c14c509790da30a (patch) | |
tree | 7cff9d4f0f376fbae3bebe7bd9380ed0fa026f1f /extra/mold/build | |
parent | 808a7e8170b3c8e998187ae0d422be63ac4d7e84 (diff) | |
download | repository-47997ed3d660a2e73664bd001c14c509790da30a.tar.gz |
mold: add new package at 1.10.1
Diffstat (limited to 'extra/mold/build')
-rwxr-xr-x | extra/mold/build | 24 |
1 files changed, 24 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" |