diff options
author | Josh Gao <jmgao@google.com> | 2015-08-27 11:07:54 -0700 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2015-08-27 23:26:21 +0000 |
commit | 8b25b304df87fb348a57203337a1de9551b99cb9 (patch) | |
tree | 9cca78936faa97af6834d70e417c2df9cdc50304 | |
parent | a4e5986f823cf7b71bce508361865abe24a43dfd (diff) | |
download | toolchain_gcc-8b25b304df87fb348a57203337a1de9551b99cb9.tar.gz toolchain_gcc-8b25b304df87fb348a57203337a1de9551b99cb9.tar.bz2 toolchain_gcc-8b25b304df87fb348a57203337a1de9551b99cb9.zip |
Don't build gdb via gcc.
Change-Id: Iff7e294f5bf08048d019f39465d377cfb9782866
-rwxr-xr-x | build-gcc.sh | 42 |
1 files changed, 4 insertions, 38 deletions
diff --git a/build-gcc.sh b/build-gcc.sh index 3dc135e91..c6e2f1cd7 100755 --- a/build-gcc.sh +++ b/build-gcc.sh @@ -41,14 +41,6 @@ register_var_option "--platform=<name>" PLATFORM "Specify platform name" OPTION_SYSROOT= register_var_option "--sysroot=<path>" OPTION_SYSROOT "Specify sysroot directory directly" -GDB_VERSION=$DEFAULT_GDB_VERSION -EXPLICIT_GDB_VERSION= -register_option "--gdb-version=<version>" do_gdb_version "Specify gdb version" "$GDB_VERSION" -do_gdb_version () { - GDB_VERSION=$1 - EXPLICIT_GDB_VERSION=true -} - BINUTILS_VERSION=$DEFAULT_BINUTILS_VERSION EXPLICIT_BINUTILS_VERSION= register_option "--binutils-version=<version>" do_binutils_version "Specify binutils version" "$BINUTILS_VERSION" @@ -151,12 +143,6 @@ fix_sysroot "$OPTION_SYSROOT" check_toolchain_src_dir "$SRC_DIR" -if [ ! -d $SRC_DIR/gdb/gdb-$GDB_VERSION ] ; then - echo "ERROR: Missing gdb sources: $SRC_DIR/gdb/gdb-$GDB_VERSION" - echo " Use --gdb-version=<version> to specify alternative." - exit 1 -fi - if [ -z "$EXPLICIT_BINUTILS_VERSION" ]; then BINUTILS_VERSION=$(get_default_binutils_version_for_gcc $TOOLCHAIN) dump "Auto-config: --binutils-version=$BINUTILS_VERSION" @@ -168,17 +154,6 @@ if [ ! -d $SRC_DIR/binutils/binutils-$BINUTILS_VERSION ] ; then exit 1 fi -if [ -z "$EXPLICIT_GDB_VERSION" ]; then - GDB_VERSION=$(get_default_gdb_version_for_gcc $TOOLCHAIN) - dump "Auto-config: --gdb-version=$GDB_VERSION" -fi - -if [ ! -d $SRC_DIR/gdb/gdb-$GDB_VERSION ] ; then - echo "ERROR: Missing gdb sources: $SRC_DIR/gdb/gdb-$GDB_VERSION" - echo " Use --gdb-version=<version> to specify alternative." - exit 1 -fi - fix_option MPFR_VERSION "$OPTION_MPFR_VERSION" "mpfr version" if [ ! -f $SRC_DIR/mpfr/mpfr-$MPFR_VERSION.tar.bz2 ] ; then echo "ERROR: Missing mpfr sources: $SRC_DIR/mpfr/mpfr-$MPFR_VERSION.tar.bz2" @@ -254,9 +229,7 @@ export CXXFLAGS_FOR_TARGET="$ABI_CXXFLAGS_FOR_TARGET" export ABI=$HOST_GMP_ABI # Note that the following flags only apply for "build" in canadian -# -Wno-error is needed because our gdb-6.6 sources use -Werror by default -# and fail to build with recent GCC versions. -CFLAGS_FOR_BUILD="-O2 -s -Wno-error" +CFLAGS_FOR_BUILD="-O2 -s" LDFLAGS_FOR_BUILD= if [ "$MINGW" = "yes" ] ; then @@ -383,7 +356,7 @@ $BUILD_SRCDIR/configure --target=$ABI_CONFIGURE_TARGET \ --with-mpc-version=$MPC_VERSION \ --with-gmp-version=$GMP_VERSION \ --with-gcc-version=$CONFIGURE_GCC_VERSION \ - --with-gdb-version=$GDB_VERSION \ + --with-gdb-version=none \ --with-gxx-include-dir=$TOOLCHAIN_INSTALL_PATH/include/c++/$GCC_VERSION \ --with-bugurl=$DEFAULT_ISSUE_TRACKER_URL \ --enable-languages=$ENABLE_LANGUAGES \ @@ -489,15 +462,8 @@ run rm -rf $TOOLCHAIN_INSTALL_PATH/$ABI_CONFIGURE_TARGET/include/c++ # strip binaries to reduce final package size test -z "$STRIP" && STRIP=strip -# because libpython is statically linked to GDB, it introduces symbols -# that are only used by Python modules that must not be stripped. This -# is not true of Windows which dynamically links to Python. -if [ "$MINGW" = "yes" ] ; then - run $STRIP $TOOLCHAIN_INSTALL_PATH/bin/* -else - find $TOOLCHAIN_INSTALL_PATH/bin -type f -not -name "*gdb" \ - | while read EXECUTABLE; do run $STRIP "$EXECUTABLE"; done -fi + +run $STRIP $TOOLCHAIN_INSTALL_PATH/bin/* run $STRIP $TOOLCHAIN_INSTALL_PATH/$ABI_CONFIGURE_TARGET/bin/* run $STRIP $TOOLCHAIN_INSTALL_PATH/libexec/gcc/*/*/cc1$HOST_EXE run $STRIP $TOOLCHAIN_INSTALL_PATH/libexec/gcc/*/*/cc1plus$HOST_EXE |