This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

target/build mismatch for DJGPP


On the DJGPP platform, we currently have:

  $ sh ./config.guess
  i386-pc-msdosdjgpp

But then the top-level config/mh-djgpp has this:

  # Shorten the target alias so when it is used to set 'libsubdir'
  # the name will work in both short and long filename environments.
  ifeq ($(findstring -pc-msdosdjgpp,$(target_alias)),-pc-msdosdjgpp)
  target_alias=djgpp
  endif

This causes all the configure scripts in subdirectories to be invoked
with --target=djgpp.  But

  $ sh ./config.sub djgpp
  i586-pc-msdosdjgpp

This mismatch between the host and the target causes GDB to build as a
cross-debugger, without native support for the djgpp target.

To resolve this, I propose the change below.  I think assuming i586 as
the lowest common denominator is okay these days, even for DJGPP.

Thanks.

2009-04-12  Eli Zaretskii  <eliz@gnu.org>

	* config.guess (pc:*:*:*): Return i586-pc-msdosdjgpp, for
	consistency with config.sub.

--- config.guess.~1~	2008-12-18 07:26:46.000000000 +0200
+++ config.guess	2009-04-11 18:42:45.875000000 +0300
@@ -1115,8 +1115,11 @@
     pc:*:*:*)
 	# Left here for compatibility:
         # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-	echo i386-pc-msdosdjgpp
+        # the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configury will decide that
+	# this is a cross-build.
+	echo i586-pc-msdosdjgpp
         exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]