diff mbox series

[3/3] microblaze: add endianness options to LDFLAGS instead of LD

Message ID 1530580921-23340-4-git-send-email-yamada.masahiro@socionext.com
State New
Headers show
Series arm,arm64,microblaze: add endianness options to LDFLAGS instead of LD | expand

Commit Message

Masahiro Yamada July 3, 2018, 1:22 a.m. UTC
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 <yamada.masahiro@socionext.com>

---

 arch/microblaze/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.7.4

Comments

Masahiro Yamada July 24, 2018, 1:53 a.m. UTC | #1
Hi Michal,

Ping?


2018-07-03 10:22 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> 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 <yamada.masahiro@socionext.com>

> ---

>

>  arch/microblaze/Makefile | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

>

> diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile

> index d269dd4b..7333036 100644

> --- a/arch/microblaze/Makefile

> +++ b/arch/microblaze/Makefile

> @@ -40,11 +40,11 @@ CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare

>  ifdef CONFIG_CPU_BIG_ENDIAN

>  KBUILD_CFLAGS += -mbig-endian

>  KBUILD_AFLAGS += -mbig-endian

> -LD += -EB

> +LDFLAGS += -EB

>  else

>  KBUILD_CFLAGS += -mlittle-endian

>  KBUILD_AFLAGS += -mlittle-endian

> -LD += -EL

> +LDFLAGS += -EL

>  endif

>

>  CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER))

> --

> 2.7.4

>




-- 
Best Regards
Masahiro Yamada
Michal Simek July 25, 2018, 7:20 a.m. UTC | #2
On 3.7.2018 03:22, Masahiro Yamada wrote:
> 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 <yamada.masahiro@socionext.com>

> ---

> 

>  arch/microblaze/Makefile | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

> 

> diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile

> index d269dd4b..7333036 100644

> --- a/arch/microblaze/Makefile

> +++ b/arch/microblaze/Makefile

> @@ -40,11 +40,11 @@ CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare

>  ifdef CONFIG_CPU_BIG_ENDIAN

>  KBUILD_CFLAGS += -mbig-endian

>  KBUILD_AFLAGS += -mbig-endian

> -LD += -EB

> +LDFLAGS += -EB

>  else

>  KBUILD_CFLAGS += -mlittle-endian

>  KBUILD_AFLAGS += -mlittle-endian

> -LD += -EL

> +LDFLAGS += -EL

>  endif

>  

>  CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER))

> 


Applied to next.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs
diff mbox series

Patch

diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile
index d269dd4b..7333036 100644
--- a/arch/microblaze/Makefile
+++ b/arch/microblaze/Makefile
@@ -40,11 +40,11 @@  CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare
 ifdef CONFIG_CPU_BIG_ENDIAN
 KBUILD_CFLAGS += -mbig-endian
 KBUILD_AFLAGS += -mbig-endian
-LD += -EB
+LDFLAGS += -EB
 else
 KBUILD_CFLAGS += -mlittle-endian
 KBUILD_AFLAGS += -mlittle-endian
-LD += -EL
+LDFLAGS += -EL
 endif
 
 CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER))