[RFA:] testsuite/target-supports.exp: check_effective_target_fpic

Daniel Jacobowitz drow@false.org
Wed Apr 6 01:05:00 GMT 2005


On Wed, Apr 06, 2005 at 02:58:23AM +0200, Hans-Peter Nilsson wrote:
> > Date: Tue, 5 Apr 2005 20:56:48 -0400
> > From: Daniel Jacobowitz <drow@false.org>
> 
> > On Wed, Apr 06, 2005 at 02:48:56AM +0200, Hans-Peter Nilsson wrote:
> > > + # Return 1 if -fpic and -fPIC are supported, as in no warnings or errors
> > > + # emitted, 0 otherwise.  Whether a shared library can actually be built is
> > > + # out of scope for this test.
> > > + #
> > > + # This won't change for different subtargets, so cache the result.
> > 
> > Why not?  There can be multilibs incompatible with position-independent
> > code.
> 
> In theory, yes.  Do you know of any in practice?

We implemented one several weeks ago (not contributed yet, but it will
be) - defined for ARM but not Thumb.

M68K has one:
  /* -fPIC uses 32-bit pc-relative displacements, which don't exist
     until the 68020.  */
  if (!TARGET_68020 && !TARGET_COLDFIRE && (flag_pic == 2))
    error("-fPIC is not currently supported on the 68000 or 68010\n");


-- 
Daniel Jacobowitz
CodeSourcery, LLC



More information about the Gcc-patches mailing list