From: Don Slutz <dslutz@verizon.com>
To: Jan Beulich <JBeulich@suse.com>, Don Slutz <dslutz@verizon.com>
Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Wei Liu <wei.liu2@citrix.com>,
xen-devel <xen-devel@lists.xenproject.org>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH] tools: work around collision of -O0 and -D_FORTIFY_SOURCE
Date: Thu, 05 Feb 2015 09:55:47 -0500 [thread overview]
Message-ID: <54D38473.809@terremark.com> (raw)
In-Reply-To: <54D3513B020000780005D299@mail.emea.novell.com>
On 02/05/15 05:17, Jan Beulich wrote:
>>>> On 05.02.15 at 00:33, <dslutz@verizon.com> wrote:
>> On 02/04/15 12:01, Jan Beulich wrote:
>>> The former gets enforced by our debug builds, the latter appears to be
>>> not uncommon for certain distros' Python packages. Newer glibc warns on
>>> uses of _FORTIFY_SOURCE without optimization being enabled, which with
>>> -Werror causes the build to fail.
>>>
>>> Determine Python's intended flags to be passed to the C compiler via
>>> "python-config --cflags", and replace -O0 by -O1 when a non-zero value
>>> gets set for _FORTIFY_SOURCE.
>>>
>>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>
>> Well, this does not fix debug=y builds for me:
>> [...]
>> gcc -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
>
> Where is this -Wp,-D_FORTIFY_SOURCE=2 coming from? Is
> python-config producing this? The patch provided certainly doesn't
> deal with that case.
Here is what I get for python-config:
dcs-xen-54:~/xen-master>python-config --cflags
-I/usr/include/python2.7 -I/usr/include/python2.7 -fno-strict-aliasing
-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv
>
>> Using this change:
>>
>> dcs-xen-54:~/xen-master>git show | cat
>> commit 3cda306a162e55d73c25efc14840e7afeec8d3d3
>> Author: Don Slutz <dslutz@verizon.com>
>> Date: Wed Feb 4 17:57:00 2015 -0500
>>
>> tools/Rules.mk: Drop -O0 for debug=y
>>
>> This is a partial revert of
>>
>> commit 1166ecf781b1016eaa61f8d5ba4fb1fde9d599b6
>> Author: Euan Harris <euan.harris@citrix.com>
>> Date: Mon Dec 1 14:21:05 2014 +0000
>>
>> tools/Rules.mk: Don't optimize debug builds; add macro debugging
>> information
>>
>> Signed-off-by: Don Slutz <dslutz@verizon.com>
>>
>> diff --git a/tools/Rules.mk b/tools/Rules.mk
>> index 74cf37e..8bf603d 100644
>> --- a/tools/Rules.mk
>> +++ b/tools/Rules.mk
>> @@ -56,7 +56,7 @@ SHLIB_libxenvchan = -Wl,-rpath-link=$(XEN_LIBVCHAN)
>>
>> ifeq ($(debug),y)
>> # Disable optimizations and enable debugging information for macros
>> -CFLAGS += -O0 -g3
>> +CFLAGS += -g3
>> endif
>>
>> LIBXL_BLKTAP ?= $(CONFIG_BLKTAP2)
>>
>>
>> I can now build with "debug=y" on Fedora 17.
>
> If you went through the earlier discussion, you'd have seen that
> this was already rejected as a possible fix.
Sorry I did not see this.
-Don Slutz
>
> Jan
>
next prev parent reply other threads:[~2015-02-05 14:56 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-04 17:01 [PATCH] tools: work around collision of -O0 and -D_FORTIFY_SOURCE Jan Beulich
2015-02-04 23:33 ` Don Slutz
2015-02-05 10:17 ` Jan Beulich
2015-02-05 14:55 ` Don Slutz [this message]
2015-02-05 11:08 ` Ian Jackson
2015-02-05 11:18 ` Jan Beulich
2015-02-05 12:25 ` Ian Campbell
2015-02-05 15:26 ` Ian Jackson
2015-02-05 15:46 ` Jan Beulich
2015-02-05 15:47 ` Euan Harris
2015-02-05 16:36 ` Ian Jackson
2015-02-05 16:52 ` Jan Beulich
2015-02-05 16:56 ` Ian Jackson
2015-02-05 17:01 ` Jan Beulich
2015-02-06 8:19 ` Jan Beulich
2015-02-06 8:22 ` Jan Beulich
2015-02-06 11:04 ` [PATCH] tools: work around collision of -O0 and -D_FORTIFY_SOURCE [and 1 more messages] Ian Jackson
2015-02-06 11:04 ` [PATCH v4] tools: work around collision of -O0 and -D_FORTIFY_SOURCE Ian Jackson
2015-02-06 16:13 ` Don Slutz
2015-02-06 17:28 ` Ian Jackson
2015-02-06 15:24 ` [PATCH] tools: work around collision of -O0 and -D_FORTIFY_SOURCE [and 1 more messages] Don Slutz
2015-09-01 14:54 ` [PATCH] tools: work around collision of -O0 and -D_FORTIFY_SOURCE George Dunlap
2015-09-01 15:10 ` Ian Campbell
2015-09-01 16:21 ` George Dunlap
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=54D38473.809@terremark.com \
--to=dslutz@verizon.com \
--cc=Ian.Campbell@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.