summaryrefslogtreecommitdiffstats
path: root/rules.mk
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2024-04-20 18:29:23 +0200
committerChristian Marangi <ansuelsmth@gmail.com>2024-04-21 17:59:17 +0200
commit0e161968a7358cc23af28b627ecb794b3cdaea72 (patch)
treef0c6b635066c0d8c4fabf26eef4d1e03f863f459 /rules.mk
parent4a81d868db85a7954a73bc6dc4a957bbd6abc813 (diff)
downloadopenwrt-0e161968a7358cc23af28b627ecb794b3cdaea72.tar.gz
openwrt-0e161968a7358cc23af28b627ecb794b3cdaea72.tar.bz2
openwrt-0e161968a7358cc23af28b627ecb794b3cdaea72.zip
toolchain/wrapper: fill and reference info.mk in staging_dir ext toolchain
Currently when external toolchain is used, a info.mk is created (with to-be-filled values) but is never actually filled with real values and is never actually used in rules.mk. This info.mk is used down the code with special packages like libgcc to reference info like gcc version and package special library. To mimic what is done with internal toolchain, add the include in rules.mk for info.mk also for external library and in fix toolchain/wrapper to fill the staging_dir info.mk. The logic is to check if the external toolchain provide an info.mk and if it doesn't we at least fill the GCC_VERSION with the value set in the .config file. With this special library like libgcc correctly reference and have set the GCC_VERSION variable. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/rules.mk b/rules.mk
index 6f05047f26..84586ac26b 100644
--- a/rules.mk
+++ b/rules.mk
@@ -194,6 +194,7 @@ ifndef DUMP
endif
else
ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
+ -include $(TOOLCHAIN_DIR)/info.mk
TARGET_CROSS:=$(call qstrip,$(CONFIG_TOOLCHAIN_PREFIX))
TOOLCHAIN_ROOT_DIR:=$(call qstrip,$(CONFIG_TOOLCHAIN_ROOT))
TOOLCHAIN_BIN_DIRS:=$(patsubst ./%,$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_BIN_PATH)))