From 1d3b97c94eb562fa1071abd50b3a4cb4cca7f203 Mon Sep 17 00:00:00 2001 From: Daniel Schwierzeck Date: Sun, 23 Sep 2018 19:15:15 +0200 Subject: Kbuild: add LDFLAGS_STANDALONE Introduce a new Makefile variable for passing LDFLAGS to standalone programs. Currently the variable CONFIG_STANDALONE_LOAD_ADDR is misued on some archs to pass a specific linker script. Signed-off-by: Daniel Schwierzeck Reviewed-by: Tom Rini Reviewed-by: Rick Chen --- arch/mips/cpu/mips32/config.mk | 4 ++-- arch/mips/cpu/mips64/config.mk | 4 ++-- arch/nds32/config.mk | 4 ++-- arch/riscv/config.mk | 4 ++-- arch/sh/config.mk | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'arch') diff --git a/arch/mips/cpu/mips32/config.mk b/arch/mips/cpu/mips32/config.mk index a0247596f55..662e4f8fc8e 100644 --- a/arch/mips/cpu/mips32/config.mk +++ b/arch/mips/cpu/mips32/config.mk @@ -3,5 +3,5 @@ # (C) Copyright 2003 # Wolfgang Denk, DENX Software Engineering, -CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 \ - -T $(srctree)/examples/standalone/mips.lds +CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 +LDFLAGS_STANDALONE += -T $(srctree)/examples/standalone/mips.lds diff --git a/arch/mips/cpu/mips64/config.mk b/arch/mips/cpu/mips64/config.mk index cd96bbcce98..6a53976b5c8 100644 --- a/arch/mips/cpu/mips64/config.mk +++ b/arch/mips/cpu/mips64/config.mk @@ -3,5 +3,5 @@ # (C) Copyright 2003 # Wolfgang Denk, DENX Software Engineering, -CONFIG_STANDALONE_LOAD_ADDR ?= 0xffffffff80200000 \ - -T $(srctree)/examples/standalone/mips64.lds +CONFIG_STANDALONE_LOAD_ADDR ?= 0xffffffff80200000 +LDFLAGS_STANDALONE += -T $(srctree)/examples/standalone/mips64.lds diff --git a/arch/nds32/config.mk b/arch/nds32/config.mk index c5520fd8d83..12cec368d3b 100644 --- a/arch/nds32/config.mk +++ b/arch/nds32/config.mk @@ -12,8 +12,8 @@ ifeq ($(CROSS_COMPILE),) CROSS_COMPILE := nds32le-linux- endif -CONFIG_STANDALONE_LOAD_ADDR = 0x300000 \ - -T $(srctree)/examples/standalone/nds32.lds +CONFIG_STANDALONE_LOAD_ADDR = 0x300000 +LDFLAGS_STANDALONE += -T $(srctree)/examples/standalone/nds32.lds PLATFORM_RELFLAGS += -fno-common -mrelax PLATFORM_RELFLAGS += -gdwarf-2 diff --git a/arch/riscv/config.mk b/arch/riscv/config.mk index ed9eb0c24cd..cc5d8d1ad5e 100644 --- a/arch/riscv/config.mk +++ b/arch/riscv/config.mk @@ -27,8 +27,8 @@ CFLAGS_EFI += -march=rv64ima -mabi=lp64 EFI_LDS := elf_riscv64_efi.lds endif -CONFIG_STANDALONE_LOAD_ADDR = 0x00000000 \ - -T $(srctree)/examples/standalone/riscv.lds +CONFIG_STANDALONE_LOAD_ADDR = 0x00000000 +LDFLAGS_STANDALONE += -T $(srctree)/examples/standalone/riscv.lds PLATFORM_CPPFLAGS += -ffixed-gp -fpic PLATFORM_RELFLAGS += -fno-common -gdwarf-2 -ffunction-sections diff --git a/arch/sh/config.mk b/arch/sh/config.mk index 92abee17ad0..6ef44638abd 100644 --- a/arch/sh/config.mk +++ b/arch/sh/config.mk @@ -9,7 +9,7 @@ endif CONFIG_STANDALONE_LOAD_ADDR ?= 0x8C000000 ifeq ($(CPU),sh2) -CONFIG_STANDALONE_LOAD_ADDR += -EB +LDFLAGS_STANDALONE += -EB endif PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__ -- cgit v1.2.3