summaryrefslogtreecommitdiff
path: root/arch/arm64/Makefile
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2016-08-22 11:58:36 +0100
committerWill Deacon <will.deacon@arm.com>2016-08-26 11:33:22 +0100
commit6ffe9923f2350c19b95a2c9ebf1b4f5f275986f2 (patch)
treeab5298c631fa96353509174ea1fe883bf0a66310 /arch/arm64/Makefile
parentb2d8b0cb6ca9cb81dd71626642f764ac70d10813 (diff)
downloadlwn-6ffe9923f2350c19b95a2c9ebf1b4f5f275986f2.tar.gz
lwn-6ffe9923f2350c19b95a2c9ebf1b4f5f275986f2.zip
arm64: errata: Pass --fix-cortex-a53-843419 to ld if workaround enabled
Cortex-A53 erratum 843419 is worked around by the linker, although it is a configure-time option to GCC as to whether ld is actually asked to apply the workaround or not. This patch ensures that we pass --fix-cortex-a53-843419 to the linker when both CONFIG_ARM64_ERRATUM_843419=y and the linker supports the option. Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/Makefile')
-rw-r--r--arch/arm64/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 5b54f8c021d8..0b53c752f23f 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -18,6 +18,14 @@ ifneq ($(CONFIG_RELOCATABLE),)
LDFLAGS_vmlinux += -pie -Bsymbolic
endif
+ifeq ($(CONFIG_ARM64_ERRATUM_843419),y)
+ ifeq ($(call ld-option, --fix-cortex-a53-843419),)
+$(warning ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum)
+ else
+LDFLAGS_vmlinux += --fix-cortex-a53-843419
+ endif
+endif
+
KBUILD_DEFCONFIG := defconfig
# Check for binutils support for specific extensions