From ca788d615fbf780b1a1665475ed304de4276f512 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Fri, 27 Jan 2023 16:33:25 +0100 Subject: [PATCH] meson: prepare to use different linkers This sets the default linker for cross compilation. No functional change intended. Signed-off-by: Andre Heider --- include/meson.mk | 1 + tools/meson/Makefile | 1 + tools/meson/files/openwrt-cross.txt.in | 2 ++ 3 files changed, 4 insertions(+) diff --git a/include/meson.mk b/include/meson.mk index 7d67dcf298b..74c9d3dd7fa 100644 --- a/include/meson.mk +++ b/include/meson.mk @@ -78,6 +78,7 @@ define Meson/CreateCrossFile $(STAGING_DIR_HOST)/bin/sed \ -e "s|@CC@|$(foreach BIN,$(TARGET_CC),'$(BIN)',)|" \ -e "s|@CXX@|$(foreach BIN,$(TARGET_CXX),'$(BIN)',)|" \ + -e "s|@LD@|$(foreach FLAG,$(TARGET_LINKER),'$(FLAG)',)|" \ -e "s|@AR@|$(TARGET_AR)|" \ -e "s|@STRIP@|$(TARGET_CROSS)strip|" \ -e "s|@NM@|$(TARGET_NM)|" \ diff --git a/tools/meson/Makefile b/tools/meson/Makefile index b115e0802b5..f957bfb49f0 100644 --- a/tools/meson/Makefile +++ b/tools/meson/Makefile @@ -2,6 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=meson PKG_VERSION:=1.1.1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/mesonbuild/meson/releases/download/$(PKG_VERSION) diff --git a/tools/meson/files/openwrt-cross.txt.in b/tools/meson/files/openwrt-cross.txt.in index ec4b027f1b7..ba119150691 100644 --- a/tools/meson/files/openwrt-cross.txt.in +++ b/tools/meson/files/openwrt-cross.txt.in @@ -1,6 +1,8 @@ [binaries] c = [@CC@] +c_ld = [@LD@] cpp = [@CXX@] +cpp_ld = [@LD@] ar = '@AR@' strip = '@STRIP@' nm = '@NM@'