commit d196fa8
chld
·
2026-08-29 04:09:17 +0000 UTC
parent a2530b3
dash: static linking
1 files changed,
+10,
-8
+10,
-8
1@@ -5,7 +5,7 @@ RELEASE=1
2 SOURCE="http://gondor.apana.org.au/~herbert/${NAME}/files/${NAME}-${VERSION}.tar.gz"
3
4 build(){
5- CFLAGS="$CFLAGS -Oz -static" LDFLAGS='-L . -static' PREFIX="$PREFIX" CPPFLAGS='-L .' ./configure \
6+ CFLAGS="$CFLAGS -Oz -static" LDFLAGS='-static' PREFIX="$PREFIX" ./configure \
7 --prefix="$PREFIX" \
8 --bindir=/bin \
9 --sbindir=/bin \
10@@ -15,17 +15,19 @@ build(){
11 --disable-lto \
12 --disable-largefile \
13 --without-gnu-ld \
14- --enable-dependency-tracking \
15+ --disable-dependency-tracking \
16+ --disable-fnmatch \
17+ --disable-glob \
18+ --disable-shared \
19 --enable-static \
20 --disable-nls \
21- --with-ldflags='-L .' \
22- --with-cflags='-static -Oz' \
23- --without-pam \
24- --without-selinux \
25 || die "configure failed"
26
27- LDFLAGS='-L . -static' CPPFLAGS='-L .' CFLAGS='-L . -static -Oz' gmake || die "gmake failed"
28- LDFLAGS='-L . -static' CPPFLAGS='-L .' CFLAGS='-L . -static -Oz' PREFIX="$PREFIX" DESTDIR="$PKG" gmake install || die "gmake install failed"
29+ # for some reason, when building .o files it doesnt use our static flags im yelling for it to use
30+ sed -i 's/gcc/clang -static/g' Makefile
31+ sed -i 's/gcc/clang -static/g' src/Makefile
32+ LDFLAGS='-static' CFLAGS='-static -Oz' gmake || die "gmake failed"
33+ LDFLAGS='-static' CFLAGS='-static -Oz' PREFIX="$PREFIX" DESTDIR="$PKG" gmake install || die "gmake install failed"
34 }
35
36 . ${0%/*}/../../libsh/libdmake.sh