public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] configure: Re-disable building cross-gdbserver
@ 2020-02-08 16:21 Maciej W. Rozycki
  2020-02-11 15:24 ` Tom Tromey
  0 siblings, 1 reply; 5+ messages in thread
From: Maciej W. Rozycki @ 2020-02-08 16:21 UTC (permalink / raw)
  To: gcc-patches; +Cc: Tom Tromey, gdb-patches, binutils

Correct fallout from commit 919adfe84092 ("Move gdbserver to top level") 
and revert to not building `gdbserver' in a cross-configuration, that is 
where host != target, matching the documented behaviour.  We have no way 
to support non-native `gdbserver', and native `gdbserver' is usually of 
no use with cross-GDB of the chosen host.

	* configure.ac: Do not build `gdbserver' if $is_cross_compiler.
	* configure: Regenerate.
---
Hi,

 Verified with a native build, a crossed build of a native configuration 
and a build of a cross-debugger; Canadian Cross not checked.  OK to apply?

 NB I have noticed that the gdbserver(1) man page is still being built and 
installed (as ${target_alias}-gdbserver.1, if building a cross-debugger), 
even if `gdbserver' itself is not (and it is not built if only `gdbserver' 
is while GDB is not).  Obviously this is due to the man page still living 
under gdb/doc/, and I presume it will be addressed sometime soon, by 
moving the man page somewhere under gdbserver/, right?

 Also there are currently a number of mismatches in configure.ac between 
the gcc and the binutils-gdb repositories; what is the plan to eliminate 
them?

  Maciej
---
 configure    |    5 +++--
 configure.ac |    5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

gdbserver-no-cross.diff
Index: binutils-gdb/configure
===================================================================
--- binutils-gdb.orig/configure
+++ binutils-gdb/configure
@@ -3538,12 +3538,13 @@ case "${target}" in
     ;;
 esac
 
-# Only allow gdbserver on some systems.
+# Only allow native gdbserver and then only 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; \
+	if test x${is_cross_compiler} = xyes \
+	    || (srcdir=${srcdir}/gdbserver; \
 		. ${srcdir}/configure.srv; \
 		test -n "$UNSUPPORTED")
 	then
Index: binutils-gdb/configure.ac
===================================================================
--- binutils-gdb.orig/configure.ac
+++ binutils-gdb/configure.ac
@@ -782,11 +782,12 @@ case "${target}" in
     ;;
 esac
 
-# Only allow gdbserver on some systems.
+# Only allow native gdbserver and then only 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; \
+	if test x${is_cross_compiler} = xyes \
+	    || (srcdir=${srcdir}/gdbserver; \
 		. ${srcdir}/configure.srv; \
 		test -n "$UNSUPPORTED")
 	then

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-02-13 23:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-08 16:21 [PATCH] configure: Re-disable building cross-gdbserver Maciej W. Rozycki
2020-02-11 15:24 ` Tom Tromey
2020-02-11 21:02   ` Maciej W. Rozycki
2020-02-12 13:56     ` Pedro Alves
2020-02-13 23:48       ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).