From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Anthony PERARD <anthony.perard@vates.tech>,
Xen-devel <xen-devel@lists.xenproject.org>,
Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH] x86/boot: Reinstate -nostdinc for CFLAGS_x86_32
Date: Tue, 3 Sep 2024 14:19:20 +0200 [thread overview]
Message-ID: <Ztb-yNbYa1FfZwd1@macbook.local> (raw)
In-Reply-To: <7bd043c7-32b0-44d6-a6c4-f74695a0b355@citrix.com>
On Tue, Sep 03, 2024 at 12:51:28PM +0100, Andrew Cooper wrote:
> On 03/09/2024 12:20 pm, Anthony PERARD wrote:
> > On Tue, Sep 03, 2024 at 11:49:40AM +0100, Andrew Cooper wrote:
> >> Most of Xen is build using -nostdinc and a fully specified include path.
> >> However, the makefile line:
> >>
> >> $(head-bin-objs): XEN_CFLAGS := $(CFLAGS_x86_32) -fpic
> >>
> >> discards XEN_CFLAGS and replaces them with CFLAGS_x86_32.
> >>
> >> Reinstate -nostdinc, and add the arch include path to the command line. This
> >> is a latent bug for now, but it breaks properly with subsequent include
> >> changes.
> >>
> >> Fixes: d58a509e01c4 ("build,x86: remove the need for build32.mk")
> > I disagree with this. I'm pretty sure I've check that no command line
> > have changed.
>
> Fine, I'll drop it.
>
> >
> > Also, this commit shows that CFLAGS was only coming from root's
> > Config.mk:
> >> diff --git a/xen/arch/x86/boot/build32.mk b/xen/arch/x86/boot
> >> deleted file mode 100644
> >> index e90680cd9f..0000000000
> >> --- a/xen/arch/x86/boot/build32.mk
> >> +++ /dev/null
> >> @@ -1,40 +0,0 @@
> >> -override XEN_TARGET_ARCH=x86_32
> >> -CFLAGS =
> >> -include $(XEN_ROOT)/Config.mk
> > So, I'm pretty sure, -nostdinc was never used before. But happy to be
> > told that I've come to the wrong conclusion. (We would need to check by
> > building with an old version without this commit to be sure.)
>
> -nostdinc was added after the fact. Which is fine.
>
> But as a consequence of these being unlike the rest of Xen, somehow (and
> only on FreeBSD it seems), the regular build of Xen is fine, but
> tools/firmware/xen-dir for the shim is subject to -nostdinc in a way
> that breaks cmdline.c
FWIW, it did break for me on a normal build in xen/ on FreeBSD, no
need to run it from tools/firmware/xen-dir.
> > "xen/arch/x86/boot" as it's own sets of CFLAGS, which is annoying and I
> > haven't really tried to change that. This is also why XEN_CFLAGS is been
> > discarded.
>
> This is necessary. We're swapping -m64 for -m32 to build these two
> objects, and that invalidates a whole bunch of other CFLAGS.
See my previous reply, I guess figuring out which of those options also
need to be dropped as a result of dropping -m64 is likely too
complicated and fragile as we add new options.
Thanks, Roger.
next prev parent reply other threads:[~2024-09-03 12:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 10:49 [PATCH] x86/boot: Reinstate -nostdinc for CFLAGS_x86_32 Andrew Cooper
2024-09-03 10:54 ` Roger Pau Monné
2024-09-03 11:08 ` Andrew Cooper
2024-09-03 11:16 ` Andrew Cooper
2024-09-03 12:16 ` Roger Pau Monné
2024-09-03 11:20 ` Anthony PERARD
2024-09-03 11:51 ` Andrew Cooper
2024-09-03 12:19 ` Roger Pau Monné [this message]
2024-09-03 11:53 ` [PATCH v2] x86/boot: Fix include paths for 32bit objects Andrew Cooper
2024-09-03 12:43 ` Roger Pau Monné
2024-09-03 13:01 ` Andrew Cooper
2024-09-03 13:08 ` Roger Pau Monné
2024-09-03 14:32 ` Jan Beulich
2024-09-03 14:33 ` Andrew Cooper
2024-09-03 14:50 ` Andrew Cooper
2024-09-04 6:54 ` Jan Beulich
2024-09-04 8:05 ` Andrew Cooper
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=Ztb-yNbYa1FfZwd1@macbook.local \
--to=roger.pau@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--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.