This is the mail archive of the
mailing list for the binutils project.
Re: [Patch] ld testsuite: Fix some FAILs caused by missing -fpic.
- From: David Daney <david dot daney at cavium dot com>
- To: nick clifton <nickc at redhat dot com>
- Cc: binutils <binutils at sourceware dot org>, Richard Sandiford <rdsandiford at googlemail dot com>
- Date: Tue, 06 Dec 2011 09:11:36 -0800
- Subject: Re: [Patch] ld testsuite: Fix some FAILs caused by missing -fpic.
- References: <4EDD593B.firstname.lastname@example.org> <4EDDEF63.email@example.com>
On 12/06/2011 02:33 AM, nick clifton wrote:
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.
How old is "very old" ?
GCC-4.2 and earlier.
I propose that we remove this special handling and pass -fpic, just as
we do for almost all other targets. Doing this fixes about twenty FAILs.
If "very old" actually includes any of the 4.x versions of gcc then I
would be inclined to say that a better fix would be to check the gcc
version number and only omit "-fpic" if it is not needed.
That is too much work. Although I haven't tested it, supplying -fpic
will not break anything in any GCC version I know about. I think
GCC-2.95 and later should be fine with this, certainly any GCC-4.x and
later compiler can handle -fpic.