From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1942 invoked by alias); 2 Oct 2002 15:01:37 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 1935 invoked from network); 2 Oct 2002 15:01:36 -0000 Received: from unknown (HELO cerbere.u-strasbg.fr) (130.79.112.250) by sources.redhat.com with SMTP; 2 Oct 2002 15:01:36 -0000 Received: from laocoon (laocoon.u-strasbg.fr [130.79.112.72]) by cerbere.u-strasbg.fr (Postfix) with ESMTP id E3CEE1D9 for ; Wed, 2 Oct 2002 17:02:31 +0200 (CEST) Message-Id: <4.2.0.58.20021002152937.01418ad0@ics.u-strasbg.fr> X-Sender: muller@ics.u-strasbg.fr Date: Wed, 02 Oct 2002 08:01:00 -0000 To: gdb-patches@sources.redhat.com From: Pierre Muller Subject: [RFC/RFA]Fix cross build of m68k netbsd target Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-SW-Source: 2002-10/txt/msg00051.txt.bz2 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 config/i386/tm-i386aix.h:28:// OBSOLETE #include config/i386/tm-ptx.h:30:#include config/i386/tm-symmetry.h:32:#include config/m68k/tm-dpx2.h:34:#include config/mips/tm-mips.h:38:#include These should probably also be fixed.... 2002-10-02 Pierre Muller * 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 -#include /* 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