# (C) Copyright 2003
# Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
-CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 \
- -T $(srctree)/examples/standalone/mips.lds
+CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000
+LDFLAGS_STANDALONE += -T $(srctree)/examples/standalone/mips.lds
# (C) Copyright 2003
# Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
-CONFIG_STANDALONE_LOAD_ADDR ?= 0xffffffff80200000 \
- -T $(srctree)/examples/standalone/mips64.lds
+CONFIG_STANDALONE_LOAD_ADDR ?= 0xffffffff80200000
+LDFLAGS_STANDALONE += -T $(srctree)/examples/standalone/mips64.lds
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
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
CONFIG_STANDALONE_LOAD_ADDR ?= 0x8C000000
ifeq ($(CPU),sh2)
-CONFIG_STANDALONE_LOAD_ADDR += -EB
+LDFLAGS_STANDALONE += -EB
endif
PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
PLATFORM_LDFLAGS :=
LDFLAGS :=
LDFLAGS_FINAL :=
+LDFLAGS_STANDALONE :=
OBJCOPYFLAGS :=
# clear VENDOR for tcsh
VENDOR :=
export PLATFORM_CPPFLAGS
export RELFLAGS
export LDFLAGS_FINAL
+export LDFLAGS_STANDALONE
export CONFIG_STANDALONE_LOAD_ADDR
# source file.
ccflags-y += $(call cc-option,-fno-toplevel-reorder)
+LDFLAGS_STANDALONE += -Ttext $(CONFIG_STANDALONE_LOAD_ADDR)
+
#########################################################################
quiet_cmd_link_lib = LD $@
$(call if_changed,link_lib)
quiet_cmd_link_elf = LD $@
- cmd_link_elf = $(LD) $(LDFLAGS) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \
+ cmd_link_elf = $(LD) $(LDFLAGS) $(LDFLAGS_STANDALONE) -g \
-o $@ -e $(SYM_PREFIX)$(@F) $< $(LIB) $(PLATFORM_LIBGCC)
$(ELF): $(obj)/%: $(obj)/%.o $(LIB) FORCE