This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/13979] A warning should be issued if FORTIFY_SOURCE is requested but not enabled


https://sourceware.org/bugzilla/show_bug.cgi?id=13979

Anatol Pomozov <anatol.pomozov at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anatol.pomozov at gmail dot com

--- Comment #7 from Anatol Pomozov <anatol.pomozov at gmail dot com> ---
Linux Arch still suffers from warnings flood produced by this code.

We have following disto-wide compilation variables:

CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector
--param=ssp-buffer-size=4"

and compilation produces a lot of warnings in almost any c++ project:

/usr/include/features.h:328:4: warning: #warning _FORTIFY_SOURCE
requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)

What is the action item for us, downstream package maintainers? What we suppose
to do? There were several proposals (see link to autoconf discussion above):

- revert commit 05c2c9618f5
- move _FORTIFY_SOURCE to CFLAGS/CXXFLAGS/..
- move -O2 to CPPFLAGS

Could you please give us advice on what solution is the best one.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]