From: Masahiro Yamada Date: Mon, 9 Jul 2018 02:09:42 +0000 (+0100) Subject: ARM: 8779/1: add endianness option to LDFLAGS instead of LD X-Git-Tag: v4.19-rc1~190^2^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2288fd51808cdf697f12d92706706554192db290;p=thirdparty%2Fkernel%2Flinux.git ARM: 8779/1: 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. Signed-off-by: Masahiro Yamada Signed-off-by: Russell King --- diff --git a/arch/arm/Makefile b/arch/arm/Makefile index fc26c3d7b9b66..62ebeae9f837d 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -46,12 +46,12 @@ ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) KBUILD_CPPFLAGS += -mbig-endian CHECKFLAGS += -D__ARMEB__ AS += -EB -LD += -EB +LDFLAGS += -EB else KBUILD_CPPFLAGS += -mlittle-endian CHECKFLAGS += -D__ARMEL__ AS += -EL -LD += -EL +LDFLAGS += -EL endif #