aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8.0/piepatch/01_all_gcc48_configure.patch')
-rw-r--r--gcc-4.8.0/piepatch/01_all_gcc48_configure.patch124
1 files changed, 116 insertions, 8 deletions
diff --git a/gcc-4.8.0/piepatch/01_all_gcc48_configure.patch b/gcc-4.8.0/piepatch/01_all_gcc48_configure.patch
index 47a1a05..1d3b429 100644
--- a/gcc-4.8.0/piepatch/01_all_gcc48_configure.patch
+++ b/gcc-4.8.0/piepatch/01_all_gcc48_configure.patch
@@ -1,3 +1,111 @@
+2013-04-01 Magnus Granberg <zorry@gentoo.org>
+
+ * configure.ac Add --enable-esp. Add -fno-stack-protector
+ to stage1_cflags.
+ * configure Regenerated
+ * gcc/configure.ac Add --enable-esp and define ENABLE_ESP.
+ Check if we support crtbeginP and define ENABLE_CRTBEGINP.
+ * gcc/configure Regenerated
+
+--- a/configure.ac 2011-11-29 22:36:43.000000000 +0100
++++ b/configure.ac 2011-12-07 23:29:26.125712475 +0100
+@@ -419,6 +419,26 @@ if test "${ENABLE_LIBADA}" != "yes" ; th
+ noconfigdirs="$noconfigdirs gnattools"
+ fi
+
++# Check whether --enable-esp was given and target have the support.
++AC_ARG_ENABLE([esp],
++[AS_HELP_STRING([--enable-esp],
++ [Enable Stack protector and Position independent executable as
++ default if we have suppot for it when compiling
++ and link with -z relro and -z now as default.
++ Linux targets supported i*86, x86_64, x32,
++ powerpc, powerpc64, ia64, arm and mips.])],
++[
++ case $target in
++ i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips-*-linux* | arm*-*-linux* | ia64-*-linux*)
++ enable_esp=yes
++ ;;
++ *)
++ AC_MSG_WARN([*** --enable-esp is not supported on this $target target.])
++ ;;
++ esac
++])
++AC_SUBST([enable_esp])
++
+ AC_ARG_ENABLE(libssp,
+ [AS_HELP_STRING([--enable-libssp], [build libssp directory])],
+ ENABLE_LIBSSP=$enableval,
+@@ -3211,6 +3230,11 @@ if test "$GCC" = yes -a "$ENABLE_BUILD_W
+ CFLAGS="$saved_CFLAGS"
+ fi
+
++# Disable -fstack-protector on stage1
++if test x$enable_esp = xyes; then
++ stage1_cflags="$stage1_cflags -fno-stack-protector"
++fi
++
+ AC_SUBST(stage1_cflags)
+
+ # Enable --enable-checking in stage1 of the compiler.
+--- a/gcc/configure.ac 2011-11-18 11:52:32.000000000 +0100
++++ b/gcc/configure.ac 2012-10-02 17:39:15.649526241 +0200
+@@ -5130,6 +5237,55 @@ if test x"${LINKER_HASH_STYLE}" != x; th
+ [The linker hash style])
+ fi
+
++# --------------
++# Esp checks
++# --------------
++
++# Check whether --enable-esp was given and target have the support.
++AC_ARG_ENABLE([esp],
++[AS_HELP_STRING([--enable-esp],
++ [Enable Stack protector and Position independent executable as
++ default if we have suppot for it when compiling
++ and link with -z now as default.
++ Linux targets supported i*86, x86_64, x32,
++ powerpc, powerpc64, ia64, arm and mips.])],
++ enable_esp=$enableval,
++ enable_esp=no)
++if test $enable_esp = yes ; then
++ AC_MSG_CHECKING(if $target support esp)
++ case "$target" in
++ i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips-*-linux* | arm*-*-linux* | ia64-*-linux*)
++ enable_esp=yes
++ AC_DEFINE(ENABLE_ESP, 1,
++ [Define if your target support esp and you have enable it.])
++ ;;
++ *)
++ enable_esp=no
++ ;;
++ esac
++AC_MSG_RESULT($enable_esp)
++fi
++AC_SUBST([enable_esp])
++if test $enable_esp = yes ; then
++ AC_MSG_CHECKING(checking for crtbeginP.o support)
++ if test x$enable_esp = xyes ; then
++ case "$target" in
++ ia64*-*-linux*)
++ enable_crtbeginP=no ;;
++ *-*-linux*)
++ if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then
++ enable_crtbeginP=yes
++ AC_DEFINE(ENABLE_CRTBEGINP, 1,
++ [Define if your compiler will support crtbeginP.])
++ fi
++ ;;
++ *) enable_crtbeginP=no ;;
++ esac
++ fi
++ AC_MSG_RESULT($enable_crtbeginP)
++fi
++AC_SUBST([enable_crtbeginP])
++
+ # Configure the subdirectories
+ # AC_CONFIG_SUBDIRS($subdirs)
+
--- a/configure 2013-02-05 23:36:20.000000000 +0100
+++ b/configure 2013-02-12 01:59:04.000000000 +0100
@@ -670,6 +670,7 @@
@@ -22,9 +130,9 @@
--enable-libada build libada directory
+ --enable-esp Enable Stack protector and Position independent
+ executable as default if we have suppot for it when
-+ compiling and link with -z relro and -z now as
-+ default. Linux targets supported i*86, x86_64, x32,
-+ powerpc, powerpc64, ia64 and arm.
++ compiling and link with and -z now as default.
++ Linux targets supported i*86, x86_64, x32,
++ powerpc, powerpc64, ia64, arm and mips.
--enable-libssp build libssp directory
--disable-libstdcxx do not build libstdc++-v3 directory
--enable-static-libjava[=ARG]
@@ -37,7 +145,7 @@
+if test "${enable_esp+set}" = set; then :
+ enableval=$enable_esp;
+ case $target in
-+ i?86*-*-linux* | x86_64-*-linux* | powerpc-*-linux* | powerpc64-*-linux* | arm*-*-linux* | ia64-*-linux*)
++ i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips*-*-linux* | arm*-*-linux* | ia64-*-linux*)
+ enable_esp=yes
+ ;;
+ *)
@@ -90,9 +198,9 @@
disable libquadmath support for Fortran
+ --enable-esp Enable Stack protector and Position independent
+ executable as default if we have suppot for it when
-+ compiling and link with -z relro and -z now as
-+ default. Linux targets supported i*86, x86_64, x32,
-+ powerpc, powerpc64, ia64 and arm.
++ compiling and link with -z now as default.
++ Linux targets supported i*86, x86_64, x32,
++ powerpc, powerpc64, ia64, arm and mips.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -116,7 +224,7 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $target support esp" >&5
+$as_echo_n "checking if $target support esp... " >&6; }
+ case "$target" in
-+ i?86*-*-linux* | x86_64-*-linux* | powerpc-*-linux* | powerpc64-*-linux* | arm*-*-linux* | ia64-*-linux*)
++ i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips*-*-linux* | arm*-*-linux* | ia64-*-linux*)
+ enable_esp=yes
+
+$as_echo "#define ENABLE_ESP 1" >>confdefs.h