From 479c25641a1370bbb02cbc4fab20c30259aca67f Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 15 May 2014 20:11:54 +0000 Subject: [PATCH] toolchain/gcc: fix build on arm with clang as host gcc replacement Signed-off-by: Felix Fietkau SVN-Revision: 40772 --- toolchain/gcc/common.mk | 4 ++++ 1 file changed, 4 insertions(+) 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)" \ -- 2.30.2