Fix gdbserver-without-gdb build
authorTom Tromey <tom@tromey.com>
Mon, 17 Feb 2020 17:00:26 +0000 (10:00 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 17 Feb 2020 17:03:15 +0000 (10:03 -0700)
An earlier patch changed gdbserver to use the already-built top-level
gnulib and gdbsupport.  However, if one did a build that did not
include gdb, then gdbserver would fail to build.

The problem is that configure.ac only adds gnulib and gdbsupport to
the build when gdb is being built.  This patch fixes the problem by
arranging for this to happen when gdbserver is built.

ChangeLog
2020-02-17  Tom Tromey  <tom@tromey.com>

* configure: Rebuild.
* configure.ac (configdirs): Add gnulib and gdbsupport when building
gdbserver.

ChangeLog
configure
configure.ac

index 7f6486f41186abe53e84ab56eba7b71cc520ae01..880ffdd70c96c91dd28243f9824cfafde3b3fb6b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-02-17  Tom Tromey  <tom@tromey.com>
+
+       * configure: Rebuild.
+       * configure.ac (configdirs): Add gnulib and gdbsupport when building
+       gdbserver.
+
 2020-02-14  Tom Tromey  <tom@tromey.com>
 
        * Makefile.in: Rebuild.
index 8a3e7026f0b4cbc40ea2555fe28cca420cad6466..1c5403e9e4d327c849998bd9abaa2a75f4390c8c 100755 (executable)
--- a/configure
+++ b/configure
@@ -7360,13 +7360,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 and gdbsupport, but as nothing else does, only
-# include them 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 to
-  # the list.
-  configdirs="${configdirs} gnulib gdbsupport"
-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.
 
index 35a9c1867d2586aa327219d3a182dcca275e908e..f3065091c26413a3a120dbf6a1492554ac142084 100644 (file)
@@ -2746,13 +2746,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 and gdbsupport, but as nothing else does, only
-# include them 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 to
-  # the list.
-  configdirs="${configdirs} gnulib gdbsupport"
-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.
 
This page took 0.034717 seconds and 4 git commands to generate.