bug-libtool
[Top][All Lists]
Advanced

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

Re: Bug#219490: libtool: Completely dumb assumption can make -fPIC test


From: Bob Friesenhahn
Subject: Re: Bug#219490: libtool: Completely dumb assumption can make -fPIC test fail
Date: Fri, 7 Nov 2003 10:27:38 -0600 (CST)

On Fri, 7 Nov 2003, Josselin Mouette wrote:

> Le ven 07/11/2003 à 04:03, Scott James Remnant a écrit :
> > > The comments says all. Of course there can be other warnings! Especially
> > > given that the test re-uses all previously set compiler flags!
> > >
> > > Luckily, GCC is not prone to give warnings with 1-liners C files. Still,
> > > for example, using -Wpadded, it will on powerpc and alpha. This example
> > > made hdf5 FTBFS because -fPIC was wrongly detected as non-working on
> > > these arches.
> > >
> > Could you suggest an alternate test?
>
> Well, it could compare the compiler output without and with -fPIC.
>
> A simpler solution would be not to use previously set CFLAGS, as they
> can give results different from what is expected with standard CFLAGS,
> and we don't need them just to test whether -fPIC works.

It is not safe to make assumptions about CFLAGS.  It is possible that
the user-provided CFLAGS provides target/compiler information which
influences whether -fPIC is necessary/works.

Comparing the compiler output seems ok as long as the test source code
is known to necessarily produce different output when -fPIC is
supplied.

Bob
======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen





reply via email to

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