autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autoconf macro for gcc symbol visibility


From: Ralf Wildenhues
Subject: Re: autoconf macro for gcc symbol visibility
Date: Tue, 31 May 2005 17:27:08 +0200
User-agent: Mutt/1.4.1i

* J.T. Conklin wrote on Sun, May 29, 2005 at 07:34:46PM CEST:
> Does anyone have a macro for testing gcc's symbol visibility options
> (-fvisibility=hidden, etc.)?  The ACE/TAO autoconf scripts currently
> checks for gcc/g++ >= 4.0, but that loses on non-ELF targets.

I believe some Intel compilers support it as well.
Why don't you temporarily add this to CFLAGS/CPPFLAGS and test whether
the compiler barfs at the option?

Note also that some compilers won't error out on unknown flags (esp
Intel ones :)  but only issue a warning.  This may or may not matter for
you.  If it does: For example, Libtool-1.5.18 employs some trickery to
find out the difference (see AC_LIBTOOL_COMPILER_OPTION in libtool.m4):
compile a simple translation unit once without and once with the option
and compare the warnings generated.  BTW, if there is sufficient
interest, I could try to make a macro like this for general use to
Autoconf users (AC_LIBTOOL_COMPILER_OPTION is libtool-internal
interface).

Regards,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]