We are using libcurl for one of our embedded applications in a PowerPC
architecture. We are using libcurl for HTTP alone. I am trying to reduce
the footprint of the library. I used the following configure options:
./configure --target=powerpc-hardhat-linux --host=powerpc-hardhat-linux
--build=i586-pc-linux-gnu --with-random=/dev/urandom --disable-ftp
--disable-ldap --disable-dict --disable-telnet --disable-tftp
--disable-verbose --disable-debug --disable-manual --disable-sspi
--disable-thread --disable-ares --disable-cookies --disable-gopher
--disable-file --disable-crypto-auth --disable-ipv6 --enable-hidden-symbols
--without-ssl --without-libidn --without-zlib --without-libssh2
--without-gnutls --without-nss --without-ca-bundle --without-libidn
With the above options and stripping, I can get a library of size 153 KB.
But I cannot afford a size of more than 100 KB. The man page for install
says that I could get a size as small as 90KB. Also I was looking into the
mailing thread at http://curl.haxx.se/mail/lib-2004-07/0051.html
I do not know how to implement the optimizations mentioned in the thread.
Could someone please explain me with syntax how I could include the
following optimizations mentioned in the thread?
"Since you only want http, the supplied getdate.y is overkill and could be
greatly dumbed down, saving 10 KB"
"By preventing the linking of various unneeded stub files into the shared
library, you could save couple KB"
"If you don't need HTTP digest authentication, you could add some #ifdefs in
the code and add a --without-digest configure option and safe another 8 KB"
"If you don't need verbose error strings, you could add a --without-strerror
and save another 6 KB"
Also please let me know of other suggestions that could bring down my size.
Received on 2007-09-25