Patch RFA: Fix -fpie -fpic

Ian Lance Taylor iant@google.com
Tue Nov 13 20:46:00 GMT 2012


Right now if you run "gcc -fpie -fpic" you get, in effect, "gcc -fpie".
I think you should get "gcc -fpic".  In general I think that of the
options -fpic, -fPIC, -fpie, -fPIE, -fno-pic, -fno-PIC, -fno-pie,
-fno-PIE the compiler should act as though only the last of those
options were specified.  That follows the usual formulat in which the
last option wins.

This patch implements that.  Bootstrapped and tested on
x86_64-unknown-linux-gnu.  OK for mainline?

Ian


2012-11-13  Ian Lance Taylor  <iant@google.com>

	* common.opt (fPIC, fPIE, fpic, fpie): Create a Negative loop such
	that any of these options disables the others.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 885 bytes
Desc: patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20121113/d2f71a1a/attachment.bin>


More information about the Gcc-patches mailing list