From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24707 invoked by alias); 24 Nov 2014 18:41:17 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 24645 invoked by uid 48); 24 Nov 2014 18:41:13 -0000 From: "anatol.pomozov at gmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/13979] A warning should be issued if FORTIFY_SOURCE is requested but not enabled Date: Mon, 24 Nov 2014 18:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.15 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: anatol.pomozov at gmail dot com X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-11/txt/msg00185.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=13979 --- Comment #9 from Anatol Pomozov --- 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.