diff options
author | Ray Donnelly <mingw.android@gmail.com> | 2013-05-03 00:02:41 +0100 |
---|---|---|
committer | Ray Donnelly <mingw.android@gmail.com> | 2013-05-03 00:03:31 +0100 |
commit | 3fdfa3f86a74ca11eca186fae0ca4fca62a16a49 (patch) | |
tree | 5c4abec27df61ea6a621fd73ad4c37a51ecde133 | |
parent | 0bb27f14f47a27266b3e9a809b128a2ffa44cda4 (diff) | |
download | build-3fdfa3f86a74ca11eca186fae0ca4fca62a16a49.tar.gz |
Python GDB intergration work for the build system.
Adds a --with-python=</path/to/python-config.sh> option.
-rw-r--r-- | Makefile.in | 12 | ||||
-rwxr-xr-x | configure | 22 | ||||
-rw-r--r-- | configure.ac | 13 |
3 files changed, 41 insertions, 6 deletions
diff --git a/Makefile.in b/Makefile.in index 43fe553..1aefec0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -84,6 +84,7 @@ 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@ HAVE_GMP=@have_gmp@ @@ -127,6 +128,10 @@ ifeq ($(HAVE_EXPAT),no) EXPAT_DIR=$(TEMP_INSTALLDIR) endif +ifneq ($(WITH_PYTHON),) + WITH_PYTHON:=--with-python=$(WITH_PYTHON) +endif + # Figure out where to find the ld binary. FIND_TARGET_LD=\ `[ -d $(TARGET_BINUTILS_BUILDDIR)/gold ] && echo "gold" || echo "ld"` @@ -810,7 +815,7 @@ config-target-gdb: stmp-config-target-gdb GDB_CONFIG_ARGS=$(host_baseargs) --prefix=$(prefix) \ --target=$(GDB_TARGET) --host=${cur_host} --build=${cur_build} \ - --disable-nls + $(WITH_PYTHON) --disable-nls # For gdb versions 7.2 and higher, expat is required. ifeq ($(GDB_MIN_VERSION_7_2),yes) @@ -818,11 +823,6 @@ stmp-config-target-gdb: stmp-install-host-expat GDB_CONFIG_ARGS += --with-expat --with-libexpat-prefix=$(EXPAT_DIR) endif -# For gdb 7.x, disable python support for now -ifeq ($(filter gdb-6.%,$(GDB_VERSION)),) -GDB_CONFIG_ARGS += --with-python=no -endif - stmp-config-target-gdb: config.status $(canadian_stmp) ([ -d ${GDB_VERSION} ] || \ mkdir ${GDB_VERSION}) && \ @@ -560,6 +560,7 @@ have_gmp have_mpfr have_mpc sysroot +WITH_PYTHON EXPAT_VERSION GDB_MIN_VERSION_7_2 GDB_VERSION @@ -657,6 +658,7 @@ with_cloog_version with_isl_version with_gdb_version with_expat_version +with_python with_sysroot with_mpc with_mpfr @@ -1318,6 +1320,8 @@ Optional Packages: 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 use target sysroot in DIR --with-mpc=PATH @@ -2852,6 +2856,24 @@ 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; } + +# Check whether --with-python was given. +if test "${with_python+set}" = set; then : + withval=$with_python; if test x"$withval" != x ; then + WITH_PYTHON="$withval" + fi +else + WITH_PYTHON="" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $WITH_PYTHON" >&5 +$as_echo "$WITH_PYTHON" >&6; } +fi + + # For certain targets, with gdb 7.2+, the proper gdb target is # arm-linux-android. if test "$GDB_MIN_VERSION_7_2" == "yes"; then diff --git a/configure.ac b/configure.ac index 99e353a..b316a7e 100644 --- a/configure.ac +++ b/configure.ac @@ -559,6 +559,19 @@ 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 + use python WITH_PYTHON)], + [if test x"$withval" != x ; then + WITH_PYTHON="$withval" + fi], +[WITH_PYTHON=""]) +AC_MSG_RESULT($WITH_PYTHON) +fi +AC_SUBST(WITH_PYTHON) + # For certain targets, with gdb 7.2+, the proper gdb target is # arm-linux-android. if test "$GDB_MIN_VERSION_7_2" == "yes"; then |