ソースを参照

toolchain/gcc: fix build on arm with clang as host gcc replacement

Signed-off-by: Felix Fietkau <[email protected]>

SVN-Revision: 40772
Felix Fietkau 11 年 前
コミット
479c25641a
1 ファイル変更4 行追加0 行削除
  1. 4 0
      toolchain/gcc/common.mk

+ 4 - 0
toolchain/gcc/common.mk

@@ -95,6 +95,10 @@ endif
 
 
 GCC_CONFIGURE:= \
 GCC_CONFIGURE:= \
 	SHELL="$(BASH)" \
 	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 \
 	$(HOST_SOURCE_DIR)/configure \
 		--with-bugurl=$(BUGURL) \
 		--with-bugurl=$(BUGURL) \
 		--with-pkgversion="$(PKGVERSION)" \
 		--with-pkgversion="$(PKGVERSION)" \