summaryrefslogtreecommitdiff
path: root/debian/patches/gcc-default-fortify-source.diff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2019-11-19 17:35:47 +0300
committerIgor Pashev <pashev.igor@gmail.com>2019-11-19 17:35:47 +0300
commit03bebac19e6fef19299d7326d3ee41f8a7dd1316 (patch)
treebb413d22ada331790f08b7b9a592e5ab95cd8918 /debian/patches/gcc-default-fortify-source.diff
parent94a19f31b81e9e7e295414fe2ad2302e0db25a08 (diff)
parent8f6c4b0033c72f8ac14694c419a99458339dd6a9 (diff)
downloadgcc-9-03bebac19e6fef19299d7326d3ee41f8a7dd1316.tar.gz
Merge tag 'debian/9.2.1-19'
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)