[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XEN PATCH v9 03/30] build: fix exported variable name CFLAGS_stack_boundary


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Tue, 25 Jan 2022 11:00:36 +0000
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 25 Jan 2022 11:01:21 +0000
  • Ironport-data: A9a23:ArZRgq3WKoxh/TFYs/bD5Qd2kn2cJEfYwER7XKvMYLTBsI5bp2ACn 2YbWT+DM/qCZWb2KN9xb4Ti80NXvseEzYRnHFQ9pC1hF35El5HIVI+TRqvS04J+DSFhoGZPt Zh2hgzodZhsJpPkS5PE3oHJ9RGQ74nRLlbHILOCanAZqTNMEn9700o6wbNh2+aEvPDia++zk YKqyyHgEAfNNw5cagr4PIra9XuDFNyr0N8plgRWicJj5TcypFFMZH4rHomjLmOQf2VhNrXSq 9Avbl2O1jixEx8FUrtJm1tgG6EAaua60QOm0hK6V0U+6/TrS+NbPqsTbZIhhUlrZzqh2M50x /hLlpyMaQY4YJHHlegMTwMJKnQrVUFG0OevzXmXtMWSywvNcmf2wuUoB0YzVWEa0r8pWycUr 6VecW1TKEDY7w616OvTpu1Ej8I/LM7tLcUHt2tp1z3xBvc6W5HTBa7N4Le02R9u3J4XTaeHP aL1bxJwQjGRYkVLK2tUJ5Z9zfa6pWPWXmBh/Qf9Sa0fvDGIkV0ZPKLWGMXRUsyHQ4NShEnwj mDM8nn9AxoaHMeC0jfD+XWp7sffkCW+VI8MGbmQ8v9xnEbV1mEVEAcRV1awvb++kEHWZj5EA xVKoGx09/F0rRH1CImmN/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4bXLfCFHZK3BgTVQfexO/DD+ytHLudvj
  • Ironport-sdr: 8/DHCZfW3/eg9CITvGhUnWHCu+UduepdIVTdNZn3/v0TMv4v4d80Db34jfX73NQcvN5rLzmF71 C3R6+YoLbdTT9eIaFlpx2O3gcUlpr/jbfu/THwIHisT9e2lyO++tlrgT9d7rh5k6KLF9pegczS kWLB7VDkRfiCb+x2CUK0McJDS8BZHd2GSh8m+oe/P7nyN8psjEdQuWbJT69koxILgwqkc9MJ2b DMw4W+UESyfBGBoj6xNbkyfYZrG8g2WcpHhUXtmZHUW4ARTbtkWmUBjFhoo2sCC89jXheSRssC 9Cx60K3IihD5MpOKC6d9/CBu
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxx>
---

Notes:
    v9:
    - new patch

 xen/arch/x86/Rules.mk     | 4 ++--
 xen/arch/x86/arch.mk      | 4 ++--
 xen/arch/x86/efi/Makefile | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk
index 56fe22c979ea..7aef93f5f3a0 100644
--- a/xen/arch/x86/Rules.mk
+++ b/xen/arch/x86/Rules.mk
@@ -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)
diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk
index a93fa6d2e4c9..fa7cf3844362 100644
--- a/xen/arch/x86/arch.mk
+++ b/xen/arch/x86/arch.mk
@@ -49,8 +49,8 @@ CFLAGS-$(CONFIG_INDIRECT_THUNK) += -fno-jump-tables
 
 # 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,
diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile
index 87b927ed865b..abae493bf344 100644
--- a/xen/arch/x86/efi/Makefile
+++ b/xen/arch/x86/efi/Makefile
@@ -12,7 +12,7 @@ EFIOBJ-y := boot.init.o pe.init.o ebmalloc.o runtime.o
 EFIOBJ-$(CONFIG_COMPAT) += compat.o
 
 $(call cc-option-add,cflags-stack-boundary,CC,-mpreferred-stack-boundary=4)
-$(EFIOBJ-y): CFLAGS-stack-boundary := $(cflags-stack-boundary)
+$(EFIOBJ-y): CFLAGS_stack_boundary := $(cflags-stack-boundary)
 
 obj-y := stub.o
 obj-$(XEN_BUILD_EFI) := $(filter-out %.init.o,$(EFIOBJ-y))
-- 
Anthony PERARD




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.