Subject: port-sparc/20556: sparc boot blocks not building for MACHINE==sparc64,MACHINE_ARCH==sparc
To: None <>
From: None <>
List: netbsd-bugs
Date: 03/03/2003 13:20:46
>Number:         20556
>Category:       port-sparc
>Synopsis:       sparc boot blocks not building for MACHINE==sparc64,MACHINE_ARCH==sparc
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-sparc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 02 18:21:00 PST 2003
>Originator:     Luke Mewburn
>Release:        NetBSD 20030303
System: NetBSD 1.6N NetBSD 1.6N (CERBERUS from GENERIC32-$Revision: 1.56 $) #1: Sun Feb 16 21:04:57 EST 2003 sparc64
Architecture: sparc
Machine: sparc64

	I'm building a sparc release on my Ultra 5 (which runs a
	variant of the GENERIC32 kernel) with: -m sparc64 -a sparc ...
	(I.e, 32 bit userland).

	The boot blocks in sys/arch/sparc/stand fail to build on lines
	such as:
		paddr_t foo;
		printf("%lx", foo);
	with errors such as:
		warning: long unsigned int format, different type arg (arg 2)

	The `obvious' fix of casting foo to (u_long) appeases the
	compiler in boot/boot.c and common/mmu.c, but then we
	hit a problem in sys/lib/libsa/loadfile_aout.c with:
		warning: cast to pointer from integer of different size
	(lines 136, 140, 151, (etc)), at which point I punted until
	receiving further advice...

	This looks like it's related to the code in
	sys/arch/sparc/include/types.h which seems to effectively do:
		#if defined(SUN4U) && !defined(__arch64__)
		typedef unsigned long long int paddr_t
		typedef unsigned long int paddr_t

	(see above)

	NFI; my sparc foo isn't that good.  It appears that this may
	one of the issues associated with having sys/arch/sparc
	containing MACHINE dependent as well as MACHINE_ARCH dependent code.