toolchain/gcc: correct the check expr for newer clang
[openwrt/openwrt.git] / toolchain / gcc / common.mk
index 8ce8d84..24c923a 100644 (file)
@@ -89,7 +89,7 @@ endif
 
 GCC_CONFIGURE:= \
        SHELL="$(BASH)" \
-       $(if $(shell gcc --version 2>&1 | grep LLVM), \
+       $(if $(shell gcc --version 2>&1 | grep -E "Apple.(LLVM|clang)"), \
                CFLAGS="-O2 -fbracket-depth=512 -pipe" \
                CXXFLAGS="-O2 -fbracket-depth=512 -pipe" \
        ) \