Skip to content

Commit

Permalink
scripts: ext-toolchain: add support for info.mk in probe_cc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ansuel committed Jul 24, 2022
1 parent ddeabc7 commit 7531197
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/ext-toolchain.sh
Expand Up @@ -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"
Expand Down

0 comments on commit 7531197

Please sign in to comment.