1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
#! /bin/sh -e
# All lines beginning with `# DPATCH:' are a description of the patch.
# DP: Description: use -Wno-format on tests that cannot be adjusted other ways.
# DP: Author: Kees Cook <kees@ubuntu.com>
# DP: Ubuntu: https://bugs.launchpad.net/bugs/344502
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p1 < $0
#cd ${dir}gcc && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
#rm ${dir}gcc/configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- /dev/null
+++ b/src/gcc/testsuite/gcc.c-torture/execute/vfprintf-chk-1.x
@@ -0,0 +1,5 @@
+# Implement "/* { dg-options "-U_FORITFY_SOURCE" } */", due to
+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20567
+
+set additional_flags "-U_FORTIFY_SOURCE"
+return 0
--- /dev/null
+++ b/src/gcc/testsuite/gcc.c-torture/execute/vprintf-chk-1.x
@@ -0,0 +1,5 @@
+# Implement "/* { dg-options "-U_FORITFY_SOURCE" } */", due to
+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20567
+
+set additional_flags "-U_FORTIFY_SOURCE"
+return 0
--- a/src/gcc/testsuite/gcc.dg/charset/builtin2.c
+++ b/src/gcc/testsuite/gcc.dg/charset/builtin2.c
@@ -3,7 +3,7 @@
/* { dg-do compile } */
/* { dg-require-iconv "IBM1047" } */
-/* { dg-options "-O2 -fexec-charset=IBM1047" } */
+/* { dg-options "-O2 -fexec-charset=IBM1047 -Wno-format" } */
/* { dg-final { scan-assembler-not "printf" } } */
/* { dg-final { scan-assembler-not "fprintf" } } */
/* { dg-final { scan-assembler-not "sprintf" } } */
--- a/src/gcc/testsuite/gcc.dg/format/format.exp
+++ b/src/gcc/testsuite/gcc.dg/format/format.exp
@@ -26,7 +26,7 @@
load_lib torture-options.exp
torture-init
-set-torture-options [list { } { -DWIDE } ]
+set-torture-options [list { -Wformat=0 } { -DWIDE -Wformat=0 } ]
dg-init
gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] ""
--- a/src/gcc/testsuite/gcc.dg/pr30473.c
+++ b/src/gcc/testsuite/gcc.dg/pr30473.c
@@ -1,7 +1,7 @@
/* PR middle-end/30473 */
/* Make sure this doesn't ICE. */
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -Wno-format" } */
extern int sprintf (char *, const char *, ...);
--- a/src/gcc/testsuite/gcc.dg/pr38902.c
+++ b/src/gcc/testsuite/gcc.dg/pr38902.c
@@ -1,6 +1,6 @@
/* PR target/38902 */
/* { dg-do run } */
-/* { dg-options "-O2 -fstack-protector" } */
+/* { dg-options "-O2 -fstack-protector -Wno-format" } */
/* { dg-require-effective-target fstack_protector } */
#ifdef DEBUG
|