summaryrefslogtreecommitdiff
path: root/debian/patches/gcc-default-fortify-source.diff
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/gcc-default-fortify-source.diff')
-rw-r--r--debian/patches/gcc-default-fortify-source.diff6
1 files changed, 4 insertions, 2 deletions
diff --git a/debian/patches/gcc-default-fortify-source.diff b/debian/patches/gcc-default-fortify-source.diff
index d3ab164..74d7ed0 100644
--- a/debian/patches/gcc-default-fortify-source.diff
+++ b/debian/patches/gcc-default-fortify-source.diff
@@ -10,7 +10,7 @@ Index: b/src/gcc/doc/invoke.texi
===================================================================
--- a/src/gcc/doc/invoke.texi
+++ b/src/gcc/doc/invoke.texi
-@@ -7840,6 +7840,12 @@ also turns on the following optimization
+@@ -7105,6 +7105,12 @@ also turns on the following optimization
Please note the warning under @option{-fgcse} about
invoking @option{-O2} on programs that use computed gotos.
@@ -27,13 +27,15 @@ Index: b/src/gcc/c-family/c-cppbuiltin.c
===================================================================
--- a/src/gcc/c-family/c-cppbuiltin.c
+++ b/src/gcc/c-family/c-cppbuiltin.c
-@@ -1176,6 +1176,10 @@ c_cpp_builtins (cpp_reader *pfile)
+@@ -1335,6 +1335,12 @@ c_cpp_builtins (cpp_reader *pfile)
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
++#if !defined(ACCEL_COMPILER)
+ /* Fortify Source enabled by default for optimization levels > 0 */
+ if (optimize)
+ builtin_define_with_int_value ("_FORTIFY_SOURCE", 2);
++#endif
+
/* Misc. */
if (flag_gnu89_inline)