Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Unify i386 xm.h for FreeBSD and Linux
@ 2001-07-31 12:22 Mark Kettenis
  2001-08-02  8:24 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Kettenis @ 2001-07-31 12:22 UTC (permalink / raw)
  To: gdb-patches

This unifies the Linux and FreeBSD host configs.  The idea of course
is that xm-i386.h can be used by most of the other i386 hosts too.

Checked in on mailine only.


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* config/i386/xm-i386.h: New file.
	* config/i386/xm-fbsd.h: Removed.
	* config/i386/xm-linux.h: Removed.
	* config/i386/fbsd.mh: Reorganize a bit.
	(XM_FILE): Set to xm-i386.h instead of xm-fbsd.h.
	* config/i386/linux.mh (XM_FILE): Set to xm-i386.h insread of
	xm-linux.h.

Index: config/i386/fbsd.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/fbsd.mh,v
retrieving revision 1.8
diff -u -p -r1.8 fbsd.mh
--- config/i386/fbsd.mh 2001/07/21 20:16:44 1.8
+++ config/i386/fbsd.mh 2001/07/31 19:18:39
@@ -1,6 +1,8 @@
 # Host: Intel 386 running FreeBSD
+
+XM_FILE= xm-i386.h
 XDEPFILES=
+
+NAT_FILE= nm-fbsd.h
 # NOTE: Do not spread NATDEPFILES over several lines - it hurts BSD make.
 NATDEPFILES= fork-child.o infptrace.o inftarg.o solib.o solib-svr4.o solib-legacy.o corelow.o core-aout.o core-regset.o i386-nat.o i387-nat.o i386bsd-nat.o i386fbsd-nat.o
-XM_FILE= xm-fbsd.h
-NAT_FILE= nm-fbsd.h
Index: config/i386/linux.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/linux.mh,v
retrieving revision 1.7
diff -u -p -r1.7 linux.mh
--- config/i386/linux.mh 2001/03/21 21:22:49 1.7
+++ config/i386/linux.mh 2001/07/31 19:18:39
@@ -1,6 +1,6 @@
-# Host: Intel 386 running GNU/Linux
+# Host: Intel 386 running GNU/Linux.
 
-XM_FILE= xm-linux.h
+XM_FILE= xm-i386.h
 XDEPFILES=
 
 NAT_FILE= nm-linux.h
@@ -8,4 +8,6 @@ NATDEPFILES= infptrace.o inftarg.o fork-
 	core-aout.o i386-nat.o i386-linux-nat.o i387-nat.o \
 	proc-service.o thread-db.o lin-lwp.o
 
+# The dynamically loaded libthread_db needs access to symbols in the
+# gdb executable.
 LOADLIBES = -ldl -rdynamic
--- /dev/null	Thu Feb 19 16:30:24 1998
+++ config/i386/xm-i386.h	Tue Jul 31 20:26:56 2001
@@ -0,0 +1,34 @@
+/* Host-dependent definitions for i386.
+   Copyright 2001 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#ifndef XM_I386_H
+#define XM_I386_H
+
+#include "floatformat.h"
+
+/* FIXME: kettenis/2001-07-29: Get rid of HOST_BYTE_ORDER when Andrew
+   has erradicated it from the sources.  */
+#define HOST_BYTE_ORDER LITTLE_ENDIAN
+
+#define HOST_FLOAT_FORMAT &floatformat_ieee_single_little
+#define HOST_DOUBLE_FORMAT &floatformat_ieee_double_little
+#define HOST_LONG_DOUBLE_FORMAT &floatformat_i387_ext
+
+#endif /* XM_386_H */


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

* Re: [PATCH] Unify i386 xm.h for FreeBSD and Linux
  2001-07-31 12:22 [PATCH] Unify i386 xm.h for FreeBSD and Linux Mark Kettenis
@ 2001-08-02  8:24 ` Eli Zaretskii
  2001-08-02 10:33   ` Andrew Cagney
  2001-08-02 11:14   ` Mark Kettenis
  0 siblings, 2 replies; 6+ messages in thread
From: Eli Zaretskii @ 2001-08-02  8:24 UTC (permalink / raw)
  To: kettenis; +Cc: gdb-patches

> Date: Tue, 31 Jul 2001 21:22:09 +0200
> From: Mark Kettenis <kettenis@wins.uva.nl>
> 
> This unifies the Linux and FreeBSD host configs.  The idea of course
> is that xm-i386.h can be used by most of the other i386 hosts too.
> 
> Checked in on mailine only.

Thanks, Mark.  I committed today (head only) a corresponding change
for xm-go32.h.  I attach it below, FYI.

Btw, why did you decide to define HOST_FLOAT_FORMAT and
HOST_DOUBLE_FORMAT explicitly?  The defaults are on defs.h, and they
are identical to what you did.  Any reason for that?


2001-08-02  Eli Zaretskii  <eliz@is.elta.co.il>

	* config/i386/xm-go32.h: Include xm-i386.h.
	(HOST_BYTE_ORDER, HOST_LONG_DOUBLE_FORMAT): Remove definitions.

--- gdb/config/i386/xm-go32.h~0	Thu Jul  5 17:01:30 2001
+++ gdb/config/i386/xm-go32.h	Thu Aug  2 17:30:36 2001
@@ -18,14 +18,9 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define HOST_BYTE_ORDER LITTLE_ENDIAN
-
+#include "i386/xm-i386.h"
 #include "fopen-bin.h"
 
 #define GDBINIT_FILENAME "gdb.ini"
-
 #define CRLF_SOURCE_FILES
-
 #define DIRNAME_SEPARATOR ';'
-
-#define HOST_LONG_DOUBLE_FORMAT &floatformat_i387_ext


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

* Re: [PATCH] Unify i386 xm.h for FreeBSD and Linux
  2001-08-02  8:24 ` Eli Zaretskii
@ 2001-08-02 10:33   ` Andrew Cagney
  2001-08-02 11:39     ` Mark Kettenis
  2001-08-02 11:14   ` Mark Kettenis
  1 sibling, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2001-08-02 10:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: kettenis, gdb-patches

> Btw, why did you decide to define HOST_FLOAT_FORMAT and
> HOST_DOUBLE_FORMAT explicitly?  The defaults are on defs.h, and they
> are identical to what you did.  Any reason for that?


Just FYI, they moved.  They are now in doublest.h.  Once the arm-tdep.c 
code is fixed (patch submitted) the defaults will most likely be deleted.

Beyond that, I'm trying to figure out a way of detecting / setting the 
host FP at runtime.  The other (hope) is that someone finds / implements 
host / target independant FP.

	Andrew


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

* Re: [PATCH] Unify i386 xm.h for FreeBSD and Linux
  2001-08-02  8:24 ` Eli Zaretskii
  2001-08-02 10:33   ` Andrew Cagney
@ 2001-08-02 11:14   ` Mark Kettenis
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Kettenis @ 2001-08-02 11:14 UTC (permalink / raw)
  To: eliz; +Cc: gdb-patches

   Date: Thu, 2 Aug 2001 18:20:34 +0300 (IDT)
   From: Eli Zaretskii <eliz@is.elta.co.il>

   Btw, why did you decide to define HOST_FLOAT_FORMAT and
   HOST_DOUBLE_FORMAT explicitly?  The defaults are on defs.h, and they
   are identical to what you did.  Any reason for that?

Yep.  Andrew wants to get rid of HOST_BYTE_ORDER, and therefore the
code that sets the defaults for HOST_FLOAT_FORMAT and
HOST_DOUBLE_FORMAT will disappear.

Mark


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

* Re: [PATCH] Unify i386 xm.h for FreeBSD and Linux
  2001-08-02 10:33   ` Andrew Cagney
@ 2001-08-02 11:39     ` Mark Kettenis
  2001-08-02 13:17       ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Kettenis @ 2001-08-02 11:39 UTC (permalink / raw)
  To: ac131313; +Cc: eliz, gdb-patches

   Date: Thu, 02 Aug 2001 13:33:40 -0400
   From: Andrew Cagney <ac131313@cygnus.com>

   Beyond that, I'm trying to figure out a way of detecting / setting the 
   host FP at runtime.

That's not easy.  Zack Weinberg tried to do that for GCC earlier this
year, and AFAIK gave up somewhere along the line.  You might want to
take a look at hist postings on the GCC mailing lists (sorry, no pointer).

Mark


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

* Re: [PATCH] Unify i386 xm.h for FreeBSD and Linux
  2001-08-02 11:39     ` Mark Kettenis
@ 2001-08-02 13:17       ` Andrew Cagney
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Cagney @ 2001-08-02 13:17 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: eliz, gdb-patches

>  Date: Thu, 02 Aug 2001 13:33:40 -0400
>    From: Andrew Cagney <ac131313@cygnus.com>
> 
> Beyond that, I'm trying to figure out a way of detecting / setting the 
>    host FP at runtime.
> 
> That's not easy.  Zack Weinberg tried to do that for GCC earlier this
> year, and AFAIK gave up somewhere along the line.  You might want to
> take a look at hist postings on the GCC mailing lists (sorry, no pointer).


Thanks for the pointer.  For what its worth, we can't do much worse than 
what GDB does now :-)

	Andrew




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

end of thread, other threads:[~2001-08-02 13:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-31 12:22 [PATCH] Unify i386 xm.h for FreeBSD and Linux Mark Kettenis
2001-08-02  8:24 ` Eli Zaretskii
2001-08-02 10:33   ` Andrew Cagney
2001-08-02 11:39     ` Mark Kettenis
2001-08-02 13:17       ` Andrew Cagney
2001-08-02 11:14   ` Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox