[PATCH][1-3] New configure option to enable Position independent executable as default.

Magnus Granberg zorry@gentoo.org
Thu Nov 14 01:20:00 GMT 2013


Hi
This patchset will add a new configure options --enable-default-pie.
With the new option enable will make it pass -fPIE and -pie from the gcc and 
g++ frontend. Have only add the support for two targets but should work on
more targes. In configure.ac we add the new option. We can't compile the 
compiler or the crt stuff with -fPIE it will brake the PCH and the crtbegin and
crtend files. The disabling is done in the Makefiles. The needed spec is added 
to DRIVER_SELF_SPECS. We disable all the profiling test for the linking will 
fail.Tested on x86_64 linux (Gentoo).

/Magnus Granberg

Changlog

2013-11-10  Magnus Granberg  <zorry@gentoo.org>

	/gcc
	* config/gnu-user.h: Define PIE_DRIVER_SELF_SPECS for PIE 
	as default and GNU_DRIVER_SELF_SPECS.
	* config/i386/gnu-user-common.h: Define DRIVER_SELF_SPECS
	* configure.ac: Add new option that enable PIE as default.
	* configure, config.in: Rebuild.
	* Makefile.in: Disable PIE when building the compiler.
	* doc/install.texi: Add the new configure option default PIE.
	* doc/invoke.texi: Add note for the new configure option default PIE.
	* testsuite/gcc/default-pie.c: New test for new configure option
	--enale-default-pie
	* testsuite/gcc.dg/other/anon5.C: Add skip test as it fail to link
	on effective_target default_pie.
	* testsuite/lib/target-supports.exp (check_profiling_available):
	We can't use profiling on effective target default_pie. 
	(check_effective_target_pie): Add check_effective_target_default_pie.

	/libgcc
	* Makefile.in: Disable PIE when building the crtbegin/end files.

----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc49_default_pie_main.patch
Type: text/x-patch
Size: 5364 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20131114/def62b80/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc49_default_pie_doc.patch
Type: text/x-patch
Size: 2062 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20131114/def62b80/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc49_default_pie_testsuite.patch
Type: text/x-patch
Size: 1847 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20131114/def62b80/attachment-0002.bin>


More information about the Gcc-patches mailing list