From: Andre Heider Date: Fri, 27 Jan 2023 15:32:31 +0000 (+0100) Subject: rules: prepare to use different linkers X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=21ab20bc64f5608d9341b1878fa1c5a569b471d5;p=openwrt%2Fstaging%2Fneocturne.git 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 --- 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)" \