summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-04-09 06:52:55 -0600
committerTom Tromey <tromey@adacore.com>2020-04-09 06:52:55 -0600
commitf9d09df0f3552b6f179edeb038844bda40fc7534 (patch)
tree7a857d756a32841ce37e9a5aca79fca6c91491d6 /configure
parent2111d5406a4ec56d6335bde779a995914d0a36d1 (diff)
Merge top-level configury changes from gdb
We recently rearranged the gdb source tree to move a common library and gdbserver to the top-level. This made the build more uniform and also a bit faster (due to sharing of built objects). This patch re-syncs these changes the top-level configury back to gcc. ChangeLog: * configure: Rebuild. * Makefile.in: Rebuild. * Makefile.def (gdbsupport, gdbserver): New host modules. (configure-gdb): Depend on all-gdbsupport. (all-gdb): Depend on all-gdbsupport, all-libctf. * configure.ac (host_tools): Add gdbserver. Conditionally build gdbserver and gdbsupport.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure39
1 files changed, 31 insertions, 8 deletions
diff --git a/configure b/configure
index cc06fa4b263..4f5994bc10e 100755
--- a/configure
+++ b/configure
@@ -2793,7 +2793,7 @@ host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktr
# binutils, gas and ld appear in that order because it makes sense to run
# "make check" in that particular order.
# If --enable-gold is used, "gold" may replace "ld".
-host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools"
+host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools"
# these libraries are built for the target environment, and are built after
# the host libraries and the host tools (which may be a cross compiler)
@@ -3577,6 +3577,25 @@ case "${target}" in
;;
esac
+# Only allow gdbserver on some systems.
+if test -d ${srcdir}/gdbserver; then
+ if test x$enable_gdbserver = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdbserver support" >&5
+$as_echo_n "checking for gdbserver support... " >&6; }
+ if (srcdir=${srcdir}/gdbserver; \
+ . ${srcdir}/configure.srv; \
+ test -n "$UNSUPPORTED")
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ noconfigdirs="$noconfigdirs gdbserver"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ fi
+ fi
+fi
+
# Disable libgo for some systems where it is known to not work.
# For testing, you can easily override this with --enable-libgo.
if test x$enable_libgo = x; then
@@ -7311,13 +7330,17 @@ esac
CONFIGURE_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-configure-/g`
INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
-# gdb depends on gnulib, but as nothing else does, only include it if
-# gdb is built.
-if echo " ${configdirs} " | grep " gdb " > /dev/null 2>&1 ; then
- # The Makefile provides the ordering, so it's enough here to add
- # gnulib to the list.
- configdirs="${configdirs} gnulib"
-fi
+# gdb and gdbserver depend on gnulib and gdbsupport, but as nothing
+# else does, only include them if one of these is built. The Makefile
+# provides the ordering, so it's enough here to add to the list.
+case " ${configdirs} " in
+ *\ gdb\ *)
+ configdirs="${configdirs} gnulib gdbsupport"
+ ;;
+ *\ gdbserver\ *)
+ configdirs="${configdirs} gnulib gdbsupport"
+ ;;
+esac
# Strip out unwanted targets.