<p>Patrick Georgi has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/20365">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">crossgcc: Fix building with clang++ in the presence of gcc<br><br>Some environments (<grumble>cros_sdk</grumble>) provide gcc as $CC and<br>clang++ as $CXX. The latter needs the higher bracket-depth while the<br>former has no idea what it means, so tell CC and CXX individually.<br><br>Change-Id: I72b75fb9bb5df3a9b1561ee8821ec43ada29b24f<br>Signed-off-by: Patrick Georgi <pgeorgi@chromium.org><br>---<br>M util/crossgcc/buildgcc<br>1 file changed, 9 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/65/20365/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc<br>index 4d1f25a..01da659 100755<br>--- a/util/crossgcc/buildgcc<br>+++ b/util/crossgcc/buildgcc<br>@@ -621,7 +621,9 @@<br> build_cross_GCC() {<br>        # Work around crazy code generator in GCC that confuses CLANG.<br>        $CC --version | grep clang >/dev/null 2>&1 && \<br>-            HOSTCFLAGS="$HOSTCFLAGS -fbracket-depth=1024"<br>+              CLANGFLAGS="-fbracket-depth=1024"<br>+  $CXX --version | grep clang >/dev/null 2>&1 && \<br>+           CLANGCXXFLAGS="-fbracket-depth=1024"<br> <br>     # GCC does not honor HOSTCFLAGS at all. CFLAGS are used for<br>   # both target and host object files.<br>@@ -630,9 +632,12 @@<br>    # libiberty is not compiled with CFLAGS_FOR_BUILD.<br>    # Also set the CXX version of the flags because GCC is now compiled<br>   # using C++.<br>- CC="$CC" CFLAGS_FOR_TARGET="-O2 -Dinhibit_libc" CFLAGS="$HOSTCFLAGS" \<br>-         CFLAGS_FOR_BUILD="$HOSTCFLAGS" CXXFLAGS="$HOSTCFLAGS" \<br>-          CXXFLAGS_FOR_BUILD="$HOSTCFLAGS" ../gcc-${GCC_VERSION}/configure \<br>+ CC="$CC" CFLAGS_FOR_TARGET="-O2 -Dinhibit_libc"<br>+          CFLAGS="$HOSTCFLAGS $CLANGFLAGS" \<br>+         CFLAGS_FOR_BUILD="$HOSTCFLAGS $CLANGFLAGS" \<br>+               CXXFLAGS="$HOSTCFLAGS $CLANGCXXFLAGS" \<br>+            CXXFLAGS_FOR_BUILD="$HOSTCFLAGS $CLANGCXXFLAGS" \<br>+          ../gcc-${GCC_VERSION}/configure \<br>             --prefix=$TARGETDIR --libexecdir=$TARGETDIR/lib \<br>             --target=${TARGETARCH} --disable-werror --disable-shared \<br>            --enable-lto --enable-plugins --enable-gold --enable-ld=default \<br></pre><p>To view, visit <a href="https://review.coreboot.org/20365">change 20365</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/20365"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I72b75fb9bb5df3a9b1561ee8821ec43ada29b24f </div>
<div style="display:none"> Gerrit-Change-Number: 20365 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Georgi <pgeorgi@google.com> </div>