* [RFC/RFA]Fix cross build of m68k netbsd target
@ 2002-10-02 8:01 Pierre Muller
2002-10-02 9:12 ` Jason R Thorpe
0 siblings, 1 reply; 5+ messages in thread
From: Pierre Muller @ 2002-10-02 8:01 UTC (permalink / raw)
To: gdb-patches
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC/RFA]Fix cross build of m68k netbsd target
2002-10-02 8:01 [RFC/RFA]Fix cross build of m68k netbsd target Pierre Muller
@ 2002-10-02 9:12 ` Jason R Thorpe
2002-10-03 0:22 ` Pierre Muller
0 siblings, 1 reply; 5+ messages in thread
From: Jason R Thorpe @ 2002-10-02 9:12 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
On Wed, Oct 02, 2002 at 04:55:31PM +0200, Pierre Muller wrote:
> 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.
Yes, now that the m68k is multiarch'd, I need to sit down an pay
some attention to the m68k-netbsd target(s).
Will you please file a GDB bug report on this issue?
> * 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.
I'm not inclined to check this in, because it won't really work
properly for all of the netbsd m68k platforms. (out of curiosity,
which one are you using?)
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC/RFA]Fix cross build of m68k netbsd target
2002-10-02 9:12 ` Jason R Thorpe
@ 2002-10-03 0:22 ` Pierre Muller
2002-10-03 8:09 ` Jason R Thorpe
0 siblings, 1 reply; 5+ messages in thread
From: Pierre Muller @ 2002-10-03 0:22 UTC (permalink / raw)
To: Jason R Thorpe; +Cc: gdb-patches
At 18:12 02/10/2002 , Jason R Thorpe a écrit:
>On Wed, Oct 02, 2002 at 04:55:31PM +0200, Pierre Muller wrote:
>
> > 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.
>
>Yes, now that the m68k is multiarch'd, I need to sit down an pay
>some attention to the m68k-netbsd target(s).
>
>Will you please file a GDB bug report on this issue?
>
> > * 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.
>
>I'm not inclined to check this in, because it won't really work
>properly for all of the netbsd m68k platforms. (out of curiosity,
>which one are you using?)
I found these values on a 1.6 m68k netbsd version.
Did these value change in version history?
This should be possible to inversigate
with the cvsweb server on www.netbsd.org....
but when I try to to use the diff tool,
it does not work correctly...
As you are probably maintainer of this tool, maybe you can fix this.
The problem is that I can't give you the sources where I found the different
macros because I lost access to the corresponding machine.
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC/RFA]Fix cross build of m68k netbsd target
2002-10-03 0:22 ` Pierre Muller
@ 2002-10-03 8:09 ` Jason R Thorpe
2002-10-04 8:00 ` Pierre Muller
0 siblings, 1 reply; 5+ messages in thread
From: Jason R Thorpe @ 2002-10-03 8:09 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
On Thu, Oct 03, 2002 at 09:16:50AM +0200, Pierre Muller wrote:
> I found these values on a 1.6 m68k netbsd version.
> Did these value change in version history?
Actually, the real problem is that those values are not the same on
different m68k platforms. For example, the amiga uses a different
value than hp300, which is different again from sun3. These have to
do with various machine-dependencies in the kernel VM layout.
> This should be possible to inversigate
> with the cvsweb server on www.netbsd.org....
> but when I try to to use the diff tool,
> it does not work correctly...
> As you are probably maintainer of this tool, maybe you can fix this.
Unfortunately (fortunately? :-), I am not the maintainer of that tool.
Send mail to www@netbsd.org about this problem.
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC/RFA]Fix cross build of m68k netbsd target
2002-10-03 8:09 ` Jason R Thorpe
@ 2002-10-04 8:00 ` Pierre Muller
0 siblings, 0 replies; 5+ messages in thread
From: Pierre Muller @ 2002-10-04 8:00 UTC (permalink / raw)
To: Jason R Thorpe; +Cc: gdb-patches
A 17:09 03/10/2002, vous avez écrit :
>On Thu, Oct 03, 2002 at 09:16:50AM +0200, Pierre Muller wrote:
>
> > I found these values on a 1.6 m68k netbsd version.
> > Did these value change in version history?
>
>Actually, the real problem is that those values are not the same on
>different m68k platforms. For example, the amiga uses a different
>value than hp300, which is different again from sun3. These have to
>do with various machine-dependencies in the kernel VM layout.
Humm, does this simply mean that these value ought
to be in the native files and that the
code should be modified so that
if you cross-targeted to m68k netbsd
and use gdbserver, that the
server side gives the correct value back to the
cross-targeted GDB executable?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-10-04 15:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-02 8:01 [RFC/RFA]Fix cross build of m68k netbsd target Pierre Muller
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox