linux-mips
[Top] [All Lists]

Re: sparse and mips

To: Jeroen Vreeken <pe1rxq@amsat.org>
Subject: Re: sparse and mips
From: Ralf Baechle <ralf@linux-mips.org>
Date: Thu, 3 Mar 2005 10:46:54 +0000
Cc: Geert Uytterhoeven <geert@linux-m68k.org>, Linux/MIPS Development <linux-mips@linux-mips.org>
In-reply-to: <4223240C.4010207@amsat.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <422256A3.2030407@amsat.org> <20050228121120.GA11719@linux-mips.org> <Pine.LNX.4.62.0502281325390.5171@numbat.sonytel.be> <4223240C.4010207@amsat.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.1i
On Mon, Feb 28, 2005 at 03:00:44PM +0100, Jeroen Vreeken wrote:

> Adding the following few lines fixes the problems with the headers (they 
> are normally defined by gcc)...
> I am not sure that is all that is needed (the rest might just be me 
> doing bad things in my driver) but since they are mips specific I think 
> arch/mips/Makefile would be the right place for them:
> 
> CHECKFLAGS    += -D__mips__
> ifdef CONFIG_MIPS32
> CHECKFLAGS    += -D_MIPS_SZLONG=32

I went for something slightly more beautyful:

CHECKFLAGS-y                            += -D__linux__ -D__mips__
CHECKFLAGS-$(CONFIG_MIPS32)             += -D_MIPS_SZLONG=32 \
                                           -D__PTRDIFF_TYPE__=int
CHECKFLAGS-$(CONFIG_MIPS64)             += -D_MIPS_SZLONG=64 \
                                           -D__PTRDIFF_TYPE__="long int"
CHECKFLAGS-$(CONFIG_CPU_BIG_ENDIAN)     += -D__MIPSEL__
CHECKFLAGS-$(CONFIG_CPU_LITTLE_ENDIAN)  += -D__MIPSEL__

Still needs a few more symbols I guess.  And I fixed a few of the worst
offenders, especially uaccess.h.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>