buildgcc: Fix up cross GCC building
Add a missing line-break escape and, rather cosmetic, guard execution of $CXX which we allow but don't force to be set. Change-Id: Icf6d3b7de4b7999b8214489f28997964c490d1e9 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/21307 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
This commit is contained in:
@ -659,7 +659,7 @@ build_cross_GCC() {
|
|||||||
# Work around crazy code generator in GCC that confuses CLANG.
|
# Work around crazy code generator in GCC that confuses CLANG.
|
||||||
$CC --version | grep clang >/dev/null 2>&1 && \
|
$CC --version | grep clang >/dev/null 2>&1 && \
|
||||||
CLANGFLAGS="-fbracket-depth=1024"
|
CLANGFLAGS="-fbracket-depth=1024"
|
||||||
$CXX --version | grep clang >/dev/null 2>&1 && \
|
[ -n "$CXX" ] && $CXX --version | grep clang >/dev/null 2>&1 && \
|
||||||
CLANGCXXFLAGS="-fbracket-depth=1024"
|
CLANGCXXFLAGS="-fbracket-depth=1024"
|
||||||
|
|
||||||
# GCC does not honor HOSTCFLAGS at all. CFLAGS are used for
|
# GCC does not honor HOSTCFLAGS at all. CFLAGS are used for
|
||||||
@ -670,7 +670,7 @@ build_cross_GCC() {
|
|||||||
# Also set the CXX version of the flags because GCC is now compiled
|
# Also set the CXX version of the flags because GCC is now compiled
|
||||||
# using C++.
|
# using C++.
|
||||||
CC="$(hostcc target)" CXX="$(hostcxx target)" \
|
CC="$(hostcc target)" CXX="$(hostcxx target)" \
|
||||||
CFLAGS_FOR_TARGET="-O2 -Dinhibit_libc"
|
CFLAGS_FOR_TARGET="-O2 -Dinhibit_libc" \
|
||||||
CFLAGS="$HOSTCFLAGS $CLANGFLAGS" \
|
CFLAGS="$HOSTCFLAGS $CLANGFLAGS" \
|
||||||
CFLAGS_FOR_BUILD="$HOSTCFLAGS $CLANGFLAGS" \
|
CFLAGS_FOR_BUILD="$HOSTCFLAGS $CLANGFLAGS" \
|
||||||
CXXFLAGS="$HOSTCFLAGS $CLANGCXXFLAGS" \
|
CXXFLAGS="$HOSTCFLAGS $CLANGCXXFLAGS" \
|
||||||
|
Reference in New Issue
Block a user