[Patch v2] ld testsuite: Fix some FAILs on MIPScaused by missing -fpic.
David Daney
david.daney@cavium.com
Fri Dec 9 23:19:00 GMT 2011
From the first version:
Since the beginning of time (or at least CVS), there has been
special code in the ld testsuite to omit -fpic from the flags used
for building shared libraries on MIPS. This worked for very old
versions of GCC where the generated code was always PIC by default.
Since GCC-4.3, -fpic has been mandatory for creation of shared
objects, and the testsuite's lack of this flag has caused many test
cases to fail.
I originally was removing special handling for mips*, but Nick
preferred checking for the GCC version instead, and supplied a modified
patch to do that. Nick's patch was failing with TCL syntax errors on
my Debian system with tcl 8.4, so I made a couple of modifications.
The result fixes about 35 FAILs on mips64-linux-gnu with no regressions.
OK to commit ?
2011-12-09 David Daney <david.daney@cavium.com>
Nick Clifton <nickc@redhat.com>
* ld-elfvers/vers.exp (picflag): Set to -fpic for mips*-*-* when
using GCC-4.3 or later.
(pic): Set to "yes" for mips*-*-linux*.
* ld-elfvsb/elfvsb.exp: Don't test non-PIC shared libraried on
mips*-*-linux*.
(picflag): Set to -fpic for mips*-*-* when using GCC-4.3 or later.
* ld-elfweak/elfweak.exp (picflag): Set to -fpic for mips*-*-*
when using GCC-4.3 or later.
* ld-shared/shared.exp (picflag): Same.
* lib/ld-lib.exp (at_least_gcc_version): New proc.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mips-pic.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20111209/ae61d463/attachment.ksh>
More information about the Binutils
mailing list