Remove test files.
/trunk/scripts/crosstool-NG.sh.in | 6 4 2 0 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
1 Original patch from: gentoo/src/patchsets/glibc/2.9/0010_all_glibc-2.7-ssp-compat.patch
3 -= BEGIN original header =-
4 Add backwards compat support for gcc-3.x ssp ... older ssp versions
5 used __guard and __stack_smash_handler symbols while gcc-4.1 and newer
6 uses __stack_chk_guard and __stack_chk_fail.
8 -= END original header =-
10 diff -durN glibc-2_9.orig/Versions.def glibc-2_9/Versions.def
11 --- glibc-2_9.orig/Versions.def 2008-08-01 19:13:40.000000000 +0200
12 +++ glibc-2_9/Versions.def 2009-02-02 22:00:33.000000000 +0100
17 +%ifdef ENABLE_OLD_SSP_COMPAT
23 diff -durN glibc-2_9.orig/config.h.in glibc-2_9/config.h.in
24 --- glibc-2_9.orig/config.h.in 2007-03-26 22:40:08.000000000 +0200
25 +++ glibc-2_9/config.h.in 2009-02-02 22:00:32.000000000 +0100
27 assembler instructions per line. Default is `;' */
30 +/* Define if we want to enable support for old ssp symbols */
31 +#undef ENABLE_OLD_SSP_COMPAT
33 /* Define if not using ELF, but `.init' and `.fini' sections are available. */
36 diff -durN glibc-2_9.orig/configure glibc-2_9/configure
37 --- glibc-2_9.orig/configure 2008-11-11 10:50:11.000000000 +0100
38 +++ glibc-2_9/configure 2009-02-02 22:00:32.000000000 +0100
40 --enable-kernel=VERSION compile for compatibility with kernel not older than
42 --enable-all-warnings enable all useful warnings gcc can issue
43 + --disable-old-ssp-compat
44 + enable support for older ssp symbols
48 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
49 @@ -6470,6 +6473,20 @@
50 echo "${ECHO_T}$libc_cv_ssp" >&6; }
53 +# Check whether --enable-old-ssp-compat or --disable-old-ssp-compat was given.
54 +if test "${enable_old_ssp_compat+set}" = set; then
55 + enableval="$enable_old_ssp_compat"
56 + enable_old_ssp_compat=$enableval
58 + enable_old_ssp_compat=no
60 +if test "x$enable_old_ssp_compat" = "xyes"; then
61 + cat >>confdefs.h <<\_ACEOF
62 +#define ENABLE_OLD_SSP_COMPAT 1
67 { echo "$as_me:$LINENO: checking for -fgnu89-inline" >&5
68 echo $ECHO_N "checking for -fgnu89-inline... $ECHO_C" >&6; }
69 if test "${libc_cv_gnu89_inline+set}" = set; then
70 diff -durN glibc-2_9.orig/configure.in glibc-2_9/configure.in
71 --- glibc-2_9.orig/configure.in 2008-11-11 10:50:11.000000000 +0100
72 +++ glibc-2_9/configure.in 2009-02-02 22:00:32.000000000 +0100
73 @@ -1647,6 +1647,15 @@
77 +AC_ARG_ENABLE([old-ssp-compat],
78 + AC_HELP_STRING([--enable-old-ssp-compat],
79 + [enable support for older ssp symbols @<:@default=no@:>@]),
80 + [enable_old_ssp_compat=$enableval],
81 + [enable_old_ssp_compat=no])
82 +if test "x$enable_old_ssp_compat" = "xyes"; then
83 + AC_DEFINE(ENABLE_OLD_SSP_COMPAT)
86 AC_CACHE_CHECK(for -fgnu89-inline, libc_cv_gnu89_inline, [dnl
87 cat > conftest.c <<EOF
89 diff -durN glibc-2_9.orig/csu/Versions glibc-2_9/csu/Versions
90 --- glibc-2_9.orig/csu/Versions 2006-10-28 01:11:41.000000000 +0200
91 +++ glibc-2_9/csu/Versions 2009-02-02 22:00:32.000000000 +0100
93 # New special glibc functions.
94 gnu_get_libc_release; gnu_get_libc_version;
97 +%ifdef ENABLE_OLD_SSP_COMPAT
98 + # global objects and functions for the old propolice patch in gcc
104 # This version is for the TLS symbol, GLIBC_2.0 is the old object symbol.
105 diff -durN glibc-2_9.orig/csu/libc-start.c glibc-2_9/csu/libc-start.c
106 --- glibc-2_9.orig/csu/libc-start.c 2007-08-21 00:27:50.000000000 +0200
107 +++ glibc-2_9/csu/libc-start.c 2009-02-02 22:00:32.000000000 +0100
109 uintptr_t __stack_chk_guard attribute_relro;
112 +#ifdef ENABLE_OLD_SSP_COMPAT
113 +uintptr_t __guard attribute_relro;
116 #ifdef HAVE_PTR_NTHREADS
117 /* We need atomic operations. */
120 /* Set up the stack checker's canary. */
121 uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard ();
122 +#ifdef ENABLE_OLD_SSP_COMPAT
123 + __guard = stack_chk_guard;
125 # ifdef THREAD_SET_STACK_GUARD
126 THREAD_SET_STACK_GUARD (stack_chk_guard);
128 diff -durN glibc-2_9.orig/debug/Versions glibc-2_9/debug/Versions
129 --- glibc-2_9.orig/debug/Versions 2008-03-05 07:53:41.000000000 +0100
130 +++ glibc-2_9/debug/Versions 2009-02-02 22:00:32.000000000 +0100
132 # These are to support some gcc features.
133 __cyg_profile_func_enter; __cyg_profile_func_exit;
135 +%ifdef ENABLE_OLD_SSP_COMPAT
137 + # backwards ssp compat support; alias to __stack_chk_fail
138 + __stack_smash_handler;
143 __memcpy_chk; __memmove_chk; __mempcpy_chk; __memset_chk; __stpcpy_chk;
144 diff -durN glibc-2_9.orig/debug/stack_chk_fail.c glibc-2_9/debug/stack_chk_fail.c
145 --- glibc-2_9.orig/debug/stack_chk_fail.c 2007-05-25 01:47:08.000000000 +0200
146 +++ glibc-2_9/debug/stack_chk_fail.c 2009-02-02 22:00:32.000000000 +0100
149 __fortify_fail ("stack smashing detected");
152 +#ifdef ENABLE_OLD_SSP_COMPAT
153 +strong_alias (__stack_chk_fail, __stack_smash_handler)
155 diff -durN glibc-2_9.orig/elf/Versions glibc-2_9/elf/Versions
156 --- glibc-2_9.orig/elf/Versions 2008-03-08 06:42:26.000000000 +0100
157 +++ glibc-2_9/elf/Versions 2009-02-02 22:00:33.000000000 +0100
159 # runtime interface to TLS
162 +%ifdef ENABLE_OLD_SSP_COMPAT
164 + # backwards ssp compat support
171 diff -durN glibc-2_9.orig/elf/rtld.c glibc-2_9/elf/rtld.c
172 --- glibc-2_9.orig/elf/rtld.c 2008-08-14 19:01:56.000000000 +0200
173 +++ glibc-2_9/elf/rtld.c 2009-02-02 22:00:32.000000000 +0100
175 in thread local area. */
176 uintptr_t __stack_chk_guard attribute_relro;
178 +#ifdef ENABLE_OLD_SSP_COMPAT
179 +uintptr_t __guard attribute_relro;
182 /* Only exported for architectures that don't store the pointer guard
183 value in thread local area. */
186 /* Set up the stack checker's canary. */
187 uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard ();
188 +#ifdef ENABLE_OLD_SSP_COMPAT
189 + __guard = stack_chk_guard;
191 #ifdef THREAD_SET_STACK_GUARD
192 THREAD_SET_STACK_GUARD (stack_chk_guard);