All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/boot: Reinstate -nostdinc for CFLAGS_x86_32
@ 2024-09-03 10:49 Andrew Cooper
  2024-09-03 10:54 ` Roger Pau Monné
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Andrew Cooper @ 2024-09-03 10:49 UTC (permalink / raw)
  To: Xen-devel
  Cc: Andrew Cooper, Jan Beulich, Roger Pau Monné, Anthony PERARD

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")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Anthony PERARD <anthony.perard@vates.tech>
---
 xen/arch/x86/boot/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile
index 03d8ce3a9e48..19eec01e176e 100644
--- a/xen/arch/x86/boot/Makefile
+++ b/xen/arch/x86/boot/Makefile
@@ -13,11 +13,11 @@ $(obj)/head.o: $(head-bin-objs:.o=.bin)
 
 CFLAGS_x86_32 := $(subst -m64,-m32 -march=i686,$(XEN_TREEWIDE_CFLAGS))
 $(call cc-options-add,CFLAGS_x86_32,CC,$(EMBEDDED_EXTRA_CFLAGS))
-CFLAGS_x86_32 += -Werror -fno-builtin -g0 -msoft-float
+CFLAGS_x86_32 += -Werror -nostdinc -fno-builtin -g0 -msoft-float
 ifneq ($(abs_objtree),$(abs_srctree))
-CFLAGS_x86_32 += -I$(objtree)/include
+CFLAGS_x86_32 += -I$(objtree)/include -I$(objtree)/arch/$(SRCARCH)/include
 endif
-CFLAGS_x86_32 += -I$(srctree)/include
+CFLAGS_x86_32 += -I$(srctree)/include -I$(srctree)/arch/$(SRCARCH)/include
 
 # override for 32bit binaries
 $(head-bin-objs): CFLAGS_stack_boundary :=
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-09-04  8:05 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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é
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

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.