aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-06-19 23:57:24 +0000
committerElliott Hughes <enh@google.com>2015-06-19 23:57:24 +0000
commit79b5701f1e2f0dee68958c7c4206cdf9c44f1261 (patch)
treed48c3a26b5d238a5a9a90474d8ea689a78887713
parent27e43a67aece2bfc71f2d54a32e5d3ad6f3cdb0a (diff)
downloadbuild-79b5701f1e2f0dee68958c7c4206cdf9c44f1261.tar.gz
Revert "Remove references to expat from toolchain/build/configure."
This reverts commit 27e43a67aece2bfc71f2d54a32e5d3ad6f3cdb0a. Change-Id: Icea19baaf0d4d47344580df306c13ada7d54c806
-rw-r--r--Makefile.in33
-rw-r--r--README2
-rwxr-xr-xconfigure70
-rw-r--r--configure.ac31
4 files changed, 132 insertions, 4 deletions
diff --git a/Makefile.in b/Makefile.in
index 3d896e0..7537a77 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -83,6 +83,7 @@ PPL_VERSION=ppl-@PPL_VERSION@
CLOOG_VERSION=cloog-@CLOOG_VERSION@
ISL_VERSION=isl-@ISL_VERSION@
GDB_VERSION=gdb-@GDB_VERSION@
+EXPAT_VERSION=expat-@EXPAT_VERSION@
WITH_PYTHON=@WITH_PYTHON@
HAVE_MPC=@have_mpc@
HAVE_MPFR=@have_mpfr@
@@ -90,6 +91,7 @@ HAVE_GMP=@have_gmp@
HAVE_PPL=@have_ppl@
HAVE_CLOOG=@have_cloog@
HAVE_ISL=@have_isl@
+HAVE_EXPAT=@have_expat@
ENABLE_GOLD=@enable_gold@
ENABLE_LD_DEFAULT=@enable_ld_default@
STAMP=touch
@@ -755,6 +757,31 @@ stmp-install-host-cloog:
endif
install-host-cloog: stmp-install-host-cloog
+# host expat rules
+.PHONY: config-host-expat build-host-expat install-host-expat
+config-host-expat: stmp-config-host-expat
+EXPAT_CONFIG_ARGS=$(host_baseargs) --prefix=$(TEMP_INSTALLDIR) --disable-shared \
+ --host=${cur_host} --build=${cur_build}
+stmp-config-host-expat: config.status $(canadian_stmp)
+ ([ -d ${EXPAT_VERSION} ] || \
+ mkdir ${EXPAT_VERSION}) && \
+ ($(canadian_env) \
+ cd ${EXPAT_VERSION} ; \
+ $(call find-package-srcdir, ${EXPAT_VERSION})/configure \
+ $(EXPAT_CONFIG_ARGS)) && \
+ $(STAMP) $@
+stmp-build-host-expat: stmp-config-host-expat
+ ($(canadian_env) \
+ $(MAKE) -C ${EXPAT_VERSION}) && $(STAMP) $@
+build-host-expat: stmp_build-host-expat
+ifeq ($(HAVE_EXPAT),no)
+stmp-install-host-expat: stmp-build-host-expat
+ $(MAKE) -C ${EXPAT_VERSION} install -j1 && $(STAMP) $@
+else
+stmp-install-host-expat:
+endif
+install-host-expat: stmp-install-host-expat
+
# target gdb rules
.PHONY: config-target-gdb build-target-gdb install-target-gdb
ifeq ($(GDB_VERSION),gdb-none)
@@ -768,7 +795,11 @@ GDB_CONFIG_ARGS=$(host_baseargs) --prefix=$(prefix) \
--target=$(GDB_TARGET) --host=${cur_host} --build=${cur_build} \
$(WITH_PYTHON) --disable-nls
-GDB_CONFIG_ARGS += --with-expat=no
+# For gdb versions 7.2 and higher, expat is required.
+ifeq ($(GDB_MIN_VERSION_7_2),yes)
+stmp-config-target-gdb: stmp-install-host-expat
+GDB_CONFIG_ARGS += --with-expat --with-libexpat-prefix=$(EXPAT_DIR)
+endif
stmp-config-target-gdb: config.status $(canadian_stmp)
([ -d ${GDB_VERSION} ] || \
diff --git a/README b/README
index 70fdcd3..cad1102 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
This is the top-level of the new Android GNU toolchain. It is designed so
that tools in the GNU toolchain and their different versions can be
-dropped into the Android toolchain easily.
+dropped into the Androind toolchain easily.
1. Supported platforms.
diff --git a/configure b/configure
index 253254c..f35cd7d 100755
--- a/configure
+++ b/configure
@@ -552,6 +552,7 @@ PACKAGE_URL=''
ac_subst_vars='LTLIBOBJS
LIBOBJS
+have_expat
have_cloog
have_isl
have_ppl
@@ -560,6 +561,7 @@ have_mpfr
have_mpc
sysroot
WITH_PYTHON
+EXPAT_VERSION
GDB_MIN_VERSION_7_2
GDB_VERSION
CLOOG_VERSION
@@ -655,6 +657,7 @@ with_ppl_version
with_cloog_version
with_isl_version
with_gdb_version
+with_expat_version
with_python
with_sysroot
with_mpc
@@ -663,6 +666,7 @@ with_gmp
with_ppl
with_cloog
with_isl
+with_expat
'
ac_precious_vars='build_alias
host_alias
@@ -1314,6 +1318,8 @@ Optional Packages:
use isl-VERSION (default is 0.11.1)
--with-gdb-version=VERSION
use gdb-VERSION (default is 6.6)
+ --with-expat-version=VERSION
+ use expat-VERSION (default is 2.0.1)
--with-python=WITH_PYTHON
use python WITH_PYTHON)
--with-sysroot=DIR
@@ -1330,6 +1336,8 @@ Optional Packages:
specify prefix directory for the installed CLooG package.
--with-isl=PATH
specify prefix directory for the installed ISL package.
+ --with-expat=PATH
+ specify prefix directory for the installed EXPAT package.
Report bugs to the package provider.
_ACEOF
@@ -2795,7 +2803,7 @@ if test \( ! -d $srcdir/../$tool/gdb-${GDB_VERSION} \) -a \( x"$version" != x"no
fi
fi
-# Figure out what version of gdb we're building.
+# figure out if we need to build expat for gdb 7.2+
gdb_version_file="${srcdir}/../gdb/gdb-${GDB_VERSION}/gdb/version.in"
if test -f "${gdb_version_file}"; then
GDB_MAJOR=`head -n 1 $gdb_version_file | sed -e "s/[^0-9].*//"`
@@ -2812,6 +2820,49 @@ else
GDB_MIN_VERSION_7_2="yes"
fi
+
+if test "$GDB_MIN_VERSION_7_2" == "yes"; then
+# expat version (default is 2.0.1)
+# expat is only used for gdb version higher than 7.2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking expat version" >&5
+$as_echo_n "checking expat version... " >&6; }
+
+# Check whether --with-expat-version was given.
+if test "${with_expat_version+set}" = set; then :
+ withval=$with_expat_version; if test x"$withval" != x ; then
+ EXPAT_VERSION="$withval"
+ fi
+else
+ EXPAT_VERSION="2.0.1"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPAT_VERSION" >&5
+$as_echo "$EXPAT_VERSION" >&6; }
+x=expat-${EXPAT_VERSION}; tool=$(echo "$x" | sed -e 's/-.*//'); version=$(echo "$x" | sed -e 's/[^-]*-//'); \
+if test \( ! -d $srcdir/../$tool/expat-${EXPAT_VERSION} \) -a \( x"$version" != x"none" \) ; then
+ if test -f $srcdir/../$tool/expat-${EXPAT_VERSION}.tar ; then
+ mkdir -p temp-src && tar -C temp-src -xf $srcdir/../$tool/expat-${EXPAT_VERSION}.tar
+ elif test -f $srcdir/../$tool/expat-${EXPAT_VERSION}.tar.gz ; then
+ mkdir -p temp-src && tar -C temp-src -xzf $srcdir/../$tool/expat-${EXPAT_VERSION}.tar.gz
+ elif test -f $srcdir/../$tool/expat-${EXPAT_VERSION}.tgz ; then
+ mkdir -p temp-src && tar -C temp-src -xzf $srcdir/../$tool/expat-${EXPAT_VERSION}.tgz
+ elif test -f $srcdir/../$tool/expat-${EXPAT_VERSION}.tar.bz2 ; then
+ mkdir -p temp-src && tar -C temp-src -xjf $srcdir/../$tool/expat-${EXPAT_VERSION}.tar.bz2
+ elif test -f $srcdir/../tarballs/expat-${EXPAT_VERSION}.tar ; then
+ mkdir -p temp-src && tar -C temp-src -xf $srcdir/../tarballs/expat-${EXPAT_VERSION}.tar
+ elif test -f $srcdir/../tarballs/expat-${EXPAT_VERSION}.tar.gz ; then
+ mkdir -p temp-src && tar -C temp-src -xzf $srcdir/../tarballs/expat-${EXPAT_VERSION}.tar.gz
+ elif test -f $srcdir/../tarballs/expat-${EXPAT_VERSION}.tgz ; then
+ mkdir -p temp-src && tar -C temp-src -xzf $srcdir/../tarballs/expat-${EXPAT_VERSION}.tgz
+ elif test -f $srcdir/../tarballs/expat-${EXPAT_VERSION}.tar.bz2 ; then
+ mkdir -p temp-src && tar -C temp-src -xjf $srcdir/../tarballs/expat-${EXPAT_VERSION}.tar.bz2
+ else
+ as_fn_error "'package expat-${EXPAT_VERSION} does not exist.'" "$LINENO" 5
+ fi
+fi
+fi
+
+
if test "$GDB_MIN_VERSION_7_2" == "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking with python" >&5
$as_echo_n "checking with python... " >&6; }
@@ -2972,6 +3023,23 @@ fi
+# Specify a location for expat
+
+# Check whether --with-expat was given.
+if test "${with_expat+set}" = set; then :
+ withval=$with_expat; if test -d "$withval" ; then
+ have_expat="$withval"
+ elif test x"$withval" != x"no"; then
+ as_fn_error "invalid value for --with-expat" "$LINENO" 5
+ else
+ have_expat=no
+ fi
+else
+ have_expat=no
+fi
+
+
+
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
diff --git a/configure.ac b/configure.ac
index 00249c9..b316a7e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -525,7 +525,7 @@ AC_MSG_RESULT($GDB_VERSION)
AC_SUBST(GDB_VERSION)
ANDROID_CHECK_PACKAGE(gdb-${GDB_VERSION})
-# Figure out what version of gdb we're building.
+# figure out if we need to build expat for gdb 7.2+
gdb_version_file="${srcdir}/../gdb/gdb-${GDB_VERSION}/gdb/version.in"
if test -f "${gdb_version_file}"; then
GDB_MAJOR=`head -n 1 $gdb_version_file | sed -e "s/[[^0-9]].*//"`
@@ -544,6 +544,22 @@ fi
AC_SUBST(GDB_MIN_VERSION_7_2)
if test "$GDB_MIN_VERSION_7_2" == "yes"; then
+# expat version (default is 2.0.1)
+# expat is only used for gdb version higher than 7.2
+AC_MSG_CHECKING([expat version])
+AC_ARG_WITH([expat-version],
+ [ --with-expat-version=VERSION
+ use expat-VERSION (default is 2.0.1)],
+ [if test x"$withval" != x ; then
+ EXPAT_VERSION="$withval"
+ fi],
+[EXPAT_VERSION="2.0.1"])
+AC_MSG_RESULT($EXPAT_VERSION)
+ANDROID_CHECK_PACKAGE(expat-${EXPAT_VERSION})
+fi
+AC_SUBST(EXPAT_VERSION)
+
+if test "$GDB_MIN_VERSION_7_2" == "yes"; then
AC_MSG_CHECKING([with python])
AC_ARG_WITH([python],
[ --with-python=WITH_PYTHON
@@ -671,4 +687,17 @@ AC_ARG_WITH(isl, [ --with-isl=PATH
[have_isl=no])
AC_SUBST(have_isl)
+# Specify a location for expat
+AC_ARG_WITH(expat, [ --with-expat=PATH
+ specify prefix directory for the installed EXPAT package.],
+ [if test -d "$withval" ; then
+ have_expat="$withval"
+ elif test x"$withval" != x"no"; then
+ AC_MSG_ERROR(invalid value for --with-expat)
+ else
+ have_expat=no
+ fi],
+ [have_expat=no])
+AC_SUBST(have_expat)
+
AC_OUTPUT