This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix libbacktrace -fPIC breakage from "Use libbacktrace in libgfortran"
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: uweigand at de dot ibm dot com
- Cc: ian at airs dot com, fxcoudert at gmail dot com, gcc-patches at gcc dot gnu dot org, ubizjak at gmail dot com, fortran at gcc dot gnu dot org
- Date: Wed, 26 Aug 2015 01:33:01 +0200
- Subject: Re: Fix libbacktrace -fPIC breakage from "Use libbacktrace in libgfortran"
- Authentication-results: sourceware.org; auth=none
> From: Ulrich Weigand <uweigand@de.ibm.com>
> Date: Tue, 25 Aug 2015 19:45:06 +0200
> Hans-Peter Nilsson wrote:
> However, neither works for the SPU, because in both cases libtool
> will only do the test whether the target supports the -fPIC option.
> It will not test whether the target supports dynamic libraries.
>
> [ It will do that test; and default to --disable-shared on SPU.
> That is a no-op for libbacktrace however, since it calls LT_INIT
> with the disable-shared option anyway.
Maybe it shouldn't?
> When adding back the -fPIC
> flag due to either the pic-only LT_INIT option or the -prefer-pic
> libtool command line option, it does not check for that again. ]
Sounds like a bug somewhere, in libtool or its current use:
there *should* be a way to specify "I'd prefer PIC code in these
static libraries".
But, I'll have to leave solving this PIC-failing-at-linkage
problem to you; I committed the current approved fix for
PIC-failing-at-compilation.
brgds, H-P