From: Pierre Muller <muller@ics.u-strasbg.fr>
To: gdb-patches@sources.redhat.com
Subject: [RFC/RFA]Fix cross build of m68k netbsd target
Date: Wed, 02 Oct 2002 08:01:00 -0000 [thread overview]
Message-ID: <4.2.0.58.20021002152937.01418ad0@ics.u-strasbg.fr> (raw)
tm-nbsd.h in config/m68k directory
contains
#include ""
and
#include sys/param.h"
This is totally wrong and should be refused in all cases,
as it totally prevents correct cross-compilation
to that target.
I thus propose the following patch,
which enables me to cross-compile
with target m68k-uunknown-netbsd.
A simple grep show wthat this problem is not unique:
$ grep -n -i "#include *<" config/tm*.h config/*/tm*.h
config/i386/tm-fbsd.h:27:#include <sys/param.h>
config/i386/tm-i386aix.h:28:// OBSOLETE #include <sys/reg.h>
config/i386/tm-ptx.h:30:#include <sys/reg.h>
config/i386/tm-symmetry.h:32:#include <machine/reg.h>
config/m68k/tm-dpx2.h:34:#include <sys/types.h>
config/mips/tm-mips.h:38:#include <bfd.h>
These should probably also be fixed....
2002-10-02 Pierre Muller <muller@ics.u-strasbg.fr>
* config/m68k/tm-nbsd.h:
(sys/param.h, machine/vmparam.h): Remove wrong includes.
(PGSHIFT, HIGHPAGES,NBPG, USRSTACK): New macros,
taken from a native m68k netbsd machine.
$ cvs diff -u -p config/m68k/tm-nbsd.h
Index: config/m68k/tm-nbsd.h
===================================================================
RCS file: /cvs/src/src/gdb/config/m68k/tm-nbsd.h,v
retrieving revision 1.5
diff -u -p -r1.5 tm-nbsd.h
--- config/m68k/tm-nbsd.h 22 May 2002 03:59:54 -0000 1.5
+++ config/m68k/tm-nbsd.h 2 Oct 2002 14:56:53 -0000
@@ -21,8 +21,6 @@
#ifndef TM_NBSD_H
#define TM_NBSD_H
-#include <sys/param.h>
-#include <machine/vmparam.h>
/* Define BPT_VECTOR if it is different than the default.
This is the vector number used by traps to indicate a breakpoint. */
@@ -30,6 +28,10 @@
#define REMOTE_BPT_VECTOR 0xf
/* Address of end of stack space. */
+#define PGSHIFT 12
+#define HIGHPAGES 3
+#define NBPG (1 << PGSHIFT)
+#define USRSTACK (-HIGHPAGES*NBPG)
#define STACK_END_ADDR USRSTACK
/* For NetBSD, sigtramp is 32 bytes before STACK_END_ADDR. */
Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
next reply other threads:[~2002-10-02 15:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-02 8:01 Pierre Muller [this message]
2002-10-02 9:12 ` Jason R Thorpe
2002-10-03 0:22 ` Pierre Muller
2002-10-03 8:09 ` Jason R Thorpe
2002-10-04 8:00 ` Pierre Muller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4.2.0.58.20021002152937.01418ad0@ics.u-strasbg.fr \
--to=muller@ics.u-strasbg.fr \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox