]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
x86-64/EFI: add CFLAGS to check compile
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Wed, 15 Aug 2012 07:42:14 +0000 (09:42 +0200)
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>
Wed, 15 Aug 2012 07:42:14 +0000 (09:42 +0200)
Without this, the compilation of check.c could fail due to compiler
features such as -fstack-protector being enabled, which causes a
missing __stack_chk_fail symbol error.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Rather than using plain CFLAGS here, remove CFLAGS-y from them to
particularly get rid of the -MF argument referencing (the undefined
here) $(@F).

The use of CFLAGS at once allows dropping the explicit use of -Werror.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/efi/Makefile

index 005e3e05dda1d218cd1f51f012ad5bd1b5e16448..9ce68fb4edc1be1297e32da82da7b6a0ec3c2111 100644 (file)
@@ -5,7 +5,7 @@ obj-y += stub.o
 create = test -e $(1) || touch -t 199901010000 $(1)
 
 efi := $(filter y,$(x86_64)$(shell rm -f disabled))
-efi := $(if $(efi),$(shell $(CC) -c -Werror check.c 2>disabled && echo y))
+efi := $(if $(efi),$(shell $(CC) $(filter-out $(CFLAGS-y),$(CFLAGS)) -c check.c 2>disabled && echo y))
 efi := $(if $(efi),$(shell $(LD) -mi386pep --subsystem=10 -o check.efi check.o 2>disabled && echo y))
 efi := $(if $(efi),$(shell rm disabled)y,$(shell $(call create,boot.init.o); $(call create,runtime.o)))