mirror of
https://codeberg.org/kiss-community/repo
synced 2024-12-25 00:30:06 -07:00
22 lines
617 B
Bash
Executable File
22 lines
617 B
Bash
Executable File
#!/bin/sh -e
|
|
|
|
make -C xxhash
|
|
|
|
# Point mold to the local xxhash.
|
|
export CXXFLAGS="-L$PWD/xxhash -I$PWD/xxhash $CXXFLAGS"
|
|
|
|
# Force a static build so shared library breakage does not also break the
|
|
# linker (and therefore the ability to recover from the issue).
|
|
export LDFLAGS="$LDFLAGS -static"
|
|
|
|
make
|
|
make install
|
|
|
|
# Create a symbolic link so users can use mold as the linker system-wide
|
|
# (without need for special CFLAGS/CXXFLAGS).
|
|
ln -s mold "$1/usr/bin/ld"
|
|
|
|
# To tell GCC to use mold we must put a symlink to it in a directory and set it
|
|
# to search for the linker within.
|
|
ln -s ../../bin/mold "$1/usr/lib/mold/ld"
|