linux-mips
[Top] [All Lists]

Re: sparse and mips

To: Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: sparse and mips
From: Jeroen Vreeken <pe1rxq@amsat.org>
Date: Mon, 28 Feb 2005 15:00:44 +0100
Cc: Ralf Baechle <ralf@linux-mips.org>, Linux/MIPS Development <linux-mips@linux-mips.org>
In-reply-to: <Pine.LNX.4.62.0502281325390.5171@numbat.sonytel.be>
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>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla Thunderbird 0.9 (X11/20041103)
Geert Uytterhoeven wrote:

You're using 2.6.10?

When I played with sparse on m68k (cross-compile environment), I had to make
some modifications to arch/m68k/Makefile, to pass a few additional flags to
sparse in case of cross-compilation. Later these changes were moved to the main
Makefile, since they were valid for all architectures if cross-compilation was
involved.

So I suggest to take a look at CHECKFLAGS in the main Makefile of the latest
version (2.6.11-rc5) first, and see whether it works there.
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
else
CHECKFLAGS    += -D_MIPS_SZLONG=64
endif
ifdef CONFIG_CPU_LITTLE_ENDIAN
CHECKFLAGS    += -D__MIPSEL__
else
CHECKFLAGS    += -D__MIPSEB__
endif

Jeroen


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