aboutsummaryrefslogtreecommitdiffstats
path: root/build-gcc.sh
diff options
context:
space:
mode:
authorThan McIntosh <thanm@google.com>2015-11-16 16:00:31 -0500
committerThan McIntosh <thanm@google.com>2015-11-20 12:56:24 -0500
commit2b2fba4c210788ab3867638889d20adcd4a0520b (patch)
tree707ae3ae21462130441b8b70fcee95105ac29053 /build-gcc.sh
parentfc9fa2185e6000f3f81ae18e8f81107021b70a14 (diff)
downloadtoolchain_gcc-2b2fba4c210788ab3867638889d20adcd4a0520b.tar.gz
toolchain_gcc-2b2fba4c210788ab3867638889d20adcd4a0520b.tar.bz2
toolchain_gcc-2b2fba4c210788ab3867638889d20adcd4a0520b.zip
Tweak rules for building debuggable gcc + tools.
Override CXXFLAGS when building for debugging (so as to insure that C++ code is compiled correctly as well as C code). Change-Id: I70e285be236b33f07594aef2adbf2fbd73b4a909
Diffstat (limited to 'build-gcc.sh')
-rwxr-xr-xbuild-gcc.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/build-gcc.sh b/build-gcc.sh
index e6aef9d0f..f23edb16c 100755
--- a/build-gcc.sh
+++ b/build-gcc.sh
@@ -256,6 +256,7 @@ if [ "$BUILD_DEBUGGABLE" = "yes" ] ; then
else
CFLAGS_FOR_BUILD="-O2 -s"
fi
+CXXFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD"
LDFLAGS_FOR_BUILD=
if [ "$MINGW" = "yes" ] ; then
@@ -263,9 +264,10 @@ if [ "$MINGW" = "yes" ] ; then
fi
CFLAGS="$CFLAGS_FOR_BUILD $HOST_CFLAGS"
+CXXFLAGS="$CXXFLAGS_FOR_BUILD $HOST_CFLAGS"
LDFLAGS="$LDFLAGS_FOR_BUILD $HOST_LDFLAGS"
-export CFLAGS LDFLAGS CFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD
+export CFLAGS CXXFLAGS LDFLAGS CFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD
# This extra flag is used to slightly speed up the build
EXTRA_CONFIG_FLAGS="--disable-bootstrap"