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: Wed, 1 Jun 2005 13:39:27 +0200
User-agent: Mutt/1.4.1i

* J.T. Conklin wrote on Tue, May 31, 2005 at 08:37:44PM CEST:
> Ralf Wildenhues <address@hidden> writes:
> > * 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?
> 
> gcc/g++ appears to silently accept the visibility options (at least
> the version Apple distributes does).  The ACE library compiled fine,
> but the test programs failed to link.  An autoconf macro may have to
> compile and link several files together to test this.

I don't understand: gcc (which version?) accepts the option and does
exactly what on non-ELF targets?  I believe it should either warn or
just ignore it, but how can your code fail then?  Do you perchance
depend on hidden visibility being available?  If so, then please note
that your code is not portable to some systems.  I guess you knew that,
though (I actually rather think I have just misunderstood you).

> I'm not opposed to writing the autoconf macro, but I was hoping that
> someone had already done it.

I don't know of such a macro myself.

Regards,
Ralf




reply via email to

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