NetBSD Problem Report #43043

From www@NetBSD.org  Tue Mar 23 10:00:46 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 E4CB863B86C
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 23 Mar 2010 10:00:45 +0000 (UTC)
Message-Id: <20100323100045.7B77C63B11D@www.NetBSD.org>
Date: Tue, 23 Mar 2010 10:00:45 +0000 (UTC)
From: dennis.c.ferguson@gmail.com
Reply-To: dennis.c.ferguson@gmail.com
To: gnats-bugs@NetBSD.org
Subject: linking powerpc64 gdb fails with undefined references
X-Send-Pr-Version: www-1.0

>Number:         43043
>Category:       port-powerpc
>Synopsis:       linking powerpc64 gdb fails with undefined references
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    skrll
>State:          analyzed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 23 10:05:00 +0000 2010
>Closed-Date:    
>Last-Modified:  Mon Mar 29 08:39:14 +0000 2010
>Originator:     Dennis Ferguson
>Release:        very recent 5.99.24
>Organization:
>Environment:
Darwin dennisbigmac.akit-ferguson.com 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov  3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386

>Description:
Building a powerpc64 gdb fails while linking with
undefined references:

#      link  gdb/gdb
[...]
/Users/dennis/NetBSD/5.0-current/src/gnu/usr.bin/gdb6/libgdb/obj/libgdb.a(ppcnbsd-nat.o):(.toc+0x18): undefined reference to `nbsd_pid_to_exec_file'
/Users/dennis/NetBSD/5.0-current/src/gnu/usr.bin/gdb6/libgdb/obj/libgdb.a(ppcnbsd-nat.o):(.toc+0x58): undefined reference to `ppcnbsd_gregset'
/Users/dennis/NetBSD/5.0-current/src/gnu/usr.bin/gdb6/libgdb/obj/libgdb.a(ppcnbsd-nat.o):(.toc+0x78): undefined reference to `ppcnbsd_fpregset'
collect2: ld returned 1 exit status

*** Failed target:  gdb

The missing functions are present in the sources, in
src/gnu/dist/gdb6/gdb/ppcnbsd-tdep.c.

>How-To-Repeat:
Do a:

    MACHINE=macppc64 ./build.sh distribution
>Fix:
I believe the problem is that the generated build
configuration files in src/gnu/usr.bin/gdb6/arch/powerpc64/
are out of date and need to be regenerated.  While
I apparently lack the right juju to follow the instructions
for doing this myself, I know that copying the more
recently made versions of config.h, defs.mk and init.c
from the powerpc/ directory into powerpc64/ made the
problem go away so I strongly suspect that making
new files the proper way will do so too. 

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->analyzed
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Sat, 27 Mar 2010 20:18:40 +0000
State-Changed-Why:
i couldn't get mknative-gdb to run in the very short amount of time i gave it,
but copying the powerpc fails as dennis suggests works just fine for me, so
i've done that for now.

someone hopefully can re-generate them properly and then close this PR :)


From: matthew green <mrg@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/43043 CVS commit: src/gnu/usr.bin/gdb6/arch/powerpc64
Date: Sat, 27 Mar 2010 20:17:31 +0000

 Module Name:	src
 Committed By:	mrg
 Date:		Sat Mar 27 20:17:31 UTC 2010

 Modified Files:
 	src/gnu/usr.bin/gdb6/arch/powerpc64: config.h defs.mk init.c

 Log Message:
 copy across the powerpc versions of these files for now.  should use
 mknative-gdb to generate these, but my initial attempt failed and
 these ones seem to be about what i'd expect anyway.
 suggested by dennis.c.ferguson@gmail.com in PR#43043.


 To generate a diff of this commit:
 cvs rdiff -u -r1.1 -r1.2 src/gnu/usr.bin/gdb6/arch/powerpc64/config.h \
     src/gnu/usr.bin/gdb6/arch/powerpc64/defs.mk \
     src/gnu/usr.bin/gdb6/arch/powerpc64/init.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: port-powerpc-maintainer->skrll
Responsible-Changed-By: skrll@NetBSD.org
Responsible-Changed-When: Mon, 29 Mar 2010 08:39:14 +0000
Responsible-Changed-Why:
Take. I'll handle this properly. ;)


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.