From 5028e0f506538dee03ebdb782009c8d6d66e2e76 Mon Sep 17 00:00:00 2001 From: Magnus Granberg Date: Wed, 22 Aug 2012 21:18:25 +0200 Subject: update the testsuite patches rename files --- upstream/testsuite-hardening-fortify.patch | 44 ++++++++++++++ upstream/testsuite-hardening-piessp.patch | 98 ++++++++++++++++++++++++++++++ upstream/testsuite.patch | 44 -------------- upstream/testsuite_no_espf.patch | 98 ------------------------------ 4 files changed, 142 insertions(+), 142 deletions(-) create mode 100644 upstream/testsuite-hardening-fortify.patch create mode 100644 upstream/testsuite-hardening-piessp.patch delete mode 100644 upstream/testsuite.patch delete mode 100644 upstream/testsuite_no_espf.patch diff --git a/upstream/testsuite-hardening-fortify.patch b/upstream/testsuite-hardening-fortify.patch new file mode 100644 index 0000000..82456cc --- /dev/null +++ b/upstream/testsuite-hardening-fortify.patch @@ -0,0 +1,44 @@ +--- a/gcc/testsuite/lib/target-supports.exp 2012-02-22 12:00:21.000000000 +0100 ++++ b/gcc/testsuite/lib/target-supports.exp 2012-07-27 19:19:30.849216278 +0200 +@@ -4419,6 +4419,14 @@ proc check_effective_target_lto { } { + return [info exists ENABLE_LTO] + } + ++# Return 1 if the compiler has been configure with espf ++# (configure --enable-espf=(all|ssp|pie)) support. ++ ++proc check_effective_target_espf { } { ++ global ENABLE_ESPF ++ return [info exists ENABLE_ESPF] ++} ++ + # Return 1 if this target supports the -fsplit-stack option, 0 + # otherwise. + +--- a/gcc/testsuite/gcc.c-torture/execute/memset-1.x 2012-08-18 14:43:31.963694252 +0200 ++++ b/gcc/testsuite/gcc.c-torture/execute/memset-1.x 2012-07-27 21:47:01.000000000 +0200 +@@ -0,0 +1,6 @@ ++load_lib target-supports.exp ++ ++if { [check_effective_target_espf] } { ++ set additional_flags "-U_FORTIFY_SOURCE" ++} ++return 0 +--- a/gcc/testsuite/gcc.c-torture/execute/vprintf-chk-1.x 2012-07-30 02:31:20.573793905 +0200 ++++ b/gcc/testsuite/gcc.c-torture/execute/vprintf-chk-1.x 2012-07-27 21:47:01.574480025 +0200 +@@ -0,0 +1,6 @@ ++load_lib target-supports.exp ++ ++if [check_effective_target_espf] { ++ set additional_flags "-U_FORTIFY_SOURCE" ++} ++return 0 +--- a/gcc/testsuite/gcc.c-torture/execute/vfprintf-chk-1.x 2012-07-30 02:31:07.366794031 +0200 ++++ b/gcc/testsuite/gcc.c-torture/execute/vfprintf-chk-1.x 2012-07-27 21:47:01.000000000 +0200 +@@ -0,0 +1,6 @@ ++load_lib target-supports.exp ++ ++if [check_effective_target_espf] { ++ set additional_flags "-U_FORTIFY_SOURCE" ++} ++return 0 diff --git a/upstream/testsuite-hardening-piessp.patch b/upstream/testsuite-hardening-piessp.patch new file mode 100644 index 0000000..8991a69 --- /dev/null +++ b/upstream/testsuite-hardening-piessp.patch @@ -0,0 +1,98 @@ +--- a/gcc/testsuite/gcc.dg/20021014-1.c 2009-10-02 01:08:07.000000000 +0200 ++++ b/gcc/testsuite/gcc.dg/20021014-1.c 2012-08-14 23:50:16.724373103 +0200 +@@ -1,6 +1,7 @@ + /* { dg-do run } */ + /* { dg-require-profiling "-p" } */ + /* { dg-options "-O2 -p" } */ ++/* { dg-additional-options "-fno-PIE" { target espf } } */ + /* { dg-options "-O2 -p -static" { target hppa*-*-hpux* } } */ + /* { dg-error "profiler" "No profiler support" { target xstormy16-*-* } 0 } */ + /* { dg-message "" "consider using `-pg' instead of `-p' with gprof(1)" { target *-*-freebsd* } 0 } */ +--- a/gcc/testsuite/gcc.dg/nest.c 2007-08-30 07:23:02.000000000 +0200 ++++ b/gcc/testsuite/gcc.dg/nest.c 2012-08-14 23:51:44.797375728 +0200 +@@ -3,6 +3,7 @@ + /* { dg-require-profiling "-pg" } */ + /* { dg-options "-O2 -pg" } */ + /* { dg-options "-O2 -pg -static" { target hppa*-*-hpux* } } */ ++/* { dg-additional-options "-fno-PIE" { target espf } } */ + /* { dg-error "profiler" "No profiler support" { target xstormy16-*-* } 0 } */ + + extern void abort (void); +--- a/gcc/testsuite/gcc.dg/nested-func-4.c 2007-08-30 07:23:02.000000000 +0200 ++++ b/gcc/testsuite/gcc.dg/nested-func-4.c 2012-08-14 23:52:23.337376877 +0200 +@@ -1,6 +1,7 @@ + /* { dg-do run } */ + /* { dg-options "-pg" } */ + /* { dg-options "-pg -static" { target hppa*-*-hpux* } } */ ++/* { dg-additional-options "-fno-PIE" { target espf } } */ + /* { dg-require-profiling "-pg" } */ + + extern void abort(void); +--- a/gcc/testsuite/gcc.dg/pr32450.c 2007-08-30 07:23:02.000000000 +0200 ++++ b/gcc/testsuite/gcc.dg/pr32450.c 2012-08-14 23:53:38.125379106 +0200 +@@ -5,6 +5,7 @@ + /* { dg-options "-O2 -pg" } */ + /* { dg-options "-O2 -pg -mtune=core2" { target { i?86-*-* x86_64-*-* } } } */ + /* { dg-options "-O2 -pg -static" { target hppa*-*-hpux* } } */ ++/* { dg-additional-options "-fno-PIE" { target espf } } */ + + extern void abort (void); + +--- a/gcc/testsuite/gcc.dg/pr43643.c 2010-04-14 18:47:15.000000000 +0200 ++++ b/gcc/testsuite/gcc.dg/pr43643.c 2012-08-14 23:54:20.084380356 +0200 +@@ -4,6 +4,7 @@ + /* { dg-require-profiling "-pg" } */ + /* { dg-options "-O2 -pg" } */ + /* { dg-options "-O2 -pg -static" { target hppa*-*-hpux* } } */ ++/* { dg-additional-options "-fno-PIE" { target espf } } */ + + extern char *strdup (const char *); + +--- a/gcc.dg/tree-ssa/ssa-store-ccp-3.c 2011-08-07 09:45:57.000000000 +0200 ++++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c 2012-08-14 23:59:24.489389427 +0200 +@@ -3,6 +3,7 @@ + defined for executables as well as shared libraries. */ + /* { dg-skip-if "" { *-*-darwin* hppa*64*-*-* mips*-*-linux* mips*-*-irix* *-*-mingw* } { "*" } { "" } } */ + /* { dg-options "-O2 -fno-common -fdump-tree-optimized" } */ ++/* { dg-skip-if "" { espf } { "*" } { "" } } */ */ + + const int conststaticvariable; + +--- a/gcc/testsuite/gcc.dg/stack-usage-1.c 2012-02-23 19:10:53.000000000 +0100 ++++ b/gcc/testsuite/gcc.dg/stack-usage-1.c 2012-08-14 23:55:37.558382664 +0200 +@@ -1,5 +1,6 @@ + /* { dg-do compile } */ + /* { dg-options "-fstack-usage" } */ ++/* { dg-additional-options "-fno-stack-protector" { target espf } } */ + + /* This is aimed at testing basic support for -fstack-usage in the back-ends. + See the SPARC back-end for example (grep flag_stack_usage_info in sparc.c). +--- a/gcc/testsuite/gcc.dg/superblock.c 2012-08-15 00:28:32.995441532 +0200 ++++ b/gcc/testsuite/gcc.dg/superblock.c 2012-08-14 23:56:30.159384232 +0200 +@@ -1,5 +1,6 @@ + /* { dg-do compile } */ + /* { dg-options "-O2 -fno-asynchronous-unwind-tables -fsched2-use-superblocks -fdump-rtl-sched2 -fdump-rtl-bbro" } */ ++/* { dg-additional-options "-fno-stack-protector" { target espf } } */ + + typedef int aligned __attribute__ ((aligned (64))); + extern void abort (void); +--- a/gcc/testsuite/g++.dg/other/anon5.C 2012-08-16 17:33:08.842848160 +0200 ++++ b/gcc/testsuite/g++.dg/other/anon5.C 2012-08-16 17:33:35.913848967 +0200 +@@ -1,6 +1,7 @@ + // PR c++/34094 + // { dg-do link { target { ! { *-*-darwin* *-*-hpux* *-*-solaris2.* alpha*-dec-osf* mips-sgi-irix* } } } } + // { dg-options "-g" } ++// { dg-additional-options "-fno-PIE" { target espf } } + + namespace { + struct c +--- a/gcc/testsuite/g++.old-deja/g++.law/profile1.C 2007-08-30 07:23:02.000000000 +0200 ++++ b/gcc/testsuite/g++.old-deja/g++.law/profile1.C 2012-08-21 20:48:15.463070406 +0200 +@@ -2,6 +2,7 @@ + // { dg-require-profiling "-pg" } + // { dg-options "-pg" } + // { dg-options "-pg -static" { target hppa*-*-hpux* } } ++// { dg-additional-options "-fno-PIE" { target espf } } + // GROUPS passed profiling + #include + main() diff --git a/upstream/testsuite.patch b/upstream/testsuite.patch deleted file mode 100644 index 82456cc..0000000 --- a/upstream/testsuite.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- a/gcc/testsuite/lib/target-supports.exp 2012-02-22 12:00:21.000000000 +0100 -+++ b/gcc/testsuite/lib/target-supports.exp 2012-07-27 19:19:30.849216278 +0200 -@@ -4419,6 +4419,14 @@ proc check_effective_target_lto { } { - return [info exists ENABLE_LTO] - } - -+# Return 1 if the compiler has been configure with espf -+# (configure --enable-espf=(all|ssp|pie)) support. -+ -+proc check_effective_target_espf { } { -+ global ENABLE_ESPF -+ return [info exists ENABLE_ESPF] -+} -+ - # Return 1 if this target supports the -fsplit-stack option, 0 - # otherwise. - ---- a/gcc/testsuite/gcc.c-torture/execute/memset-1.x 2012-08-18 14:43:31.963694252 +0200 -+++ b/gcc/testsuite/gcc.c-torture/execute/memset-1.x 2012-07-27 21:47:01.000000000 +0200 -@@ -0,0 +1,6 @@ -+load_lib target-supports.exp -+ -+if { [check_effective_target_espf] } { -+ set additional_flags "-U_FORTIFY_SOURCE" -+} -+return 0 ---- a/gcc/testsuite/gcc.c-torture/execute/vprintf-chk-1.x 2012-07-30 02:31:20.573793905 +0200 -+++ b/gcc/testsuite/gcc.c-torture/execute/vprintf-chk-1.x 2012-07-27 21:47:01.574480025 +0200 -@@ -0,0 +1,6 @@ -+load_lib target-supports.exp -+ -+if [check_effective_target_espf] { -+ set additional_flags "-U_FORTIFY_SOURCE" -+} -+return 0 ---- a/gcc/testsuite/gcc.c-torture/execute/vfprintf-chk-1.x 2012-07-30 02:31:07.366794031 +0200 -+++ b/gcc/testsuite/gcc.c-torture/execute/vfprintf-chk-1.x 2012-07-27 21:47:01.000000000 +0200 -@@ -0,0 +1,6 @@ -+load_lib target-supports.exp -+ -+if [check_effective_target_espf] { -+ set additional_flags "-U_FORTIFY_SOURCE" -+} -+return 0 diff --git a/upstream/testsuite_no_espf.patch b/upstream/testsuite_no_espf.patch deleted file mode 100644 index 8991a69..0000000 --- a/upstream/testsuite_no_espf.patch +++ /dev/null @@ -1,98 +0,0 @@ ---- a/gcc/testsuite/gcc.dg/20021014-1.c 2009-10-02 01:08:07.000000000 +0200 -+++ b/gcc/testsuite/gcc.dg/20021014-1.c 2012-08-14 23:50:16.724373103 +0200 -@@ -1,6 +1,7 @@ - /* { dg-do run } */ - /* { dg-require-profiling "-p" } */ - /* { dg-options "-O2 -p" } */ -+/* { dg-additional-options "-fno-PIE" { target espf } } */ - /* { dg-options "-O2 -p -static" { target hppa*-*-hpux* } } */ - /* { dg-error "profiler" "No profiler support" { target xstormy16-*-* } 0 } */ - /* { dg-message "" "consider using `-pg' instead of `-p' with gprof(1)" { target *-*-freebsd* } 0 } */ ---- a/gcc/testsuite/gcc.dg/nest.c 2007-08-30 07:23:02.000000000 +0200 -+++ b/gcc/testsuite/gcc.dg/nest.c 2012-08-14 23:51:44.797375728 +0200 -@@ -3,6 +3,7 @@ - /* { dg-require-profiling "-pg" } */ - /* { dg-options "-O2 -pg" } */ - /* { dg-options "-O2 -pg -static" { target hppa*-*-hpux* } } */ -+/* { dg-additional-options "-fno-PIE" { target espf } } */ - /* { dg-error "profiler" "No profiler support" { target xstormy16-*-* } 0 } */ - - extern void abort (void); ---- a/gcc/testsuite/gcc.dg/nested-func-4.c 2007-08-30 07:23:02.000000000 +0200 -+++ b/gcc/testsuite/gcc.dg/nested-func-4.c 2012-08-14 23:52:23.337376877 +0200 -@@ -1,6 +1,7 @@ - /* { dg-do run } */ - /* { dg-options "-pg" } */ - /* { dg-options "-pg -static" { target hppa*-*-hpux* } } */ -+/* { dg-additional-options "-fno-PIE" { target espf } } */ - /* { dg-require-profiling "-pg" } */ - - extern void abort(void); ---- a/gcc/testsuite/gcc.dg/pr32450.c 2007-08-30 07:23:02.000000000 +0200 -+++ b/gcc/testsuite/gcc.dg/pr32450.c 2012-08-14 23:53:38.125379106 +0200 -@@ -5,6 +5,7 @@ - /* { dg-options "-O2 -pg" } */ - /* { dg-options "-O2 -pg -mtune=core2" { target { i?86-*-* x86_64-*-* } } } */ - /* { dg-options "-O2 -pg -static" { target hppa*-*-hpux* } } */ -+/* { dg-additional-options "-fno-PIE" { target espf } } */ - - extern void abort (void); - ---- a/gcc/testsuite/gcc.dg/pr43643.c 2010-04-14 18:47:15.000000000 +0200 -+++ b/gcc/testsuite/gcc.dg/pr43643.c 2012-08-14 23:54:20.084380356 +0200 -@@ -4,6 +4,7 @@ - /* { dg-require-profiling "-pg" } */ - /* { dg-options "-O2 -pg" } */ - /* { dg-options "-O2 -pg -static" { target hppa*-*-hpux* } } */ -+/* { dg-additional-options "-fno-PIE" { target espf } } */ - - extern char *strdup (const char *); - ---- a/gcc.dg/tree-ssa/ssa-store-ccp-3.c 2011-08-07 09:45:57.000000000 +0200 -+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c 2012-08-14 23:59:24.489389427 +0200 -@@ -3,6 +3,7 @@ - defined for executables as well as shared libraries. */ - /* { dg-skip-if "" { *-*-darwin* hppa*64*-*-* mips*-*-linux* mips*-*-irix* *-*-mingw* } { "*" } { "" } } */ - /* { dg-options "-O2 -fno-common -fdump-tree-optimized" } */ -+/* { dg-skip-if "" { espf } { "*" } { "" } } */ */ - - const int conststaticvariable; - ---- a/gcc/testsuite/gcc.dg/stack-usage-1.c 2012-02-23 19:10:53.000000000 +0100 -+++ b/gcc/testsuite/gcc.dg/stack-usage-1.c 2012-08-14 23:55:37.558382664 +0200 -@@ -1,5 +1,6 @@ - /* { dg-do compile } */ - /* { dg-options "-fstack-usage" } */ -+/* { dg-additional-options "-fno-stack-protector" { target espf } } */ - - /* This is aimed at testing basic support for -fstack-usage in the back-ends. - See the SPARC back-end for example (grep flag_stack_usage_info in sparc.c). ---- a/gcc/testsuite/gcc.dg/superblock.c 2012-08-15 00:28:32.995441532 +0200 -+++ b/gcc/testsuite/gcc.dg/superblock.c 2012-08-14 23:56:30.159384232 +0200 -@@ -1,5 +1,6 @@ - /* { dg-do compile } */ - /* { dg-options "-O2 -fno-asynchronous-unwind-tables -fsched2-use-superblocks -fdump-rtl-sched2 -fdump-rtl-bbro" } */ -+/* { dg-additional-options "-fno-stack-protector" { target espf } } */ - - typedef int aligned __attribute__ ((aligned (64))); - extern void abort (void); ---- a/gcc/testsuite/g++.dg/other/anon5.C 2012-08-16 17:33:08.842848160 +0200 -+++ b/gcc/testsuite/g++.dg/other/anon5.C 2012-08-16 17:33:35.913848967 +0200 -@@ -1,6 +1,7 @@ - // PR c++/34094 - // { dg-do link { target { ! { *-*-darwin* *-*-hpux* *-*-solaris2.* alpha*-dec-osf* mips-sgi-irix* } } } } - // { dg-options "-g" } -+// { dg-additional-options "-fno-PIE" { target espf } } - - namespace { - struct c ---- a/gcc/testsuite/g++.old-deja/g++.law/profile1.C 2007-08-30 07:23:02.000000000 +0200 -+++ b/gcc/testsuite/g++.old-deja/g++.law/profile1.C 2012-08-21 20:48:15.463070406 +0200 -@@ -2,6 +2,7 @@ - // { dg-require-profiling "-pg" } - // { dg-options "-pg" } - // { dg-options "-pg -static" { target hppa*-*-hpux* } } -+// { dg-additional-options "-fno-PIE" { target espf } } - // GROUPS passed profiling - #include - main() -- cgit v1.2.3-65-gdbad