summaryrefslogtreecommitdiffstats
path: root/arch/arm64/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-07-03 10:22:00 +0900
committerCatalin Marinas <catalin.marinas@arm.com>2018-07-04 22:49:13 +0100
commit2893af07e507e993ad71ca6d66a7b02be741571c (patch)
tree4a51273487e995795fbfb4a28a1dd7a5f4bb02b9 /arch/arm64/Makefile
parent38fc4248677552ce35efc09902fdcb06b61d7ef9 (diff)
downloadlinux-2893af07e507e993ad71ca6d66a7b02be741571c.tar.gz
linux-2893af07e507e993ad71ca6d66a7b02be741571c.tar.bz2
linux-2893af07e507e993ad71ca6d66a7b02be741571c.zip
arm64: add endianness option to LDFLAGS instead of LD
With the recent syntax extension, Kconfig is now able to evaluate the compiler / toolchain capability. However, accumulating flags to 'LD' is not compatible with the way it works; 'LD' must be passed to Kconfig to call $(ld-option,...) from Kconfig files. If you tweak 'LD' in arch Makefile depending on CONFIG_CPU_BIG_ENDIAN, this would end up with circular dependency between Makefile and Kconfig. Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/Makefile')
-rw-r--r--arch/arm64/Makefile6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 27389adf511a..48158c550110 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -60,15 +60,13 @@ ifeq ($(CONFIG_CPU_BIG_ENDIAN), y)
KBUILD_CPPFLAGS += -mbig-endian
CHECKFLAGS += -D__AARCH64EB__
AS += -EB
-LD += -EB
-LDFLAGS += -maarch64elfb
+LDFLAGS += -EB -maarch64elfb
UTS_MACHINE := aarch64_be
else
KBUILD_CPPFLAGS += -mlittle-endian
CHECKFLAGS += -D__AARCH64EL__
AS += -EL
-LD += -EL
-LDFLAGS += -maarch64elf
+LDFLAGS += -EL -maarch64elf
UTS_MACHINE := aarch64
endif