Last active
July 12, 2024 12:51
-
-
Save bagder/4d3e326b395f7706e550f68fcfe8ccc7 to your computer and use it in GitHub Desktop.
build a tiny curl (on Linux)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export CFLAGS="-Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -flto" | |
export LDFLAGS="-Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections" | |
./configure \ | |
--disable-cookies \ | |
--disable-crypto-auth \ | |
--disable-dict \ | |
--disable-file \ | |
--disable-ftp \ | |
--disable-gopher \ | |
--disable-imap \ | |
--disable-ldap \ | |
--disable-mqtt \ | |
--disable-pop3 \ | |
--disable-proxy \ | |
--disable-rtmp \ | |
--disable-rtsp \ | |
--disable-scp \ | |
--disable-sftp \ | |
--disable-smtp \ | |
--disable-telnet \ | |
--disable-tftp \ | |
--disable-unix-sockets \ | |
--disable-verbose \ | |
--disable-versioned-symbols \ | |
--disable-http-auth \ | |
--disable-doh \ | |
--disable-mime \ | |
--disable-dateparse \ | |
--disable-netrc \ | |
--disable-dnsshuffle \ | |
--disable-progress-meter \ | |
--enable-maintainer-mode \ | |
--enable-werror \ | |
--without-brotli \ | |
--without-gssapi \ | |
--without-libidn2 \ | |
--without-libpsl \ | |
--without-librtmp \ | |
--without-libssh2 \ | |
--without-nghttp2 \ | |
--without-ntlm-auth \ | |
--without-ssl \ | |
--without-zlib \ | |
--without-zstd \ | |
--with-wolfssl=[install prefix] |
Hi Does tinycurl my target architecture (e.g., ARM Cortex-M0+ for Raspberry Pi Pico)?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ran the build in an Alpine Linux container and the output is 4.9M. That's bigger than I had expected.
Edit: Of the output looks like only the curl file and lib/libcurl.so.4 were required. Brought the size down to 300k.