toolchain/gcc: correct the check expr for newer clang
authorYorkie Liu <yorkiefixer@gmail.com>
Tue, 19 Nov 2019 05:41:10 +0000 (13:41 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 22 Dec 2019 23:31:13 +0000 (00:31 +0100)
This fixes gcc build error within clang 11.0, it tweaks the version
string from LLVM to clang.

Signed-off-by: Yorkie Liu <yorkiefixer@gmail.com>
(cherry picked from commit 65a561fd0919eafff2363ae8324db64be2a57f77)

toolchain/gcc/common.mk

index f7390c159ec9aec9c0fae01805da54a0e2b40dd2..e2dfcea6cb54eca6328becd1fe47838d8add95b8 100644 (file)
@@ -85,7 +85,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" \
        ) \