From 21ab20bc64f5608d9341b1878fa1c5a569b471d5 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Fri, 27 Jan 2023 16:32:31 +0100 Subject: [PATCH] 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 --- rules.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rules.mk b/rules.mk index 58c53705a2..1cedd91aa8 100644 --- a/rules.mk +++ b/rules.mk @@ -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)" \ -- 2.30.2