rules: prepare to use different linkers

This explicitely adds the default linker to the target LDFLAGS.

No functional change intended.

Signed-off-by: Andre Heider <a.heider@gmail.com>
This commit is contained in:
Andre Heider 2023-01-27 16:32:31 +01:00 committed by Christian Marangi
parent d9070f8d23
commit 21ab20bc64
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7

View File

@ -211,6 +211,10 @@ ifndef DUMP
endif
endif
endif
TARGET_LINKER?=bfd
TARGET_LDFLAGS+= -fuse-ld=$(TARGET_LINKER)
TARGET_PATH_PKG:=$(STAGING_DIR)/host/bin:$(STAGING_DIR_HOSTPKG)/bin:$(TARGET_PATH)
ifeq ($(CONFIG_SOFT_FLOAT),y)
@ -252,6 +256,7 @@ TARGET_RANLIB:=$(TARGET_CROSS)gcc-ranlib
TARGET_NM:=$(TARGET_CROSS)gcc-nm
TARGET_CC:=$(TARGET_CROSS)gcc
TARGET_CXX:=$(TARGET_CROSS)g++
TARGET_LD:=$(TARGET_CROSS)ld.$(TARGET_LINKER)
KPATCH:=$(SCRIPT_DIR)/patch-kernel.sh
FILECMD:=$(STAGING_DIR_HOST)/bin/file
SED:=$(STAGING_DIR_HOST)/bin/sed -i -e
@ -305,7 +310,7 @@ endif
TARGET_CONFIGURE_OPTS = \
AR="$(TARGET_AR)" \
AS="$(TARGET_CC) -c $(TARGET_ASFLAGS)" \
LD=$(TARGET_CROSS)ld \
LD="$(TARGET_LD)" \
NM="$(TARGET_NM)" \
CC="$(TARGET_CC)" \
GCC="$(TARGET_CC)" \