This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch v2] ld testsuite: Fix some FAILs on MIPScaused by missing -fpic.

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  <>
	Nick Clifton <>

	* 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
	(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.

Attachment: mips-pic.patch
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]