]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ext-toolchain: fix wrapper for gcc-ar, gcc-nm, gcc-ranlib 21757/head
authorGustavo Henrique Nihei <gustavo.nihei@espressif.com>
Fri, 23 Jan 2026 21:04:59 +0000 (18:04 -0300)
committerRobert Marko <robimarko@gmail.com>
Fri, 6 Feb 2026 16:32:06 +0000 (17:32 +0100)
The pattern '*-*cc-*' incorrectly matches these tools because their names
contain 'cc-'. This causes them to receive compiler CFLAGS, breaking
builds with 'ar: two different operation options specified'.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
Link: https://github.com/openwrt/openwrt/pull/21757
Signed-off-by: Robert Marko <robimarko@gmail.com>
scripts/ext-toolchain.sh

index 2794d2e8eff40bb03ad331c7096214c8235fed9e..8b38d17786683225301c7ce0c6a14032b1f49680 100755 (executable)
@@ -282,6 +282,9 @@ wrap_bins() {
                                fi
 
                                case "${cmd##*/}" in
+                                       *-gcc-ar|*-gcc-nm|*-gcc-ranlib)
+                                               wrap_bin_other "$out" "$bin"
+                                       ;;
                                        *-*cc|*-*cc-*|*-*++|*-*++-*|*-cpp)
                                                wrap_bin_cc "$out" "$bin"
                                        ;;