1 2013-12-30 Magnus Granberg <zorry@gentoo.org>
3 * gcc/configure.ac Add --enable-esp and define ENABLE_ESP.
4 Check if we support crtbeginP and define ENABLE_CRTBEGINP.
5 * gcc/configure Regenerated
8 --- a/gcc/configure.ac 2011-11-18 11:52:32.000000000 +0100
9 +++ b/gcc/configure.ac 2012-10-02 17:39:15.649526241 +0200
10 @@ -5130,6 +5237,55 @@ if test x"${LINKER_HASH_STYLE}" != x; th
11 [The linker hash style])
18 +# Check whether --enable-esp was given and target have the support.
20 +[AS_HELP_STRING([--enable-esp],
21 + [Enable Stack protector and Position independent executable as
22 + default if we have suppot for it when compiling
23 + and link with -z now as default.
24 + Linux targets supported i*86, x86_64, x32,
25 + powerpc, powerpc64, ia64, arm and mips.])],
26 + enable_esp=$enableval,
28 +if test $enable_esp = yes ; then
29 + AC_MSG_CHECKING(if $target support esp)
31 + i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips-*-linux* | arm*-*-linux* | ia64-*-linux*)
33 + AC_DEFINE(ENABLE_ESP, 1,
34 + [Define if your target support esp and you have enable it.])
40 +AC_MSG_RESULT($enable_esp)
42 +AC_SUBST([enable_esp])
43 +if test $enable_esp = yes ; then
44 + AC_MSG_CHECKING(checking for crtbeginP.o support)
45 + if test x$enable_esp = xyes ; then
48 + enable_crtbeginP=no ;;
50 + if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then
51 + enable_crtbeginP=yes
52 + AC_DEFINE(ENABLE_CRTBEGINP, 1,
53 + [Define if your compiler will support crtbeginP.])
56 + *) enable_crtbeginP=no ;;
59 + AC_MSG_RESULT($enable_crtbeginP)
61 +AC_SUBST([enable_crtbeginP])
63 # Configure the subdirectories
64 # AC_CONFIG_SUBDIRS($subdirs)
66 --- a/gcc/configure 2013-02-01 21:26:24.000000000 +0100
67 +++ b/gcc/configure 2013-02-12 01:59:20.000000000 +0100
69 ac_subst_vars='LTLIBOBJS
79 enable_libquadmath_support
80 with_linker_hash_style
83 ac_precious_vars='build_alias
85 @@ -1633,6 +1636,11 @@
86 --enable-plugin enable plugin support
87 --disable-libquadmath-support
88 disable libquadmath support for Fortran
89 + --enable-esp Enable Stack protector and Position independent
90 + executable as default if we have suppot for it when
91 + compiling and link with -z now as default.
92 + Linux targets supported i*86, x86_64, x32,
93 + powerpc, powerpc64, ia64, arm and mips.
96 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
97 @@ -27419,6 +27427,59 @@
105 +# Check whether --enable-esp was given and target have the support.
106 +# Check whether --enable-esp was given.
107 +if test "${enable_esp+set}" = set; then :
108 + enableval=$enable_esp; enable_esp=$enableval
113 +if test $enable_esp = yes ; then
114 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $target support esp" >&5
115 +$as_echo_n "checking if $target support esp... " >&6; }
117 + i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips*-*-linux* | arm*-*-linux* | ia64-*-linux*)
120 +$as_echo "#define ENABLE_ESP 1" >>confdefs.h
127 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_esp" >&5
128 +$as_echo "$enable_esp" >&6; }
131 +if test $enable_esp = yes ; then
132 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for crtbeginP.o support" >&5
133 +$as_echo_n "checking checking for crtbeginP.o support... " >&6; }
134 + if test x$enable_esp = xyes ; then
137 + enable_crtbeginP=no ;;
139 + if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then
140 + enable_crtbeginP=yes
142 +$as_echo "#define ENABLE_CRTBEGINP 1" >>confdefs.h
146 + *) enable_crtbeginP=no ;;
149 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_crtbeginP" >&5
150 +$as_echo "$enable_crtbeginP" >&6; }
154 # Configure the subdirectories
155 # AC_CONFIG_SUBDIRS($subdirs)