This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] FreeBSD add functionality to build PIE executables.


All,

this patch adds the ability to build PIE executables for FreeBSD. The core is since a longer time in the code base of FreeBSD itself and is working fine.

This patch makes it available for all FreeBSD targets.
Tested on x86_64-*-freebsd11.0 and armv6/hf-*-freebsd11.0, i386-*-freebsd11.0 is progress.

In the same turn I removed the STARTFILE/ENDFILE_SPEC from config/i386/freebsd.h and use the ones from config/freebsd-spec.h.

Here the results before the patch:

https://gcc.gnu.org/ml/gcc-testresults/2015-05/msg01267.html

and with the patch:

https://gcc.gnu.org/ml/gcc-testresults/2015-05/msg01324.html

Is this ok for trunk and for 5.1X?

Thanks,
Andreas

2015-05-11  Andreas Tobler  <andreast@gcc.gnu.org>

	* config/freebsd-spec.h (FBSD_STARTFILE_SPEC): Add the bits to build
	pie executables.
	(FBSD_ENDFILE_SPEC): Likewise.
	* config/i386/freebsd.h (STARTFILE_SPEC): Remove and use the one from
	config/freebsd-spec.h.
	(ENDFILE_SPEC): Likewise.

2015-05-11  Andreas Tobler  <andreast@gcc.gnu.org>

	* lib/target-supports.exp (check_effective_target_pie): Add *-*-freebsd*
	to the familiy of pie capable targets.

Attachment: fbsd_pie.diff
Description: Text document


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