From: Ian Campbell <Ian.Campbell@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Euan Harris <euan.harris@citrix.com>,
xen-devel <xen-devel@lists.xenproject.org>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Wei Liu <wei.liu2@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH] tools: work around collision of -O0 and -D_FORTIFY_SOURCE
Date: Thu, 5 Feb 2015 12:25:48 +0000 [thread overview]
Message-ID: <1423139148.24924.100.camel@citrix.com> (raw)
In-Reply-To: <54D35F85020000780005D36C@mail.emea.novell.com>
On Thu, 2015-02-05 at 11:18 +0000, Jan Beulich wrote:
> >>> On 05.02.15 at 12:08, <Ian.Jackson@eu.citrix.com> wrote:
> > Jan Beulich writes ("[PATCH] tools: work around collision of -O0 and
> > -D_FORTIFY_SOURCE"):
> >> 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.
> > ...
> >> --- a/tools/pygrub/Makefile
> >> +++ b/tools/pygrub/Makefile
> >> @@ -2,15 +2,24 @@
> >> XEN_ROOT = $(CURDIR)/../..
> >> include $(XEN_ROOT)/tools/Rules.mk
> >>
> >> +py_cflags := $(shell $(PYTHON)-config --cflags)
> >> +PY_CFLAGS = $(if $(strip $(py_cflags)),,\
> >> + $(error '$(PYTHON)-config --cflags' produced no output))\
> >> + $(if $(filter -D_FORTIFY_SOURCE=%,\
> >> + $(filter-out -D_FORTIFY_SOURCE=0,\
> >> + $(py_cflags))),\
> >> + $(patsubst -O0,-O1,$(CFLAGS)),\
> >> + $(CFLAGS)) $(APPEND_LDFLAGS)
> >
> > There are lots of copies of this. And it would IMO be better to do at
> > least the probing in configure, resulting in something like this in
> > configure:
> >
> > [ determine PY_XCFLAGS to be either '' or '-O0' ]
> > AC_SUBST(PY_XCFLAGS)
> >
> > and
> >
> > PY_CFLAGS=@PY_CFLAGS@
> >
> > CC="$(CC)" CFLAGS="$(CFLAGS) $(PY_XCFLAGS)" $(PYTHON) setup.py build
> >
> > (I assume that CFLAGS does override what comes out of setup.py.)
>
> For one, PY_XCFLAGS='' wouldn't help, as we get -O0 from the
> incoming CFLAGS. And then I'm not really intending to fiddle with
> the configure scripts (albeit, having done the patch in the presented
> form, I expected you to want it done that way) - this and alike is
> what I specifically want to stay out of if at all possible. Since in any
> event commit 1166ecf781 introduced a regression for multiple
> people, perhaps if that is not supposed to be reverted Euan should
> look into addressing that regression?
Euan -- do you think you might be able to whip up an autoconf-ification
along the lines of what is described above?
Ian.
next prev parent reply other threads:[~2015-02-05 12:26 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
2015-02-05 11:08 ` Ian Jackson
2015-02-05 11:18 ` Jan Beulich
2015-02-05 12:25 ` Ian Campbell [this message]
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=1423139148.24924.100.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=euan.harris@citrix.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.