summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2016-03-31 17:18:55 -0700
committerJosh Gao <jmgao@google.com>2016-04-28 14:56:29 -0700
commit5a1ffa97a2c9187b344e3f7edace6bcdf8320703 (patch)
tree1640f6edbb713269a700fe513964799a8fc33fe5
parentdfc5ca4a9815bf109bd88586733dd4c77fb3bc5b (diff)
downloadgdb-5a1ffa97a2c9187b344e3f7edace6bcdf8320703.tar.gz
Build and use liblzma in gdb.
Bug: http://b/27926543 Change-Id: If8d689b68c0a274d3cf6011be3a56a4bbfe70603
-rwxr-xr-xbuild-gdb.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/build-gdb.sh b/build-gdb.sh
index 14cb56ba0..861e46c7a 100755
--- a/build-gdb.sh
+++ b/build-gdb.sh
@@ -158,6 +158,30 @@ build_expat ()
}
# $1: host system tag
+build_lzma ()
+{
+ local ARGS
+ local SRCDIR=$TOOLCHAIN_SRC_DIR/xz
+ local BUILDDIR=$BH_BUILD_DIR/build-xz-$1
+ local INSTALLDIR=$BH_BUILD_DIR/install-host-$1
+
+ ARGS=" --prefix=$INSTALLDIR"
+ ARGS=$ARGS" --disable-shared --enable-static"
+ ARGS=$ARGS" --disable-xz --disable-xzdec --disable-lzmadec --disable-scripts --disable-doc"
+ ARGS=$ARGS" --build=$BH_BUILD_CONFIG"
+ ARGS=$ARGS" --host=$BH_HOST_CONFIG"
+
+ TEXT="$(bh_host_text) lzma:"
+
+ mkdir -p "$BUILDDIR" && rm -rf "$BUILDDIR"/* &&
+ cd "$BUILDDIR" &&
+ dump "$TEXT Building"
+ run "$SRCDIR"/configure $ARGS &&
+ run make -j$NUM_JOBS &&
+ run make -j$NUM_JOBS install
+}
+
+# $1: host system tag
# $2: gdb version
# ${@:3}: target tags
build_host_gdb ()
@@ -181,6 +205,9 @@ build_host_gdb ()
build_expat $1
local EXPATPREFIX=$BH_BUILD_DIR/install-host-$1
+ build_lzma $1
+ local LZMAPREFIX=$BH_BUILD_DIR/install-host-$1
+
ARGS=" --prefix=$INSTALLDIR"
ARGS=$ARGS" --disable-shared"
@@ -201,6 +228,8 @@ build_host_gdb ()
ARGS=$ARGS" --disable-docs"
ARGS=$ARGS" --with-expat"
ARGS=$ARGS" --with-libexpat-prefix=$EXPATPREFIX"
+ ARGS=$ARGS" --with-lzma"
+ ARGS=$ARGS" --with-liblzma-prefix=$LZMAPREFIX"
ARGS=$ARGS" --without-mpc"
ARGS=$ARGS" --without-mpfr"
ARGS=$ARGS" --without-gmp"