Subject: Re: 32 / 64 bit (?) kernel build error.
To: Jochen Kunz <jkunz@unixag-kl.fh-kl.de>
From: Michael <macallan18@earthlink.net>
List: port-sparc64
Date: 03/07/2005 14:35:45
--Signature=_Mon__7_Mar_2005_14_35_45_-0500_gf2bbRWEwdGbkEIG
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Hello,

> Source CVSed March 4. tried to build a release faild with:
> #   compile  GENERIC_SUN4U/machfb.o
> /usr/src/current/tooldir/bin/sparc--netbsdelf-gcc -mno-fpu -ffreestanding -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare -fno-zero-initialized-in-bss -Dsparc64 -D__sparc64__ -m32 -Wa,-Av8plusa -mcpu=ultrasparc -I. -I/usr/src/current/src/sys/arch -I/usr/src/current/src/sys -nostdinc -DLKM -DMAXUSERS=64 -D_KERNEL -D_KERNEL_OPT -I/usr/src/current/src/sys/dist/ipf -c /usr/src/current/src/sys/dev/pci/machfb.c
> /usr/src/current/src/sys/dev/pci/machfb.c: In function `mach64_attach':
> /usr/src/current/src/sys/dev/pci/machfb.c:606: warning: cast to pointer from integer of different size
> 
> *** Failed target:  machfb.o
> 
> 
> I tried to compile a GENERIC32 kernel and got the same error. 
> I disabled machfb in the kernel config file and then I got:
Hmm, that's a cast from bus_addr_t to a pointer, sparc64 defines it as unit64_t. Casting it to an unsigned long first should solve it.
Looks like I overlooked this one because I never compiled a 32bit sun4u kernel - the same driver compiles fine in a pure 32bit environment like macppc.
machfb is useful if you have an Ultra 5 or 10 and use the onboard graphics chip.

have fun
Michael

--Signature=_Mon__7_Mar_2005_14_35_45_-0500_gf2bbRWEwdGbkEIG
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (NetBSD)

iQEVAwUBQiytEcpnzkX8Yg2nAQJCXQgAroTKGrg11tR5Cx2+KToIwJW95lXP3YOa
YFmPizMOS52T6NGwKrJ804hBPikq7A0PWQ62T4JIDCaMt886qxO8omncRBZowc/9
EA3xXhZM49TIyCOnnVqOVgvGPFBGzv26JwcOJ158XN4LyRNpwnEeW0qpdaUoPDKW
iqO7pcxWmj48hLS1MZ7Tvt8pqRvLY9t1FLnod2Md054v2DsiusFo26e/fzU4NRk1
Xy5W3Oq391ndZ8Wi/7PSjwSUB8w34cHM0ouYl9F0GQj9C6/Sbyq5ECqXHfW0oJXO
beI1f2vg1IVprNoQYwyiqalLYmf9+8My3+1ybcyBx1N5Rop15Js8ew==
=Mp5/
-----END PGP SIGNATURE-----

--Signature=_Mon__7_Mar_2005_14_35_45_-0500_gf2bbRWEwdGbkEIG--