Subject: Re: kernel config file changes
To: Emmanuel Dreyfus <manu@netbsd.org>
From: Jachym Holecek <freza@psi.cz>
List: port-hpcarm
Date: 06/30/2003 09:53:42
> > ftp://erebor.psi.cz/pub/freza/new-hpcarm-conf.tar.gz
>
> It does not build:
>
> ../../../../arch/hpcarm/dev/sed_saip.c:90: #error "define btop, ptob."
>
> Here is the code:
>
> #if defined __mips__ || defined __sh__ || defined __arm__
> #define __BTOP(x) ((paddr_t)(x) >> PGSHIFT)
> #define __PTOB(x) ((paddr_t)(x) << PGSHIFT)
> #else
> #error "define btop, ptob."
> #endif
Hmm, is it OK for code to check against compiler provided macros (see
below) instead of relying on MACHINE (or whatever kernel-provided value
appropriate)? Maybe param.h should provide valid definition of btop/
ptopb (it does define {arm,sh3,sh5,mips}_[pb]to[bp], so another two
#defines would do)?
> Any idea why __arm__ is not defined?
This macro is defined by the compiler:
/data/tools/lib/gcc-lib/arm--netbsdelf/2.95.3/specs:-D__arm__
-D__NetBSD__ -D__ELF__ -Asystem(unix) -Asystem(NetBSD) -Acpu(arm)
-Amachine(arm)
How are you building the kernel? I'm not able to reproduce the error.
I'm going to test against fresh -current checkout (which will take some
time on my line ;).
Have a nice day,
-- Jachym Holecek