Skip to content

Commit d40bf27

Browse files
authored
1 parent 7804775 commit d40bf27

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

build.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ fi
1010
apk update
1111
apk add alpine-sdk util-linux strace file autoconf automake libtool
1212

13+
# Minimize binary size
14+
export CFLAGS="-ffunction-sections -fdata-sections -Os"
15+
1316
# Build static squashfuse
1417
apk add fuse3-dev fuse3-static zstd-dev zlib-dev zlib-static # fuse-static fuse-dev
1518
find / -name "libzstd.*" 2>/dev/null || true
@@ -18,7 +21,7 @@ tar xf e51978c.tar.gz
1821
cd squashfuse-*/
1922
./autogen.sh
2023
./configure --help
21-
./configure CFLAGS=-no-pie LDFLAGS=-static
24+
./configure CFLAGS="${CFLAGS} -no-pie" LDFLAGS=-static
2225
make -j"$(nproc)"
2326
make install
2427
/usr/bin/install -c -m 644 ./*.h '/usr/local/include/squashfuse' # ll.h

0 commit comments

Comments
 (0)