|
|
|
@ -40,8 +40,14 @@ apk add openssl-libs-static zlib-static || true
@@ -40,8 +40,14 @@ apk add openssl-libs-static zlib-static || true
|
|
|
|
|
# gcc is apparantly incapable of building a static binary, even gcc -static helloworld.c ends up linked to libc, instead of solving, use clang |
|
|
|
|
export CC=clang |
|
|
|
|
|
|
|
|
|
# temp patch so it will build statically https://github.com/curl/curl/pull/7476 |
|
|
|
|
patch -p1 < ../static.patch |
|
|
|
|
apk add autoconf automake libtool |
|
|
|
|
autoreconf -fi |
|
|
|
|
# end temp patch |
|
|
|
|
|
|
|
|
|
# set up any required curl options here |
|
|
|
|
#LDFLAGS="-static" PKG_CONFIG="pkg-config --static" ./configure --disable-shared --enable-static --disable-libcurl-option --without-brotli --disable-manual --disable-unix-sockets --disable-dict --disable-file --disable-gopher --disable-imap --disable-smtp --disable-rtsp --disable-telnet --disable-tftp --disable-pop3 --without-zlib --disable-threaded-resolver --disable-ipv6 --disable-smb --disable-ntlm-wb --disable-tls-srp --disable-crypto-auth --with-ssl |
|
|
|
|
#LDFLAGS="-static" PKG_CONFIG="pkg-config --static" ./configure --disable-shared --enable-static --disable-libcurl-option --without-brotli --disable-manual --disable-unix-sockets --disable-dict --disable-file --disable-gopher --disable-imap --disable-smtp --disable-rtsp --disable-telnet --disable-tftp --disable-pop3 --without-zlib --disable-threaded-resolver --disable-ipv6 --disable-smb --disable-ntlm-wb --disable-tls-srp --disable-crypto-auth --without-ngtcp2 --without-nghttp2 --disable-ftp --disable-mqtt --disable-alt-svc --without-ssl |
|
|
|
|
|
|
|
|
|
LDFLAGS="-static" PKG_CONFIG="pkg-config --static" ./configure --disable-shared --enable-static --disable-ldap --enable-ipv6 --enable-unix-sockets --with-ssl --with-libssh2 |
|
|
|
|
|
|
|
|
@ -53,7 +59,8 @@ strip src/curl
@@ -53,7 +59,8 @@ strip src/curl
|
|
|
|
|
# print out some info about this, size, and to ensure it's actually fully static |
|
|
|
|
ls -lah src/curl |
|
|
|
|
file src/curl |
|
|
|
|
ldd src/curl || true |
|
|
|
|
# exit with error code 1 if the executable is dynamic, not static |
|
|
|
|
ldd src/curl && exit 1 || true |
|
|
|
|
|
|
|
|
|
./src/curl -V |
|
|
|
|
|
|
|
|
|