[Top][All Lists]

[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: Thu, 2 Jun 2005 10:06:01 +0200
User-agent: Mutt/1.4.1i

Hi Stepan,

* Stepan Kasal wrote on Tue, May 31, 2005 at 08:30:03PM CEST:
> On Tue, May 31, 2005 at 05:27:08PM +0200, Ralf Wildenhues wrote:
> > 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).
> this looks as a general problem, so I guess the solution would really
> belong to Autoconf.

The problem to the "solution" is not well specified (yet).  Suppose I
want to check whether the compiler understands a given option.  First,
it may (and will) depend on the source file used.  Should that be user-
specified or rather whatever is the calculated by AC_LANG_PROGRAM and
the like?  For example, a given option `-DFOO=bar' will succeed, fail,
or warn depending on the source given.  Surely one might argue that such
an option is not a good candidate for such a macro, but the input might
come from some other precomputation.

Then, after this is solved, there is the issue that in order to be
error-prove, one would have to do two compilations for each compiler
option in question, once with and once without (because in theory the
two can interact, plus maybe the source file may have changed in
between).  With more knowledge it may be possible to speed this up.

Also in this thread it was already noted that such a macro would not
test for functionality in the sense that the compiler may accept the
option, but it won't do what you want (which is kind of against the
Autoconf Way[tm]).

Same discussion goes for linker options, mostly.


reply via email to

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