|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 1/2] x86/EFI: correct compiler probing
Passing in $(CFLAGS) means also requesting inclusion of certain headers
(via -include command line options). That's particularly xen/config.h,
which in turn requires generated/autoconf.h. This has not caused any
problems so far only because arch.mk is processed twice, and the missing
header on the 1st pass would be there on the 2nd. Having added an
inclusion of asm/asm-macros.h to x86'es asm/config.h, the 2nd pass then
also fails on an initial, pristine build.
As per dd40177c1bc8 ("x86-64/EFI: add CFLAGS to check compile") dropping
the use of $(CFLAGS) altogether isn't an option, though. Hence remove
the problematic options only.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
This is now the 3rd place where the -include needs dropping. I was half
decided to introduce a new lazy-expansion variable, yet it's not
consistently $(CFLAGS) that the options need purging from. Thoughts?
There probably ought to be a Fixes: tag here, but it's quite hard to
tell which change to actually blame. It's the interaction of various
changes which has resulted in the (so far only latent) badness.
--- a/xen/arch/x86/arch.mk
+++ b/xen/arch/x86/arch.mk
@@ -87,7 +87,8 @@ efi-check := arch/x86/efi/check
$(shell mkdir -p $(dir $(efi-check)))
# Check if the compiler supports the MS ABI.
-XEN_BUILD_EFI := $(call if-success,$(CC) $(CFLAGS) -c
$(srctree)/$(efi-check).c -o $(efi-check).o,y)
+XEN_BUILD_EFI := $(call if-success,$(CC) $(filter-out -include
%/include/xen/config.h,$(CFLAGS)) \
+ -c $(srctree)/$(efi-check).c -o
$(efi-check).o,y)
# Check if the linker supports PE.
EFI_LDFLAGS := $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=10
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |