repo/extra/ccache/build

27 lines
523 B
Plaintext
Raw Normal View History

2019-08-20 05:20:16 -06:00
#!/bin/sh -e
2022-08-22 14:15:49 -06:00
export LDFLAGS="$LDFLAGS -static"
2019-08-20 05:20:16 -06:00
2020-10-18 22:57:38 -06:00
cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
2021-08-19 21:29:37 -06:00
-DREDIS_STORAGE_BACKEND=OFF \
2020-10-18 22:57:38 -06:00
-DENABLE_TESTING=OFF \
-DZSTD_LIBRARY=/usr/lib/libzstd.a
2019-08-20 05:20:16 -06:00
2020-10-18 22:57:38 -06:00
cmake --build build
cmake --install build
2019-08-20 05:20:16 -06:00
mkdir -p "$1/usr/lib/ccache/bin"
2020-03-08 15:05:16 -06:00
host=$(cc -dumpmachine)
2019-08-20 05:20:16 -06:00
2020-10-18 22:57:38 -06:00
for link in \
cc "$host-cc" \
gcc "$host-gcc" \
g++ "$host-g++" \
cpp "$host-cpp" \
c++ "$host-c++"
do
2019-08-20 05:20:16 -06:00
ln -sf /usr/bin/ccache "$1/usr/lib/ccache/bin/$link"
done