aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2022-07-17 17:56:36 +0200
committerChristian Marangi <ansuelsmth@gmail.com>2022-12-04 16:07:35 +0100
commit462c5653e18f0bd2c9ec66a2b154bf26d8f4aa1d (patch)
tree144d3db93818c29f4f0bd0971f72195bbdb3bb48 /scripts
parent1f5b8a32e4a07b5ca55b0fce73ade5e026d4e584 (diff)
downloadupstream-462c5653e18f0bd2c9ec66a2b154bf26d8f4aa1d.tar.gz
upstream-462c5653e18f0bd2c9ec66a2b154bf26d8f4aa1d.tar.bz2
upstream-462c5653e18f0bd2c9ec66a2b154bf26d8f4aa1d.zip
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@gmail.com> (cherry picked from commit 75311977f5ff64b491cb57ac713d75e0e410d786)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ext-toolchain.sh7
1 files changed, 7 insertions, 0 deletions
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"