Subject: port-macppc/32363: unable to compile macppc kernel
To: None <port-macppc-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: ORI Manabu <ori@tahoo.org>
List: netbsd-bugs
Date: 12/23/2005 07:05:00
>Number:         32363
>Category:       port-macppc
>Synopsis:       unable to compile macppc kernel
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    port-macppc-maintainer
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 23 07:05:00 +0000 2005
>Originator:     ORI Manabu
>Release:        NetBSD 3.99.14 (current as of 2005/12/22)
>Organization:
	personal
>Environment:
System: NetBSD cresson.natura-net 3.99.14 NetBSD 3.99.14 (THINKPADX21) #182: Sat Dec 17 13:26:41 JST 2005 m0ri@cresson.natura-net:/local/current/kern.i386/compile/THINKPADX21 i386
Architecture: i386
Machine: i386
>Description:
	i can't build kernel for macppc from i386 machine.
>How-To-Repeat:
	cross-compile macppc kernel from i386 machine. 
#   compile  kern/ffs.o
/local/current/tool/bin/powerpc--netbsd-gcc -D_LOCORE -I/local/current/src/sys/lib/libkern/arch/powerpc -Dmacppc=macppc -I../../. -I/local/current/src/sys/arch -I/local/current/src/sys -nostdinc -DLKM -DZS_CONSOLE_ABORT -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I/local/current/src/sys/lib/libkern/../../../common/lib/libc/quad -I/local/current/src/sys/lib/libkern/../../../common/lib/libc/string -I/local/current/src/sys/lib/libkern/../../../common/lib/libc/arch/powerpc/string -I/local/current/src/sys/dist/ipf  -I/local/current/src/sys/lib/libkern/../../../common/lib/libc/quad -I/local/current/src/sys/lib/libkern/../../../common/lib/libc/string -I/local/current/src/sys/lib/libkern/../../../common/lib/libc/arch/powerpc/string   -nostdinc -isystem /local/current/dist.powerpc/usr/include -c -traditional-cpp    /local/current/src/common/lib/libc/arch/powerpc/string/ffs.S -o ffs.o.tmp
/local/current/src/common/lib/libc/arch/powerpc/string/ffs.S: Assembler messages:
/local/current/src/common/lib/libc/arch/powerpc/string/ffs.S:34: Error: bad expression
/local/current/src/common/lib/libc/arch/powerpc/string/ffs.S:34: Error: syntax error; found `4' but expected `,'
/local/current/src/common/lib/libc/arch/powerpc/string/ffs.S:34: Error: junk at end of line: `4,%3'
/local/current/src/common/lib/libc/arch/powerpc/string/ffs.S:35: Error: bad expression
/local/current/src/common/lib/libc/arch/powerpc/string/ffs.S:35: Error: syntax error; found `3' but expected `,'
/local/current/src/common/lib/libc/arch/powerpc/string/ffs.S:35: Error: junk at end of line: `3,%4,%3'
/local/current/src/common/lib/libc/arch/powerpc/string/ffs.S:36: Error: bad expression
/local/current/src/common/lib/libc/arch/powerpc/string/ffs.S:36: Error: syntax error; found `3' but expected `,'
/local/current/src/common/lib/libc/arch/powerpc/string/ffs.S:36: Error: junk at end of line: `3,%3'
/local/current/src/common/lib/libc/arch/powerpc/string/ffs.S:37: Error: bad expression
/local/current/src/common/lib/libc/arch/powerpc/string/ffs.S:37: Error: syntax error; found `0' but expected `,'
/local/current/src/common/lib/libc/arch/powerpc/string/ffs.S:37: Error: junk at end of line: `0,32'
/local/current/src/common/lib/libc/arch/powerpc/string/ffs.S:38: Error: bad expression
/local/current/src/common/lib/libc/arch/powerpc/string/ffs.S:38: Error: syntax error; found `3' but expected `,'
/local/current/src/common/lib/libc/arch/powerpc/string/ffs.S:38: Error: junk at end of line: `3,%3,%0'

*** Failed target:  ffs.o

>Fix:
	diffs below seems to make the kernel build completed.

Index: ffs.S
===================================================================
RCS file: /local/TNF/src/common/lib/libc/arch/powerpc/string/ffs.S,v
retrieving revision 1.1
diff -u -r1.1 ffs.S
--- ffs.S	20 Dec 2005 19:28:50 -0000	1.1
+++ ffs.S	23 Dec 2005 06:55:07 -0000
@@ -27,6 +27,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 /*----------------------------------------------------------------------*/
+
+#define _NOREGNAMES
 #include <machine/asm.h>
 
 .align 4
Index: strlen.S
===================================================================
RCS file: /local/TNF/src/common/lib/libc/arch/powerpc/string/strlen.S,v
retrieving revision 1.1
diff -u -r1.1 strlen.S
--- strlen.S	20 Dec 2005 19:28:50 -0000	1.1
+++ strlen.S	23 Dec 2005 06:42:26 -0000
@@ -28,6 +28,7 @@
  */
 /*----------------------------------------------------------------------*/
 
+#define _NOREGNAMES
 #include <machine/asm.h>
 
 /*----------------------------------------------------------------------*/