[Bug libc/13979] A warning should be issued if FORTIFY_SOURCE is requested but not enabled
anatol.pomozov at gmail dot com
sourceware-bugzilla@sourceware.org
Mon Nov 24 18:41:00 GMT 2014
https://sourceware.org/bugzilla/show_bug.cgi?id=13979
--- Comment #9 from Anatol Pomozov <anatol.pomozov at gmail dot com> ---
I try to build Thrift package for Arch and here are envvars at the moment of
build:
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro
SHELL=/bin/bash
TERM=xterm
MAKEFLAGS=-j4
CPPFLAGS=-D_FORTIFY_SOURCE=2
OLDPWD=/build/thrift/src
USER=builduser
COMMAND_MODE=legacy
SUDO_USER=root
SUDO_UID=0
CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
--param=ssp-buffer-size=4
USERNAME=builduser
MAIL=/var/mail/builduser
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
CHOST=x86_64-unknown-linux-gnu
PWD=/build/thrift/src/thrift-0.9.2
LANG=C
SHLVL=1
SUDO_COMMAND=/usr/bin/makepkg -s --noconfirm -L --holdver -i
HOME=/build
CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
--param=ssp-buffer-size=4
LOGNAME=builduser
TEXTDOMAIN=pacman-scripts
SUDO_GID=0
TEXTDOMAINDIR=/usr/share/locale
_=/usr/bin/env
And here is command that generate warning:
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../..
-I../../../lib/cpp/src/thrift -I../../cpp/src -I/usr/include -I./gen-cpp
-D_FORTIFY_SOURCE=2 -g -MT libtestgencpp_la-ThriftTest_constants.lo -MD -MP -MF
.deps/libtestgencpp_la-ThriftTest_constants.Tpo -c
gen-cpp/ThriftTest_constants.cpp -fPIC -DPIC -o
.libs/libtestgencpp_la-ThriftTest_constants.o
In file included from
/usr/include/c++/4.9.2/x86_64-unknown-linux-gnu/bits/os_defines.h:39:0,
from
/usr/include/c++/4.9.2/x86_64-unknown-linux-gnu/bits/c++config.h:430,
from /usr/include/c++/4.9.2/iosfwd:38,
from gen-cpp/ThriftTest_types.h:10,
from gen-cpp/ThriftTest_constants.h:10,
from gen-cpp/ThriftTest_constants.cpp:7:
/usr/include/features.h:328:4: warning: #warning _FORTIFY_SOURCE requires
compiling with optimization (-O) [-Wcpp]
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^
hmm... libtool does not seems to use CXXFLAGS here.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list