]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - gcc/patches/01_all_gcc49_configure.patch
gcc: Update to version 4.9.1
[people/amarx/ipfire-3.x.git] / gcc / patches / 01_all_gcc49_configure.patch
CommitLineData
513f8ca4
MT
12013-12-30 Magnus Granberg <zorry@gentoo.org>
2
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
6
7
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])
12 fi
13
14+# --------------
15+# Esp checks
16+# --------------
17+
18+# Check whether --enable-esp was given and target have the support.
19+AC_ARG_ENABLE([esp],
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,
27+ enable_esp=no)
28+if test $enable_esp = yes ; then
29+ AC_MSG_CHECKING(if $target support esp)
30+ case "$target" in
31+ i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips-*-linux* | arm*-*-linux* | ia64-*-linux*)
32+ enable_esp=yes
33+ AC_DEFINE(ENABLE_ESP, 1,
34+ [Define if your target support esp and you have enable it.])
35+ ;;
36+ *)
37+ enable_esp=no
38+ ;;
39+ esac
40+AC_MSG_RESULT($enable_esp)
41+fi
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
46+ case "$target" in
47+ ia64*-*-linux*)
48+ enable_crtbeginP=no ;;
49+ *-*-linux*)
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.])
54+ fi
55+ ;;
56+ *) enable_crtbeginP=no ;;
57+ esac
58+ fi
59+ AC_MSG_RESULT($enable_crtbeginP)
60+fi
61+AC_SUBST([enable_crtbeginP])
62+
63 # Configure the subdirectories
64 # AC_CONFIG_SUBDIRS($subdirs)
65
66--- a/gcc/configure 2013-02-01 21:26:24.000000000 +0100
67+++ b/gcc/configure 2013-02-12 01:59:20.000000000 +0100
68@@ -600,6 +600,8 @@
69 ac_subst_vars='LTLIBOBJS
70 LIBOBJS
71 PICFLAG
72+enable_crtbeginP
73+enable_esp
74 enable_host_shared
75 enable_plugin
76 pluginlibs
77@@ -920,6 +922,7 @@
78 enable_plugin
79 enable_libquadmath_support
80 with_linker_hash_style
81+enable_esp
82 '
83 ac_precious_vars='build_alias
84 host_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.
94
95 Optional Packages:
96 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
97@@ -27419,6 +27427,59 @@
98
99 fi
100
101+# --------------
102+# Esp checks
103+# --------------
104+
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
109+else
110+ enable_esp=no
111+fi
112+
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; }
116+ case "$target" in
117+ i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips*-*-linux* | arm*-*-linux* | ia64-*-linux*)
118+ enable_esp=yes
119+
120+$as_echo "#define ENABLE_ESP 1" >>confdefs.h
121+
122+ ;;
123+ *)
124+ enable_esp=no
125+ ;;
126+ esac
127+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_esp" >&5
128+$as_echo "$enable_esp" >&6; }
129+fi
130+
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
135+ case "$target" in
136+ ia64*-*-linux*)
137+ enable_crtbeginP=no ;;
138+ *-*-linux*)
139+ if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then
140+ enable_crtbeginP=yes
141+
142+$as_echo "#define ENABLE_CRTBEGINP 1" >>confdefs.h
143+
144+ fi
145+ ;;
146+ *) enable_crtbeginP=no ;;
147+ esac
148+ fi
149+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_crtbeginP" >&5
150+$as_echo "$enable_crtbeginP" >&6; }
151+fi
152+
153+
154 # Configure the subdirectories
155 # AC_CONFIG_SUBDIRS($subdirs)
156