NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-powerpc/43044: linking powerpc64 gdbtui fails with undefine sim* references
>Number: 43044
>Category: port-powerpc
>Synopsis: linking powerpc64 gdbtui fails with undefine sim* references
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: port-powerpc-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 23 10:25:00 +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:
When doing a macppc64 build, linking gdbtui fails with
a bunch of undefined references to functions mostly
named sim_something(), i.e.:
# link gdbtui/gdbtui
[...]
/Users/dennis/NetBSD/5.0-current/src/gnu/usr.bin/gdb6/libgdb/obj/libgdb.a(remote-sim.o):
In function `._initialize_remote_sim':
remote-sim.c:(.text+0x1d4): undefined reference to `.sim_stop'
remote-sim.c:(.text+0x454): undefined reference to `.sim_create_inferior'
remote-sim.c:(.text+0x584): undefined reference to `.sim_load'
remote-sim.c:(.text+0x654): undefined reference to `.sim_info'
remote-sim.c:(.text+0x870): undefined reference to `.sim_write'
remote-sim.c:(.text+0x894): undefined reference to `.sim_read'
remote-sim.c:(.text+0x9c4): undefined reference to `.sim_store_register'
/Users/dennis/NetBSD/5.0-current/src/gnu/usr.bin/gdb6/libgdb/obj/libgdb.a(remote-sim.o):
In function `.one2one_register_sim_regno':
remote-sim.c:(.text+0xc38): undefined reference to `.sim_fetch_register'
remote-sim.c:(.text+0xe2c): undefined reference to `.sim_resume'
remote-sim.c:(.text+0xe54): undefined reference to `.sim_stop_reason'
remote-sim.c:(.text+0x1098): undefined reference to `.sim_close'
remote-sim.c:(.text+0x13bc): undefined reference to `.sim_open'
/Users/dennis/NetBSD/5.0-current/src/gnu/usr.bin/gdb6/libgdb/obj/libgdb.a(remote-sim.o):
In function `.simulator_command':
remote-sim.c:(.text+0x1724): undefined reference to `.sim_do_command'
/Users/dennis/NetBSD/5.0-current/src/gnu/usr.bin/gdb6/libgdb/obj/libgdb.a(remote-sim.o):(.toc+0x2b0):
undefined reference to `default_callback'
collect2: ld returned 1 exit status
*** Failed target: gdbtui
>How-To-Repeat:
Do a:
MACHINE=macppc64 ./build.sh distribution
>Fix:
The functions are all supposed to be in gdb's libsim.a,
which isn't included in the link. The reason for this
is that while libsim.a's Makefile is willing to make
the library for powerpc64, gdbtui's Makefile forgets to
include the library when building for powerpc64. The following
patch to src/gnu/usr.bin/gdb6/gdbtui/Makefile repairs the oversight.
Index: Makefile
===================================================================
RCS file: /cvsroot/src/gnu/usr.bin/gdb6/gdbtui/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile 3 Feb 2010 15:34:39 -0000 1.4
+++ Makefile 23 Mar 2010 07:41:45 -0000
@@ -45,7 +45,8 @@
DPADD+= ${LIBGDBDIR}/libgdb.a
# Simulator support
-.if ${MACHINE_ARCH} == powerpc || ${MACHINE_ARCH} == powerpcle
+.if ${MACHINE_ARCH} == powerpc || ${MACHINE_ARCH} == powerpcle || \
+ ${MACHINE_ARCH} == powerpc64
SIMOBJ!= cd ${.CURDIR}/../sim/ppc && ${PRINTOBJDIR}
LDADD+= -L${SIMOBJ} -lsim
DPADD+= ${SIMOBJ}/libsim.a
Home |
Main Index |
Thread Index |
Old Index