curl 7.79.0
moparisthebest/static-curl/pipeline/head This commit looks good Details

This commit is contained in:
Travis Burtrum 2021-09-15 07:59:20 -04:00
parent 2c435f392d
commit 4071d60345
2 changed files with 7 additions and 21 deletions

View File

@ -5,7 +5,7 @@
# docker run --rm -v $(pwd):/tmp -w /tmp -e ARCH=aarch64 multiarch/alpine:aarch64-latest-stable /tmp/build.sh # docker run --rm -v $(pwd):/tmp -w /tmp -e ARCH=aarch64 multiarch/alpine:aarch64-latest-stable /tmp/build.sh
# docker run --rm -v $(pwd):/tmp -w /tmp -e ARCH=ARCH_HERE ALPINE_IMAGE_HERE /tmp/build.sh # docker run --rm -v $(pwd):/tmp -w /tmp -e ARCH=ARCH_HERE ALPINE_IMAGE_HERE /tmp/build.sh
CURL_VERSION='7.78.0' CURL_VERSION='7.79.0'
[ "$1" != "" ] && CURL_VERSION="$1" [ "$1" != "" ] && CURL_VERSION="$1"
@ -40,18 +40,18 @@ 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 # 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 export CC=clang
# temp patch so it will build statically https://github.com/curl/curl/pull/7476 # apply patches if needed
patch -p1 < ../static.patch #patch -p1 < ../static.patch
apk add autoconf automake libtool #apk add autoconf automake libtool
autoreconf -fi #autoreconf -fi
# end temp patch # end apply patches
# set up any required curl options here # 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 --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-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 LDFLAGS="-static" PKG_CONFIG="pkg-config --static" ./configure --disable-shared --enable-static --disable-ldap --enable-ipv6 --enable-unix-sockets --with-ssl --with-libssh2
make -j4 V=1 curl_LDFLAGS=-all-static make -j4 V=1 LDFLAGS="-static -all-static"
# binary is ~13M before stripping, 2.6M after # binary is ~13M before stripping, 2.6M after
strip src/curl strip src/curl

View File

@ -1,14 +0,0 @@
diff --git a/src/Makefile.am b/src/Makefile.am
index 734373187..37e3a1564 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -66,6 +66,9 @@ else
curl_LDADD = $(top_builddir)/lib/libcurl.la @NSS_LIBS@ @SSL_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@
endif
+curl_LDFLAGS = $(curl_LDFLAGS)
+curl_CPPFLAGS = $(AM_CPPFLAGS)
+
# if unit tests are enabled, build a static library to link them with
if BUILD_UNITTESTS
noinst_LTLIBRARIES = libcurltool.la