cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: Support for visibility=hidden in gcc 4.x

From: Daniel Stenberg <daniel_at_haxx.se>
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
> document.

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_MSG_RESULT(no)
         ;;
    *) AC_MSG_RESULT(yes)
- AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
- AC_SUBST(CURL_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_MSG_RESULT(yes)
+
+ AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
+ AC_SUBST(CURL_HIDDEN_SYMBOLS)
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ else
+ AC_MSG_RESULT(no)
+ fi
         ;;
    esac ],
         AC_MSG_RESULT(no)

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-06-13

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET