]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
arm64: add endianness option to LDFLAGS instead of LD
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 3 Jul 2018 01:22:00 +0000 (10:22 +0900)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 4 Jul 2018 21:49:13 +0000 (22:49 +0100)
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>
arch/arm64/Makefile

index 27389adf511a7701a45438df5d8de5724ed1cc50..48158c550110dc307b08f32018b829943b5b5539 100644 (file)
@@ -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