toolchain/gcc: correct the check expr for newer clang
[openwrt/staging/wigyori.git] / toolchain / gcc / common.mk
index 8ce8d84a5f3e577af73e117b26c7d42425160694..24c923abef51d10f78cea13f3585ffc092f13eb8 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" \
        ) \