[openwrt/openwrt] scripts: ext-toolchain: add support for info.mk in probe_cc
LEDE Commits
lede-commits at lists.infradead.org
Mon Oct 3 15:13:31 PDT 2022
hauke pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/65bd63206900c0660ac5eb9465a4ffdacb9e51ec
commit 65bd63206900c0660ac5eb9465a4ffdacb9e51ec
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Sun Jul 17 17:56:36 2022 +0200
scripts: ext-toolchain: add support for info.mk in probe_cc
Openwrt generate info.mk that contains the libc type. For probe_cc check
if the file exist and parse directly it for LIBC type.
Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
(cherry picked from commit 75311977f5ff64b491cb57ac713d75e0e410d786)
---
scripts/ext-toolchain.sh | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/scripts/ext-toolchain.sh b/scripts/ext-toolchain.sh
index 1ef3f42c50..1f8eca3076 100755
--- a/scripts/ext-toolchain.sh
+++ b/scripts/ext-toolchain.sh
@@ -463,6 +463,13 @@ probe_cpp() {
}
probe_libc() {
+ if [ -f $TOOLCHAIN/info.mk ]; then
+ LIBC_TYPE=$(grep LIBC_TYPE $TOOLCHAIN/info.mk | sed 's/LIBC_TYPE=//')
+ return 0
+ fi
+
+ echo "Warning! Can't find info.mk, trying to detect with alternative way."
+
if [ -z "$LIBC_TYPE" ]; then
if test_uclibc; then
LIBC_TYPE="uclibc"
More information about the lede-commits
mailing list