mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-31 08:25:32 +00:00
Clang: Use {C,CXX}FLAG -fbracket-depth=512 for GCC build
https://llvm.org/bugs/show_bug.cgi?id=19650 https://gcc.gnu.org/ml/gcc/2014-05/msg00014.html Signed-off-by: Ray Donnelly <mingw.android@gmail.com>
This commit is contained in:
parent
f001b0605e
commit
b0743fdcda
@ -426,6 +426,12 @@ do_gcc_core_backend() {
|
||||
|
||||
CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
|
||||
|
||||
# Clang's default bracket-depth is 256, and building GCC
|
||||
# requires somewhere between 257 and 512.
|
||||
if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then
|
||||
cflags="$cflags "-fbracket-depth=512
|
||||
fi
|
||||
|
||||
# Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)
|
||||
CT_DoExecLog CFG \
|
||||
CC_FOR_BUILD="${CT_BUILD}-gcc" \
|
||||
@ -916,6 +922,13 @@ do_gcc_backend() {
|
||||
|
||||
CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
|
||||
|
||||
# https://gcc.gnu.org/ml/gcc/2014-05/msg00014.html
|
||||
# "gcc 4.9.0 do not build on OSX" .. because Clang's default
|
||||
# bracket-depth is 256
|
||||
if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then
|
||||
cflags="$cflags "-fbracket-depth=512
|
||||
fi
|
||||
|
||||
CT_DoExecLog CFG \
|
||||
CC_FOR_BUILD="${CT_BUILD}-gcc" \
|
||||
CFLAGS="${cflags}" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user