]> xenbits.xensource.com Git - xen.git/commitdiff
build,arm: move LDFLAGS change to arch.mk
authorAnthony PERARD <anthony.perard@citrix.com>
Tue, 12 Oct 2021 09:50:47 +0000 (11:50 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 12 Oct 2021 09:50:47 +0000 (11:50 +0200)
Changes to XEN_LDFLAGS may or may not apply to targets in for example
"common/" depending on whether one runs `make` or `make common/`.

But arch.mk is loaded before doing any build, so changes to LDFLAGS
there mean that the value of XEN_LDFLAGS won't depends on the initial
target.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/arch/arm/Makefile
xen/arch/arm/arch.mk

index 44d7cc81fad3afa2487af422728eb92ece948567..7dd3ee981a5fa5bb62974e274e9d9f28a86e4e99 100644 (file)
@@ -103,14 +103,6 @@ prelink.o: $(ALL_OBJS) $(ALL_LIBS) FORCE
        $(call if_changed,ld)
 endif
 
-ifeq ($(CONFIG_ARM64_ERRATUM_843419),y)
-    ifeq ($(call ld-option, --fix-cortex-a53-843419),n)
-        $(warning ld does not support --fix-cortex-a53-843419; xen may be susceptible to erratum)
-    else
-        XEN_LDFLAGS += --fix-cortex-a53-843419
-    endif
-endif
-
 targets += prelink.o
 
 $(TARGET)-syms: prelink.o xen.lds
index 11caec86ba14d8c08d8a5b44d966d1737aa50992..6a298205948604a8c5cfccfa76b4999b6cd7ab02 100644 (file)
@@ -17,3 +17,11 @@ $(call cc-option-add,CFLAGS-$(CONFIG_ARM_64),CC,-mno-outline-atomics)
 ifneq ($(filter command line environment,$(origin CONFIG_EARLY_PRINTK)),)
     $(error You must use 'make menuconfig' to enable/disable early printk now)
 endif
+
+ifeq ($(CONFIG_ARM64_ERRATUM_843419),y)
+    ifeq ($(call ld-option, --fix-cortex-a53-843419),n)
+        $(warning ld does not support --fix-cortex-a53-843419; xen may be susceptible to erratum)
+    else
+        LDFLAGS += --fix-cortex-a53-843419
+    endif
+endif