hardening: add --enable-default-pie to configure

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 allows enabling PIE by default.
	* configure, config.in: Rebuild.
	* Makefile.in: Disable PIE when building the compiler.
	* doc/install.texi: Document new configure option for default PIE.
	* doc/invoke.texi: Likewise.
	* testsuite/gcc/default-pie.c: New test for new configure option
	--enable-default-pie
	* testsuite/gcc.dg/other/anon5.C: Add skip test as it fails 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.

Signed-off-by: Kees Cook <keescook@chromium.org>