]> xenbits.xensource.com Git - xen.git/commitdiff
build: fix exported variable name CFLAGS_stack_boundary
authorAnthony PERARD <anthony.perard@citrix.com>
Thu, 7 Apr 2022 07:05:23 +0000 (09:05 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 7 Apr 2022 07:05:23 +0000 (09:05 +0200)
Exporting a variable with a dash doesn't work reliably, they may be
striped from the environment when calling a sub-make or sub-shell.

CFLAGS-stack-boundary start to be removed from env in patch "build:
set ALL_OBJS in main Makefile; move prelink.o to main Makefile" when
running `make "ALL_OBJS=.."` due to the addition of the quote. At
least in my empirical tests.

Fixes: 2740d96efd ("xen/build: have the root Makefile generates the CFLAGS")
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
master commit: aa390d513a67a6ec0a069eea7478e5ecd54a7ea6
master date: 2022-01-28 11:44:33 +0100

xen/arch/x86/Rules.mk
xen/arch/x86/arch.mk
xen/arch/x86/efi/Makefile

index 56fe22c979ea28b1543c4a0574195b818eeb08ec..7aef93f5f3a0ab45f3876272fbe32cb11f537e6f 100644 (file)
@@ -6,5 +6,5 @@ object_label_flags = '-D__OBJECT_LABEL__=$(subst $(BASEDIR)/,,$(CURDIR))/$@'
 else
 object_label_flags = '-D__OBJECT_LABEL__=$(subst /,$$,$(subst -,_,$(subst $(BASEDIR)/,,$(CURDIR))/$@))'
 endif
-c_flags += $(object_label_flags) $(CFLAGS-stack-boundary)
-a_flags += $(object_label_flags) $(CFLAGS-stack-boundary)
+c_flags += $(object_label_flags) $(CFLAGS_stack_boundary)
+a_flags += $(object_label_flags) $(CFLAGS_stack_boundary)
index 7a7ff7dd7de83f726356e071325194fbc35fb738..329ff8e5411131a24efb8529c2ed097162c427d4 100644 (file)
@@ -56,8 +56,8 @@ endif
 
 # If supported by the compiler, reduce stack alignment to 8 bytes. But allow
 # this to be overridden elsewhere.
-$(call cc-option-add,CFLAGS-stack-boundary,CC,-mpreferred-stack-boundary=3)
-export CFLAGS-stack-boundary
+$(call cc-option-add,CFLAGS_stack_boundary,CC,-mpreferred-stack-boundary=3)
+export CFLAGS_stack_boundary
 
 ifeq ($(CONFIG_UBSAN),y)
 # Don't enable alignment sanitisation.  x86 has efficient unaligned accesses,
index 3e4c395b7535c26883ccc4a0bcf64b11867c60fe..a26fc2d1a5d8bfd4128c442b0a86bcf00a575963 100644 (file)
@@ -11,7 +11,7 @@ boot.init.o: buildid.o
 EFIOBJ := boot.init.o compat.o runtime.o
 
 $(call cc-option-add,cflags-stack-boundary,CC,-mpreferred-stack-boundary=4)
-$(EFIOBJ): CFLAGS-stack-boundary := $(cflags-stack-boundary)
+$(EFIOBJ): CFLAGS_stack_boundary := $(cflags-stack-boundary)
 
 obj-y := stub.o
 obj-$(XEN_BUILD_EFI) := $(EFIOBJ) relocs-dummy.o