Merge top-level configury changes from gdb
authorTom Tromey <tom@tromey.com>
Thu, 9 Apr 2020 12:52:55 +0000 (06:52 -0600)
committerTom Tromey <tromey@adacore.com>
Thu, 9 Apr 2020 12:52:55 +0000 (06:52 -0600)
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.

ChangeLog
Makefile.def
Makefile.in
configure
configure.ac

index ba0b25fa41701fffe93f3dab219b7ce0f1e079fc..c8503a90bd0de81a6f8b9d65a224106956d4068f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2020-04-09  Tom Tromey  <tom@tromey.com>
+
+       * 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.
+
 2020-03-09  Tobias Burnus  <tobias@codesourcery.com>
 
        * configure.ac: Build libgomp by default for amdgcn.
index 493a31e03594031d88f76fba13cda0d09d92f94b..36fd26b03670236d8f5169436ea4df96907fd367 100644 (file)
@@ -113,6 +113,8 @@ host_modules= { module= zlib; no_install=true; no_check=true;
                bootstrap=true;
                extra_configure_flags='@extra_host_zlib_configure_flags@';};
 host_modules= { module= gnulib; };
+host_modules= { module= gdbsupport; };
+host_modules= { module= gdbserver; };
 host_modules= { module= gdb; };
 host_modules= { module= expect; };
 host_modules= { module= guile; };
@@ -394,18 +396,27 @@ dependencies = { module=configure-gdb; on=all-intl; };
 dependencies = { module=configure-gdb; on=configure-sim; };
 dependencies = { module=configure-gdb; on=all-bfd; };
 dependencies = { module=configure-gdb; on=all-gnulib; };
+dependencies = { module=configure-gdb; on=all-gdbsupport; };
 // Depend on all-libiconv so that configure checks for iconv
 // functions will work.
 dependencies = { module=configure-gdb; on=all-libiconv; };
 dependencies = { module=all-gdb; on=all-libiberty; };
 dependencies = { module=all-gdb; on=all-libiconv; };
 dependencies = { module=all-gdb; on=all-gnulib; };
+dependencies = { module=all-gdb; on=all-gdbsupport; };
 dependencies = { module=all-gdb; on=all-opcodes; };
 dependencies = { module=all-gdb; on=all-readline; };
 dependencies = { module=all-gdb; on=all-build-bison; };
 dependencies = { module=all-gdb; on=all-sim; };
 dependencies = { module=all-gdb; on=all-libdecnumber; };
 dependencies = { module=all-gdb; on=all-libtermcap; };
+dependencies = { module=all-gdb; on=all-libctf; };
+
+// Host modules specific to gdbserver.
+dependencies = { module=configure-gdbserver; on=all-gnulib; };
+dependencies = { module=all-gdbserver; on=all-gdbsupport; };
+dependencies = { module=all-gdbserver; on=all-gnulib; };
+dependencies = { module=all-gdbserver; on=all-libiberty; };
 
 dependencies = { module=configure-libgui; on=configure-tcl; };
 dependencies = { module=configure-libgui; on=configure-tk; };
@@ -413,6 +424,11 @@ dependencies = { module=all-libgui; on=all-tcl; };
 dependencies = { module=all-libgui; on=all-tk; };
 dependencies = { module=all-libgui; on=all-itcl; };
 
+dependencies = { module=configure-gdbsupport; on=configure-gnulib; };
+dependencies = { module=configure-gdbsupport; on=configure-intl; };
+dependencies = { module=all-gdbsupport; on=all-gnulib; };
+dependencies = { module=all-gdbsupport; on=all-intl; };
+
 // Host modules specific to binutils.
 dependencies = { module=configure-bfd; on=configure-libiberty; hard=true; };
 dependencies = { module=configure-bfd; on=configure-intl; };
index 86c0c6d5b2d2cf16f203ac5c39ec272f74d5b803..36e369df6e7e2fb01e3e2adcf863faa08cc15ce4 100644 (file)
@@ -1029,6 +1029,8 @@ configure-host:  \
     maybe-configure-texinfo \
     maybe-configure-zlib \
     maybe-configure-gnulib \
+    maybe-configure-gdbsupport \
+    maybe-configure-gdbserver \
     maybe-configure-gdb \
     maybe-configure-expect \
     maybe-configure-guile \
@@ -1183,6 +1185,8 @@ all-host: maybe-all-texinfo
 all-host: maybe-all-zlib
 @endif zlib-no-bootstrap
 all-host: maybe-all-gnulib
+all-host: maybe-all-gdbsupport
+all-host: maybe-all-gdbserver
 all-host: maybe-all-gdb
 all-host: maybe-all-expect
 all-host: maybe-all-guile
@@ -1289,6 +1293,8 @@ info-host: maybe-info-sim
 info-host: maybe-info-texinfo
 info-host: maybe-info-zlib
 info-host: maybe-info-gnulib
+info-host: maybe-info-gdbsupport
+info-host: maybe-info-gdbserver
 info-host: maybe-info-gdb
 info-host: maybe-info-expect
 info-host: maybe-info-guile
@@ -1376,6 +1382,8 @@ dvi-host: maybe-dvi-sim
 dvi-host: maybe-dvi-texinfo
 dvi-host: maybe-dvi-zlib
 dvi-host: maybe-dvi-gnulib
+dvi-host: maybe-dvi-gdbsupport
+dvi-host: maybe-dvi-gdbserver
 dvi-host: maybe-dvi-gdb
 dvi-host: maybe-dvi-expect
 dvi-host: maybe-dvi-guile
@@ -1463,6 +1471,8 @@ pdf-host: maybe-pdf-sim
 pdf-host: maybe-pdf-texinfo
 pdf-host: maybe-pdf-zlib
 pdf-host: maybe-pdf-gnulib
+pdf-host: maybe-pdf-gdbsupport
+pdf-host: maybe-pdf-gdbserver
 pdf-host: maybe-pdf-gdb
 pdf-host: maybe-pdf-expect
 pdf-host: maybe-pdf-guile
@@ -1550,6 +1560,8 @@ html-host: maybe-html-sim
 html-host: maybe-html-texinfo
 html-host: maybe-html-zlib
 html-host: maybe-html-gnulib
+html-host: maybe-html-gdbsupport
+html-host: maybe-html-gdbserver
 html-host: maybe-html-gdb
 html-host: maybe-html-expect
 html-host: maybe-html-guile
@@ -1637,6 +1649,8 @@ TAGS-host: maybe-TAGS-sim
 TAGS-host: maybe-TAGS-texinfo
 TAGS-host: maybe-TAGS-zlib
 TAGS-host: maybe-TAGS-gnulib
+TAGS-host: maybe-TAGS-gdbsupport
+TAGS-host: maybe-TAGS-gdbserver
 TAGS-host: maybe-TAGS-gdb
 TAGS-host: maybe-TAGS-expect
 TAGS-host: maybe-TAGS-guile
@@ -1724,6 +1738,8 @@ install-info-host: maybe-install-info-sim
 install-info-host: maybe-install-info-texinfo
 install-info-host: maybe-install-info-zlib
 install-info-host: maybe-install-info-gnulib
+install-info-host: maybe-install-info-gdbsupport
+install-info-host: maybe-install-info-gdbserver
 install-info-host: maybe-install-info-gdb
 install-info-host: maybe-install-info-expect
 install-info-host: maybe-install-info-guile
@@ -1811,6 +1827,8 @@ install-pdf-host: maybe-install-pdf-sim
 install-pdf-host: maybe-install-pdf-texinfo
 install-pdf-host: maybe-install-pdf-zlib
 install-pdf-host: maybe-install-pdf-gnulib
+install-pdf-host: maybe-install-pdf-gdbsupport
+install-pdf-host: maybe-install-pdf-gdbserver
 install-pdf-host: maybe-install-pdf-gdb
 install-pdf-host: maybe-install-pdf-expect
 install-pdf-host: maybe-install-pdf-guile
@@ -1898,6 +1916,8 @@ install-html-host: maybe-install-html-sim
 install-html-host: maybe-install-html-texinfo
 install-html-host: maybe-install-html-zlib
 install-html-host: maybe-install-html-gnulib
+install-html-host: maybe-install-html-gdbsupport
+install-html-host: maybe-install-html-gdbserver
 install-html-host: maybe-install-html-gdb
 install-html-host: maybe-install-html-expect
 install-html-host: maybe-install-html-guile
@@ -1985,6 +2005,8 @@ installcheck-host: maybe-installcheck-sim
 installcheck-host: maybe-installcheck-texinfo
 installcheck-host: maybe-installcheck-zlib
 installcheck-host: maybe-installcheck-gnulib
+installcheck-host: maybe-installcheck-gdbsupport
+installcheck-host: maybe-installcheck-gdbserver
 installcheck-host: maybe-installcheck-gdb
 installcheck-host: maybe-installcheck-expect
 installcheck-host: maybe-installcheck-guile
@@ -2072,6 +2094,8 @@ mostlyclean-host: maybe-mostlyclean-sim
 mostlyclean-host: maybe-mostlyclean-texinfo
 mostlyclean-host: maybe-mostlyclean-zlib
 mostlyclean-host: maybe-mostlyclean-gnulib
+mostlyclean-host: maybe-mostlyclean-gdbsupport
+mostlyclean-host: maybe-mostlyclean-gdbserver
 mostlyclean-host: maybe-mostlyclean-gdb
 mostlyclean-host: maybe-mostlyclean-expect
 mostlyclean-host: maybe-mostlyclean-guile
@@ -2159,6 +2183,8 @@ clean-host: maybe-clean-sim
 clean-host: maybe-clean-texinfo
 clean-host: maybe-clean-zlib
 clean-host: maybe-clean-gnulib
+clean-host: maybe-clean-gdbsupport
+clean-host: maybe-clean-gdbserver
 clean-host: maybe-clean-gdb
 clean-host: maybe-clean-expect
 clean-host: maybe-clean-guile
@@ -2246,6 +2272,8 @@ distclean-host: maybe-distclean-sim
 distclean-host: maybe-distclean-texinfo
 distclean-host: maybe-distclean-zlib
 distclean-host: maybe-distclean-gnulib
+distclean-host: maybe-distclean-gdbsupport
+distclean-host: maybe-distclean-gdbserver
 distclean-host: maybe-distclean-gdb
 distclean-host: maybe-distclean-expect
 distclean-host: maybe-distclean-guile
@@ -2333,6 +2361,8 @@ maintainer-clean-host: maybe-maintainer-clean-sim
 maintainer-clean-host: maybe-maintainer-clean-texinfo
 maintainer-clean-host: maybe-maintainer-clean-zlib
 maintainer-clean-host: maybe-maintainer-clean-gnulib
+maintainer-clean-host: maybe-maintainer-clean-gdbsupport
+maintainer-clean-host: maybe-maintainer-clean-gdbserver
 maintainer-clean-host: maybe-maintainer-clean-gdb
 maintainer-clean-host: maybe-maintainer-clean-expect
 maintainer-clean-host: maybe-maintainer-clean-guile
@@ -2476,6 +2506,8 @@ check-host:  \
     maybe-check-texinfo \
     maybe-check-zlib \
     maybe-check-gnulib \
+    maybe-check-gdbsupport \
+    maybe-check-gdbserver \
     maybe-check-gdb \
     maybe-check-expect \
     maybe-check-guile \
@@ -2610,6 +2642,8 @@ install-host-nogcc:  \
     maybe-install-texinfo \
     maybe-install-zlib \
     maybe-install-gnulib \
+    maybe-install-gdbsupport \
+    maybe-install-gdbserver \
     maybe-install-gdb \
     maybe-install-expect \
     maybe-install-guile \
@@ -2661,6 +2695,8 @@ install-host:  \
     maybe-install-texinfo \
     maybe-install-zlib \
     maybe-install-gnulib \
+    maybe-install-gdbsupport \
+    maybe-install-gdbserver \
     maybe-install-gdb \
     maybe-install-expect \
     maybe-install-guile \
@@ -2768,6 +2804,8 @@ install-strip-host:  \
     maybe-install-strip-texinfo \
     maybe-install-strip-zlib \
     maybe-install-strip-gnulib \
+    maybe-install-strip-gdbsupport \
+    maybe-install-strip-gdbserver \
     maybe-install-strip-gdb \
     maybe-install-strip-expect \
     maybe-install-strip-guile \
@@ -33570,6 +33608,888 @@ maintainer-clean-gnulib:
 
 
 
+.PHONY: configure-gdbsupport maybe-configure-gdbsupport
+maybe-configure-gdbsupport:
+@if gcc-bootstrap
+configure-gdbsupport: stage_current
+@endif gcc-bootstrap
+@if gdbsupport
+maybe-configure-gdbsupport: configure-gdbsupport
+configure-gdbsupport: 
+       @: $(MAKE); $(unstage)
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/gdbsupport/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gdbsupport; \
+       $(HOST_EXPORTS)  \
+       echo Configuring in $(HOST_SUBDIR)/gdbsupport; \
+       cd "$(HOST_SUBDIR)/gdbsupport" || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gdbsupport/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       module_srcdir=gdbsupport; \
+       $(SHELL) \
+         $$s/$$module_srcdir/configure \
+         --srcdir=$${topdir}/$$module_srcdir \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+         --target=${target_alias}  \
+         || exit 1
+@endif gdbsupport
+
+
+
+
+
+.PHONY: all-gdbsupport maybe-all-gdbsupport
+maybe-all-gdbsupport:
+@if gcc-bootstrap
+all-gdbsupport: stage_current
+@endif gcc-bootstrap
+@if gdbsupport
+TARGET-gdbsupport=all
+maybe-all-gdbsupport: all-gdbsupport
+all-gdbsupport: configure-gdbsupport
+       @: $(MAKE); $(unstage)
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS)  \
+       (cd $(HOST_SUBDIR)/gdbsupport && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS)  \
+               $(TARGET-gdbsupport))
+@endif gdbsupport
+
+
+
+
+.PHONY: check-gdbsupport maybe-check-gdbsupport
+maybe-check-gdbsupport:
+@if gdbsupport
+maybe-check-gdbsupport: check-gdbsupport
+
+check-gdbsupport:
+       @: $(MAKE); $(unstage)
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS)  \
+       (cd $(HOST_SUBDIR)/gdbsupport && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
+
+@endif gdbsupport
+
+.PHONY: install-gdbsupport maybe-install-gdbsupport
+maybe-install-gdbsupport:
+@if gdbsupport
+maybe-install-gdbsupport: install-gdbsupport
+
+install-gdbsupport: installdirs
+       @: $(MAKE); $(unstage)
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       (cd $(HOST_SUBDIR)/gdbsupport && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
+
+@endif gdbsupport
+
+.PHONY: install-strip-gdbsupport maybe-install-strip-gdbsupport
+maybe-install-strip-gdbsupport:
+@if gdbsupport
+maybe-install-strip-gdbsupport: install-strip-gdbsupport
+
+install-strip-gdbsupport: installdirs
+       @: $(MAKE); $(unstage)
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       (cd $(HOST_SUBDIR)/gdbsupport && \
+         $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif gdbsupport
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-gdbsupport info-gdbsupport
+maybe-info-gdbsupport:
+@if gdbsupport
+maybe-info-gdbsupport: info-gdbsupport
+
+info-gdbsupport: \
+    configure-gdbsupport 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbsupport/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing info in gdbsupport"; \
+       (cd $(HOST_SUBDIR)/gdbsupport && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 info) \
+         || exit 1
+
+@endif gdbsupport
+
+.PHONY: maybe-dvi-gdbsupport dvi-gdbsupport
+maybe-dvi-gdbsupport:
+@if gdbsupport
+maybe-dvi-gdbsupport: dvi-gdbsupport
+
+dvi-gdbsupport: \
+    configure-gdbsupport 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbsupport/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing dvi in gdbsupport"; \
+       (cd $(HOST_SUBDIR)/gdbsupport && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 dvi) \
+         || exit 1
+
+@endif gdbsupport
+
+.PHONY: maybe-pdf-gdbsupport pdf-gdbsupport
+maybe-pdf-gdbsupport:
+@if gdbsupport
+maybe-pdf-gdbsupport: pdf-gdbsupport
+
+pdf-gdbsupport: \
+    configure-gdbsupport 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbsupport/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing pdf in gdbsupport"; \
+       (cd $(HOST_SUBDIR)/gdbsupport && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 pdf) \
+         || exit 1
+
+@endif gdbsupport
+
+.PHONY: maybe-html-gdbsupport html-gdbsupport
+maybe-html-gdbsupport:
+@if gdbsupport
+maybe-html-gdbsupport: html-gdbsupport
+
+html-gdbsupport: \
+    configure-gdbsupport 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbsupport/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in gdbsupport"; \
+       (cd $(HOST_SUBDIR)/gdbsupport && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 html) \
+         || exit 1
+
+@endif gdbsupport
+
+.PHONY: maybe-TAGS-gdbsupport TAGS-gdbsupport
+maybe-TAGS-gdbsupport:
+@if gdbsupport
+maybe-TAGS-gdbsupport: TAGS-gdbsupport
+
+TAGS-gdbsupport: \
+    configure-gdbsupport 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbsupport/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing TAGS in gdbsupport"; \
+       (cd $(HOST_SUBDIR)/gdbsupport && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 TAGS) \
+         || exit 1
+
+@endif gdbsupport
+
+.PHONY: maybe-install-info-gdbsupport install-info-gdbsupport
+maybe-install-info-gdbsupport:
+@if gdbsupport
+maybe-install-info-gdbsupport: install-info-gdbsupport
+
+install-info-gdbsupport: \
+    configure-gdbsupport \
+    info-gdbsupport 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbsupport/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing install-info in gdbsupport"; \
+       (cd $(HOST_SUBDIR)/gdbsupport && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 install-info) \
+         || exit 1
+
+@endif gdbsupport
+
+.PHONY: maybe-install-pdf-gdbsupport install-pdf-gdbsupport
+maybe-install-pdf-gdbsupport:
+@if gdbsupport
+maybe-install-pdf-gdbsupport: install-pdf-gdbsupport
+
+install-pdf-gdbsupport: \
+    configure-gdbsupport \
+    pdf-gdbsupport 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbsupport/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing install-pdf in gdbsupport"; \
+       (cd $(HOST_SUBDIR)/gdbsupport && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 install-pdf) \
+         || exit 1
+
+@endif gdbsupport
+
+.PHONY: maybe-install-html-gdbsupport install-html-gdbsupport
+maybe-install-html-gdbsupport:
+@if gdbsupport
+maybe-install-html-gdbsupport: install-html-gdbsupport
+
+install-html-gdbsupport: \
+    configure-gdbsupport \
+    html-gdbsupport 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbsupport/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing install-html in gdbsupport"; \
+       (cd $(HOST_SUBDIR)/gdbsupport && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 install-html) \
+         || exit 1
+
+@endif gdbsupport
+
+.PHONY: maybe-installcheck-gdbsupport installcheck-gdbsupport
+maybe-installcheck-gdbsupport:
+@if gdbsupport
+maybe-installcheck-gdbsupport: installcheck-gdbsupport
+
+installcheck-gdbsupport: \
+    configure-gdbsupport 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbsupport/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing installcheck in gdbsupport"; \
+       (cd $(HOST_SUBDIR)/gdbsupport && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 installcheck) \
+         || exit 1
+
+@endif gdbsupport
+
+.PHONY: maybe-mostlyclean-gdbsupport mostlyclean-gdbsupport
+maybe-mostlyclean-gdbsupport:
+@if gdbsupport
+maybe-mostlyclean-gdbsupport: mostlyclean-gdbsupport
+
+mostlyclean-gdbsupport: 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbsupport/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing mostlyclean in gdbsupport"; \
+       (cd $(HOST_SUBDIR)/gdbsupport && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 mostlyclean) \
+         || exit 1
+
+@endif gdbsupport
+
+.PHONY: maybe-clean-gdbsupport clean-gdbsupport
+maybe-clean-gdbsupport:
+@if gdbsupport
+maybe-clean-gdbsupport: clean-gdbsupport
+
+clean-gdbsupport: 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbsupport/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing clean in gdbsupport"; \
+       (cd $(HOST_SUBDIR)/gdbsupport && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 clean) \
+         || exit 1
+
+@endif gdbsupport
+
+.PHONY: maybe-distclean-gdbsupport distclean-gdbsupport
+maybe-distclean-gdbsupport:
+@if gdbsupport
+maybe-distclean-gdbsupport: distclean-gdbsupport
+
+distclean-gdbsupport: 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbsupport/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing distclean in gdbsupport"; \
+       (cd $(HOST_SUBDIR)/gdbsupport && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 distclean) \
+         || exit 1
+
+@endif gdbsupport
+
+.PHONY: maybe-maintainer-clean-gdbsupport maintainer-clean-gdbsupport
+maybe-maintainer-clean-gdbsupport:
+@if gdbsupport
+maybe-maintainer-clean-gdbsupport: maintainer-clean-gdbsupport
+
+maintainer-clean-gdbsupport: 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbsupport/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing maintainer-clean in gdbsupport"; \
+       (cd $(HOST_SUBDIR)/gdbsupport && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 maintainer-clean) \
+         || exit 1
+
+@endif gdbsupport
+
+
+
+.PHONY: configure-gdbserver maybe-configure-gdbserver
+maybe-configure-gdbserver:
+@if gcc-bootstrap
+configure-gdbserver: stage_current
+@endif gcc-bootstrap
+@if gdbserver
+maybe-configure-gdbserver: configure-gdbserver
+configure-gdbserver: 
+       @: $(MAKE); $(unstage)
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/gdbserver/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gdbserver; \
+       $(HOST_EXPORTS)  \
+       echo Configuring in $(HOST_SUBDIR)/gdbserver; \
+       cd "$(HOST_SUBDIR)/gdbserver" || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gdbserver/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       module_srcdir=gdbserver; \
+       $(SHELL) \
+         $$s/$$module_srcdir/configure \
+         --srcdir=$${topdir}/$$module_srcdir \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+         --target=${target_alias}  \
+         || exit 1
+@endif gdbserver
+
+
+
+
+
+.PHONY: all-gdbserver maybe-all-gdbserver
+maybe-all-gdbserver:
+@if gcc-bootstrap
+all-gdbserver: stage_current
+@endif gcc-bootstrap
+@if gdbserver
+TARGET-gdbserver=all
+maybe-all-gdbserver: all-gdbserver
+all-gdbserver: configure-gdbserver
+       @: $(MAKE); $(unstage)
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS)  \
+       (cd $(HOST_SUBDIR)/gdbserver && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS)  \
+               $(TARGET-gdbserver))
+@endif gdbserver
+
+
+
+
+.PHONY: check-gdbserver maybe-check-gdbserver
+maybe-check-gdbserver:
+@if gdbserver
+maybe-check-gdbserver: check-gdbserver
+
+check-gdbserver:
+       @: $(MAKE); $(unstage)
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS)  \
+       (cd $(HOST_SUBDIR)/gdbserver && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
+
+@endif gdbserver
+
+.PHONY: install-gdbserver maybe-install-gdbserver
+maybe-install-gdbserver:
+@if gdbserver
+maybe-install-gdbserver: install-gdbserver
+
+install-gdbserver: installdirs
+       @: $(MAKE); $(unstage)
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       (cd $(HOST_SUBDIR)/gdbserver && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
+
+@endif gdbserver
+
+.PHONY: install-strip-gdbserver maybe-install-strip-gdbserver
+maybe-install-strip-gdbserver:
+@if gdbserver
+maybe-install-strip-gdbserver: install-strip-gdbserver
+
+install-strip-gdbserver: installdirs
+       @: $(MAKE); $(unstage)
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       (cd $(HOST_SUBDIR)/gdbserver && \
+         $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif gdbserver
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-gdbserver info-gdbserver
+maybe-info-gdbserver:
+@if gdbserver
+maybe-info-gdbserver: info-gdbserver
+
+info-gdbserver: \
+    configure-gdbserver 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbserver/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing info in gdbserver"; \
+       (cd $(HOST_SUBDIR)/gdbserver && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 info) \
+         || exit 1
+
+@endif gdbserver
+
+.PHONY: maybe-dvi-gdbserver dvi-gdbserver
+maybe-dvi-gdbserver:
+@if gdbserver
+maybe-dvi-gdbserver: dvi-gdbserver
+
+dvi-gdbserver: \
+    configure-gdbserver 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbserver/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing dvi in gdbserver"; \
+       (cd $(HOST_SUBDIR)/gdbserver && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 dvi) \
+         || exit 1
+
+@endif gdbserver
+
+.PHONY: maybe-pdf-gdbserver pdf-gdbserver
+maybe-pdf-gdbserver:
+@if gdbserver
+maybe-pdf-gdbserver: pdf-gdbserver
+
+pdf-gdbserver: \
+    configure-gdbserver 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbserver/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing pdf in gdbserver"; \
+       (cd $(HOST_SUBDIR)/gdbserver && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 pdf) \
+         || exit 1
+
+@endif gdbserver
+
+.PHONY: maybe-html-gdbserver html-gdbserver
+maybe-html-gdbserver:
+@if gdbserver
+maybe-html-gdbserver: html-gdbserver
+
+html-gdbserver: \
+    configure-gdbserver 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbserver/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in gdbserver"; \
+       (cd $(HOST_SUBDIR)/gdbserver && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 html) \
+         || exit 1
+
+@endif gdbserver
+
+.PHONY: maybe-TAGS-gdbserver TAGS-gdbserver
+maybe-TAGS-gdbserver:
+@if gdbserver
+maybe-TAGS-gdbserver: TAGS-gdbserver
+
+TAGS-gdbserver: \
+    configure-gdbserver 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbserver/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing TAGS in gdbserver"; \
+       (cd $(HOST_SUBDIR)/gdbserver && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 TAGS) \
+         || exit 1
+
+@endif gdbserver
+
+.PHONY: maybe-install-info-gdbserver install-info-gdbserver
+maybe-install-info-gdbserver:
+@if gdbserver
+maybe-install-info-gdbserver: install-info-gdbserver
+
+install-info-gdbserver: \
+    configure-gdbserver \
+    info-gdbserver 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbserver/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing install-info in gdbserver"; \
+       (cd $(HOST_SUBDIR)/gdbserver && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 install-info) \
+         || exit 1
+
+@endif gdbserver
+
+.PHONY: maybe-install-pdf-gdbserver install-pdf-gdbserver
+maybe-install-pdf-gdbserver:
+@if gdbserver
+maybe-install-pdf-gdbserver: install-pdf-gdbserver
+
+install-pdf-gdbserver: \
+    configure-gdbserver \
+    pdf-gdbserver 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbserver/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing install-pdf in gdbserver"; \
+       (cd $(HOST_SUBDIR)/gdbserver && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 install-pdf) \
+         || exit 1
+
+@endif gdbserver
+
+.PHONY: maybe-install-html-gdbserver install-html-gdbserver
+maybe-install-html-gdbserver:
+@if gdbserver
+maybe-install-html-gdbserver: install-html-gdbserver
+
+install-html-gdbserver: \
+    configure-gdbserver \
+    html-gdbserver 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbserver/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing install-html in gdbserver"; \
+       (cd $(HOST_SUBDIR)/gdbserver && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 install-html) \
+         || exit 1
+
+@endif gdbserver
+
+.PHONY: maybe-installcheck-gdbserver installcheck-gdbserver
+maybe-installcheck-gdbserver:
+@if gdbserver
+maybe-installcheck-gdbserver: installcheck-gdbserver
+
+installcheck-gdbserver: \
+    configure-gdbserver 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbserver/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing installcheck in gdbserver"; \
+       (cd $(HOST_SUBDIR)/gdbserver && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 installcheck) \
+         || exit 1
+
+@endif gdbserver
+
+.PHONY: maybe-mostlyclean-gdbserver mostlyclean-gdbserver
+maybe-mostlyclean-gdbserver:
+@if gdbserver
+maybe-mostlyclean-gdbserver: mostlyclean-gdbserver
+
+mostlyclean-gdbserver: 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbserver/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing mostlyclean in gdbserver"; \
+       (cd $(HOST_SUBDIR)/gdbserver && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 mostlyclean) \
+         || exit 1
+
+@endif gdbserver
+
+.PHONY: maybe-clean-gdbserver clean-gdbserver
+maybe-clean-gdbserver:
+@if gdbserver
+maybe-clean-gdbserver: clean-gdbserver
+
+clean-gdbserver: 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbserver/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing clean in gdbserver"; \
+       (cd $(HOST_SUBDIR)/gdbserver && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 clean) \
+         || exit 1
+
+@endif gdbserver
+
+.PHONY: maybe-distclean-gdbserver distclean-gdbserver
+maybe-distclean-gdbserver:
+@if gdbserver
+maybe-distclean-gdbserver: distclean-gdbserver
+
+distclean-gdbserver: 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbserver/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing distclean in gdbserver"; \
+       (cd $(HOST_SUBDIR)/gdbserver && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 distclean) \
+         || exit 1
+
+@endif gdbserver
+
+.PHONY: maybe-maintainer-clean-gdbserver maintainer-clean-gdbserver
+maybe-maintainer-clean-gdbserver:
+@if gdbserver
+maybe-maintainer-clean-gdbserver: maintainer-clean-gdbserver
+
+maintainer-clean-gdbserver: 
+       @: $(MAKE); $(unstage)
+       @[ -f ./gdbserver/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing maintainer-clean in gdbserver"; \
+       (cd $(HOST_SUBDIR)/gdbserver && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 maintainer-clean) \
+         || exit 1
+
+@endif gdbserver
+
+
+
 .PHONY: configure-gdb maybe-configure-gdb
 maybe-configure-gdb:
 @if gcc-bootstrap
@@ -58503,16 +59423,23 @@ all-stageautoprofile-intl: maybe-all-stageautoprofile-libiconv
 all-stageautofeedback-intl: maybe-all-stageautofeedback-libiconv
 configure-gdb: maybe-configure-sim
 configure-gdb: maybe-all-gnulib
+configure-gdb: maybe-all-gdbsupport
 all-gdb: maybe-all-gnulib
+all-gdb: maybe-all-gdbsupport
 all-gdb: maybe-all-readline
 all-gdb: maybe-all-build-bison
 all-gdb: maybe-all-sim
 all-gdb: maybe-all-libtermcap
+configure-gdbserver: maybe-all-gnulib
+all-gdbserver: maybe-all-gdbsupport
+all-gdbserver: maybe-all-gnulib
 configure-libgui: maybe-configure-tcl
 configure-libgui: maybe-configure-tk
 all-libgui: maybe-all-tcl
 all-libgui: maybe-all-tk
 all-libgui: maybe-all-itcl
+configure-gdbsupport: maybe-configure-gnulib
+all-gdbsupport: maybe-all-gnulib
 configure-bfd: configure-libiberty
 configure-stage1-bfd: configure-stage1-libiberty
 configure-stage2-bfd: configure-stage2-libiberty
@@ -59113,6 +60040,8 @@ configure-gnattools: stage_last
 configure-libcc1: stage_last
 configure-utils: stage_last
 configure-gdb: stage_last
+configure-gdbserver: stage_last
+configure-gdbsupport: stage_last
 configure-gprof: stage_last
 configure-sid: stage_last
 configure-sim: stage_last
@@ -59134,6 +60063,10 @@ all-gdb: maybe-all-libiberty
 all-gdb: maybe-all-libiconv
 all-gdb: maybe-all-opcodes
 all-gdb: maybe-all-libdecnumber
+all-gdb: maybe-all-libctf
+all-gdbserver: maybe-all-libiberty
+configure-gdbsupport: maybe-configure-intl
+all-gdbsupport: maybe-all-intl
 configure-gprof: maybe-configure-intl
 all-gprof: maybe-all-libiberty
 all-gprof: maybe-all-bfd
index cc06fa4b263508b02bcdfd53eb0e2afcebc5951c..4f5994bc10ee488e48cc71cef4c96f9324f115fc 100755 (executable)
--- 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.
 
index d06c72c877e4ba05834db912c7b9179bd262e796..8d2b3d31ae0c800dc51920a60c87068e86e68f83 100644 (file)
@@ -139,7 +139,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)
@@ -855,6 +855,22 @@ case "${target}" in
     ;;
 esac
 
+# Only allow gdbserver on some systems.
+if test -d ${srcdir}/gdbserver; then
+    if test x$enable_gdbserver = x; then
+       AC_MSG_CHECKING([for gdbserver support])
+       if (srcdir=${srcdir}/gdbserver; \
+               . ${srcdir}/configure.srv; \
+               test -n "$UNSUPPORTED")
+       then
+           AC_MSG_RESULT([no])
+           noconfigdirs="$noconfigdirs gdbserver"
+       else
+           AC_MSG_RESULT([yes])
+       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
@@ -2816,13 +2832,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.