Re: Support for visibility=hidden in gcc 4.x
Date: Tue, 13 Jun 2006 00:03:31 +0200 (CEST)
On Mon, 12 Jun 2006, Dan Fandrich wrote:
> Turning on this option gave me a 7% reduction in size of an HTTP-only
> libcurl build targeting i386 Linux. In fact, I was able to get libcurl down
> to 86 KiB using the size reduction techniques listed in the INSTALL
Nice work Dan. I'm quite impressed by that tiny footprint...
What would you say about this additional patch to the configure check?
diff -u -r1.197 configure.ac
--- configure.ac 12 Jun 2006 20:33:05 -0000 1.197
+++ configure.ac 12 Jun 2006 22:01:54 -0000
@@ -1968,9 +1968,20 @@
- AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
- CFLAGS="$CFLAGS -fvisibility=hidden"
+ AC_MSG_CHECKING([whether $CC supports it])
+ out=`$CC --help --verbose 2>&1 | grep fvisibility`
+ if test -n "$out"; then
+ AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
+ CFLAGS="$CFLAGS -fvisibility=hidden"
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2006-06-13