summaryrefslogtreecommitdiff
path: root/toolchain/gcc/common.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-05-15 20:11:54 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-05-15 20:11:54 +0000
commit479c25641a1370bbb02cbc4fab20c30259aca67f (patch)
tree27c93501482d9773dabc1487878f5ef1e006cd27 /toolchain/gcc/common.mk
parentcfbd90d2bfcbc54e22dc9e425a1a73b9c16f0fa2 (diff)
downloadmtk-20170518-479c25641a1370bbb02cbc4fab20c30259aca67f.zip
mtk-20170518-479c25641a1370bbb02cbc4fab20c30259aca67f.tar.gz
mtk-20170518-479c25641a1370bbb02cbc4fab20c30259aca67f.tar.bz2
toolchain/gcc: fix build on arm with clang as host gcc replacement
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 40772
Diffstat (limited to 'toolchain/gcc/common.mk')
-rw-r--r--toolchain/gcc/common.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
index af971ba..5dfbc48 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)" \