From: nbd Date: Thu, 15 May 2014 20:11:54 +0000 (+0000) Subject: toolchain/gcc: fix build on arm with clang as host gcc replacement X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=7736eee9420d51ababc40bf376472c9db5ca3f1a;p=openwrt.git toolchain/gcc: fix build on arm with clang as host gcc replacement Signed-off-by: Felix Fietkau git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40772 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index af971ba78e..5dfbc488cd 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -95,6 +95,10 @@ endif GCC_CONFIGURE:= \ SHELL="$(BASH)" \ + $(if $(shell gcc --version 2>&1 | grep LLVM), \ + CFLAGS="-O2 -fbracket-depth=512 -pipe" \ + CXXFLAGS="-O2 -fbracket-depth=512 -pipe" \ + ) \ $(HOST_SOURCE_DIR)/configure \ --with-bugurl=$(BUGURL) \ --with-pkgversion="$(PKGVERSION)" \