NetBSD Problem Report #43022
From www@NetBSD.org Sat Mar 20 11:32:38 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id B83A463B86C
for <gnats-bugs@gnats.NetBSD.org>; Sat, 20 Mar 2010 11:32:38 +0000 (UTC)
Message-Id: <20100320113238.7DD4963B11D@www.NetBSD.org>
Date: Sat, 20 Mar 2010 11:32:38 +0000 (UTC)
From: dennis.c.ferguson@gmail.com
Reply-To: dennis.c.ferguson@gmail.com
To: gnats-bugs@NetBSD.org
Subject: assembling powerpc64 atomic_add.S fails while building librump
X-Send-Pr-Version: www-1.0
>Number: 43022
>Category: port-powerpc
>Synopsis: assembling powerpc64 atomic_add.S fails while building librump
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: mrg
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 20 11:35:00 +0000 2010
>Closed-Date: Mon Mar 22 02:22:51 +0000 2010
>Last-Modified: Mon Mar 22 02:25:01 +0000 2010
>Originator: Dennis Ferguson
>Release: very recent 5.99.24
>Organization:
>Environment:
NetBSD acer.hk.akit-ferguson.com 5.99.24 NetBSD 5.99.24 (GENERIC) #0: Sun Mar 14 17:25:30 HKT 2010 dennis@acer.hk.akit-ferguson.com:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
Doing a macppc64 build fails with the following when assembling
common/lib/libc/arch/powerpc64/atomic_add.S:
# compile librump/atomic_add.o
/usr/src/obj/tooldir.NetBSD-5.99.24-amd64/bin/powerpc64--netbsd-gcc -D_LOCORE -Wa,-fatal-warnings -I/usr/src/lib/librump/../../sys/rump/include -D_RUMPKERNEL -D_KERNEL -DMULTIPROCESSOR -D_MODULE -DMODULAR -DMAXUSERS=32 -DDIAGNOSTIC -DCOMPAT_50 -DDEBUGPRINT -I/usr/src/lib/librump -I. -I/usr/src/lib/librump/../../sys/rump/../../common/include -I/usr/src/lib/librump/../../sys/rump/../arch -I/usr/src/lib/librump/../../sys/rump/include -I/usr/src/lib/librump/../../sys/rump/librump/rumpkern/opt -nostdinc -I/usr/src/lib/librump/../../sys/rump/.. -D__NetBSD__ -I/usr/src/lib/librump/../../sys/rump/librump/rumpkern -I/usr/src/lib/librump/../../sys/rump/librump/rumpvfs -I/usr/src/lib/librump/../../sys/rump/librump/rumpnet -I/usr/src/lib/librump/../../sys/rump/librump/rumpdev -I/usr/src/lib/librump/../../sys/rump/../lib/libkern/arch/ -I/usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/lib/libc/quad -I/usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../commo
n/lib/libc/string -I/usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/lib/libc/arch/powerpc64/string -I/usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/include -c -traditional-cpp /usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/lib/libc/arch/powerpc64/atomic/atomic_add.S -o atomic_add.o
/usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/lib/libc/arch/powerpc64/atomic/../../powerpc/atomic/atomic_add.S: Assembler messages:
/usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/lib/libc/arch/powerpc64/atomic/../../powerpc/atomic/atomic_add.S:37: Error: bad expression
/usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/lib/libc/arch/powerpc64/atomic/../../powerpc/atomic/atomic_add.S:37: Error: syntax error; found `1' but expected `,'
/usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/lib/libc/arch/powerpc64/atomic/../../powerpc/atomic/atomic_add.S:37: Error: junk at end of line: `10,0,%3'
>How-To-Repeat:
Do a
MACHINE=macppc64 ./build.sh distribution
>Fix:
The following patch fixes the problem. The same change was
made to the powerpc version of the file, but powerpc64 was
overlooked:
Index: atomic_op_asm.h
===================================================================
RCS file: /cvsroot/src/common/lib/libc/arch/powerpc64/atomic/atomic_op_asm.h,v
retrieving revision 1.3
diff -u -r1.3 atomic_op_asm.h
--- atomic_op_asm.h 28 Apr 2008 20:22:52 -0000 1.3
+++ atomic_op_asm.h 20 Mar 2010 09:54:20 -0000
@@ -32,6 +32,7 @@
#ifndef _ATOMIC_OP_ASM_H_
#define _ATOMIC_OP_ASM_H_
+#define _NOREGNAMES
#include <machine/asm.h>
#if defined(_KERNEL)
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed
State-Changed-By: pooka@NetBSD.org
State-Changed-When: Sun, 21 Mar 2010 08:51:23 +0300
State-Changed-Why:
Note that a macppc64 kernel build fails with:
nbmkdep: /objs/tools/bin/powerpc--netbsd-gcc: not found: No such file or directo
ry
I wouldn't attempt to do anything with powerpc64 before elementary
things like that are fixed.
From: Dennis Ferguson <dennis.c.ferguson@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: pooka@Netbsd.org
Subject: Re: port-powerpc/43022 (assembling powerpc64 atomic_add.S fails while building librump)
Date: Sun, 21 Mar 2010 16:30:23 +0800
On 21 Mar 2010, at 13:51 , pooka@NetBSD.org wrote:
> Note that a macppc64 kernel build fails with:
> nbmkdep: /objs/tools/bin/powerpc--netbsd-gcc: not found: No such file =
or directo
> ry
>=20
> I wouldn't attempt to do anything with powerpc64 before elementary=20
> things like that are fixed.
Um, I think fixing that isn't so elementary: there is no macppc64
kernel to build, that is code which was never written. I'm
considering taking that on since I'd really like to have one.
I'm pretty sure, however, that at one point you could successfully
build a 64 bit powerpc userland for the non-existant kernel, and it
is bit rot in that which I've been filing bugs against. If you are
saying there is no value in filing bugs against the userland build
bit rot until I have a kernel to build too I can live with that,
but I'm a little bit surprised by it. Not only does it make any
work I'd like to do slightly harder (more local modifications =3D=3D =
more
potential merge failures from cvs updates), but if I never finish
the kernel it leaves this work for the next person who's interested
in a 64 bit powerpc kernel to do all over again.
From: Antti Kantee <pooka@Netbsd.org>
To: Dennis Ferguson <dennis.c.ferguson@gmail.com>
Cc: gnats-bugs@NetBSD.org
Subject: Re: port-powerpc/43022 (assembling powerpc64 atomic_add.S fails while building librump)
Date: Sun, 21 Mar 2010 10:55:36 +0200
On Sun Mar 21 2010 at 16:30:23 +0800, Dennis Ferguson wrote:
> On 21 Mar 2010, at 13:51 , pooka@NetBSD.org wrote:
> > Note that a macppc64 kernel build fails with:
> > nbmkdep: /objs/tools/bin/powerpc--netbsd-gcc: not found: No such file or directo
> > ry
> >
> > I wouldn't attempt to do anything with powerpc64 before elementary
> > things like that are fixed.
>
> Um, I think fixing that isn't so elementary: there is no macppc64
> kernel to build, that is code which was never written. I'm
> considering taking that on since I'd really like to have one.
>
> I'm pretty sure, however, that at one point you could successfully
> build a 64 bit powerpc userland for the non-existant kernel, and it
> is bit rot in that which I've been filing bugs against. If you are
> saying there is no value in filing bugs against the userland build
> bit rot until I have a kernel to build too I can live with that,
> but I'm a little bit surprised by it. Not only does it make any
> work I'd like to do slightly harder (more local modifications == more
> potential merge failures from cvs updates), but if I never finish
> the kernel it leaves this work for the next person who's interested
> in a 64 bit powerpc kernel to do all over again.
>
No, I'm saying don't be surprised if *kernel code* doesn't build for
powerpc64 (yes, your patches address that).
Responsible-Changed-From-To: port-powerpc-maintainer->mrg
Responsible-Changed-By: mrg@NetBSD.org
Responsible-Changed-When: Sun, 21 Mar 2010 23:52:25 +0000
Responsible-Changed-Why:
i'll take care of this one, too
State-Changed-From-To: analyzed->closed
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Mon, 22 Mar 2010 02:22:51 +0000
State-Changed-Why:
change applied, thanks!
From: matthew green <mrg@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43022 CVS commit: src/common/lib/libc/arch/powerpc64/atomic
Date: Mon, 22 Mar 2010 02:22:33 +0000
Module Name: src
Committed By: mrg
Date: Mon Mar 22 02:22:32 UTC 2010
Modified Files:
src/common/lib/libc/arch/powerpc64/atomic: atomic_op_asm.h
Log Message:
define _NOREGNAMES before including <machine/asm.h>, like powerpc does.
from dennis.c.ferguson@gmail.com in PR#43022.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/common/lib/libc/arch/powerpc64/atomic/atomic_op_asm.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.