Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 475362 Details for
Bug 621036
sys-devel/gcc-7.1.0 (and older as well) uses non-portable definition of _FORTIFY_SOURCE
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Working contents of my /etc/portage/patches/sys-devel/gcc/gcc-default-fortification-fix.patch
gcc-default-fortification-fix.patch (text/plain), 1.36 KB, created by
Martin Kletzander
on 2017-06-06 15:01:57 UTC
(
hide
)
Description:
Working contents of my /etc/portage/patches/sys-devel/gcc/gcc-default-fortification-fix.patch
Filename:
MIME Type:
Creator:
Martin Kletzander
Created:
2017-06-06 15:01:57 UTC
Size:
1.36 KB
patch
obsolete
>diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c >index 826b3b9..c34b76b 100644 >--- a/gcc/c-family/c-cppbuiltin.c >+++ b/gcc/c-family/c-cppbuiltin.c >@@ -576,10 +576,13 @@ c_cpp_builtins_optimize_pragma (cpp_reader *pfile, tree prev_tree, > else if (prev->x_optimize_size && !cur->x_optimize_size) > cpp_undef (pfile, "__OPTIMIZE_SIZE__"); > >- if (!prev->x_optimize && cur->x_optimize) >+ if (!prev->x_optimize && cur->x_optimize) { > cpp_define (pfile, "__OPTIMIZE__"); >- else if (prev->x_optimize && !cur->x_optimize) >+ cpp_define (pfile, "_FORTIFY_SOURCE=(__OPTIMIZE__ > 0 ? 2 : 0)"); >+ } else if (prev->x_optimize && !cur->x_optimize) { > cpp_undef (pfile, "__OPTIMIZE__"); >+ cpp_undef (pfile, "_FORTIFY_SOURCE"); >+ } > > prev_fast_math = fast_math_flags_struct_set_p (prev); > cur_fast_math = fast_math_flags_struct_set_p (cur); >@@ -1336,7 +1339,10 @@ c_cpp_builtins (cpp_reader *pfile) > builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0); > > /* Fortify Source enabled by default w/optimization. */ >- cpp_define (pfile, "_FORTIFY_SOURCE=((defined __OPTIMIZE__ && __OPTIMIZE__ > 0) ? 2 : 0)"); >+ if (cpp_defined (pfile, >+ (const unsigned char *) "__OPTIMIZE__", >+ (int) strlen("__OPTIMIZE__"))) >+ cpp_define (pfile, "_FORTIFY_SOURCE=(__OPTIMIZE__ > 0 ? 2 : 0)"); > > /* Misc. */ > if (flag_gnu89_inline)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 621036
: 475362