Public bug reported:
seen with trunk r242874 on all linux architectures, and this patch to
enable the build with -D_FORTIFY_SOURCE=2. This works on the
gcc-6-branch, system glibc is 2.24.
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -1176,6 +1176,10 @@ 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);
+ /* Fortify Source enabled by default for optimization levels > 0 */
+ if (optimize)
+ builtin_define_with_int_value ("_FORTIFY_SOURCE", 2);
+
/* Misc. */
if (flag_gnu89_inline)
cpp_define (pfile, "__GNUC_GNU_INLINE__");
** Affects: gcc
Importance: Unknown
Status: Unknown
** Affects: gcc-snapshot (Ubuntu)
Importance: High
Status: Confirmed
** Bug watch added: GCC Bugzilla #78531
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78531
** Also affects: gcc via
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78531
Importance: Unknown
Status: Unknown
** Changed in: gcc-snapshot (Ubuntu)
Importance: Undecided => High
** Changed in: gcc-snapshot (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1644888
Title:
[7 Regression] gnat bootstrap broken on linux targets with
_FORTIFY_SOURCE enabled
To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1644888/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs