public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "anatol.pomozov at gmail dot com" <sourceware-bugzilla@sourceware.org>
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	[thread overview]
Message-ID: <bug-13979-131-zNyr6TKtjN@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-13979-131@http.sourceware.org/bugzilla/>

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.


  parent reply	other threads:[~2014-11-24 18:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-13 17:20 [Bug libc/13979] New: " law at redhat dot com
2012-05-07 21:05 ` [Bug libc/13979] " aj at suse dot de
2012-05-08 17:49 ` aj at suse dot de
2012-05-08 17:56 ` law at redhat dot com
2013-05-08 15:25 ` eblake at redhat dot com
2013-05-08 15:53 ` aj at suse dot de
2013-05-08 15:54 ` law at redhat dot com
2013-10-20 18:35 ` neleai at seznam dot cz
2014-06-25 11:17 ` fweimer at redhat dot com
2014-11-24  0:08 ` anatol.pomozov at gmail dot com
2014-11-24  6:31 ` fweimer at redhat dot com
2014-11-24 18:41 ` anatol.pomozov at gmail dot com [this message]
2014-11-24 18:46 ` fweimer at redhat dot com
2014-11-24 19:36 ` anatol.pomozov at gmail dot com
2023-08-07  9:41 ` sam at gentoo dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-13979-131-zNyr6TKtjN@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).