[openwrt/openwrt] ext-toolchain: fix wrapper for gcc-ar, gcc-nm, gcc-ranlib

LEDE Commits lede-commits at lists.infradead.org
Sat Feb 7 08:54:25 PST 2026


hauke pushed a commit to openwrt/openwrt.git, branch openwrt-25.12:
https://git.openwrt.org/cb209ad0d480bb9180d4c49827f5edaa9f0a1958

commit cb209ad0d480bb9180d4c49827f5edaa9f0a1958
Author: Gustavo Henrique Nihei <gustavo.nihei at espressif.com>
AuthorDate: Fri Jan 23 18:04:59 2026 -0300

    ext-toolchain: fix wrapper for gcc-ar, gcc-nm, gcc-ranlib
    
    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 at espressif.com>
    Link: https://github.com/openwrt/openwrt/pull/21757
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    (cherry picked from commit 435917735ab8a9ba23300dda77aaace13fc16d96)
    Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei at espressif.com>
    Link: https://github.com/openwrt/openwrt/pull/21899
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 scripts/ext-toolchain.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/ext-toolchain.sh b/scripts/ext-toolchain.sh
index 2794d2e8ef..8b38d17786 100755
--- a/scripts/ext-toolchain.sh
+++ b/scripts/ext-toolchain.sh
@@ -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"
 					;;




More information about the lede-commits mailing list