NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-powerpc/43041: powerpc64 c++ compiler emits code with reference to undefined __libc_stack_end
>Number: 43041
>Category: port-powerpc
>Synopsis: powerpc64 c++ compiler emits code with reference to undefined
>__libc_stack_end
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: port-powerpc-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 23 09:30:00 +0000 2010
>Originator: Dennis Ferguson
>Release: very recent 5.99.24
>Organization:
>Environment:
NetBSD timerxxx.akit-ferguson.com 5.99.24 NetBSD 5.99.24 (GENERIC) #0: Mon Mar
22 15:11:34 HKT 2010
dennis%dennisbigmac.akit-ferguson.com@localhost:/Users/dennis/NetBSD/5.0-current/src/sys/arch/amd64/compile/obj/GENERIC
amd64
>Description:
Loading a powerpc64 c++ program (any program, I think) fails
with an unresolved external reference to __libc_stack_end.
Here's the first one build.sh tries to make:
# link grodvi/grodvi
/usr/src/obj/tooldir.NetBSD-5.99.24-amd64/bin/powerpc64--netbsd-gcc
-B/usr/src/obj/destdir.macppc/usr/lib/ -B/usr/src/obj/destdir.macppc/usr/lib/
-Wl,-nostdlib -o grodvi dvi.o
/usr/src/gnu/usr.bin/groff/src/libs/libdriver/obj/libdriver.a
/usr/src/gnu/usr.bin/groff/src/libs/libgroff/obj/libgroff.a -lm -lsupc++
-L/usr/src/obj/destdir.macppc/usr/lib
-Wl,-rpath-link,/usr/src/obj/destdir.macppc/lib
-L/usr/src/obj/destdir.macppc/lib
-Wl,-rpath-link,/usr/src/obj/destdir.macppc/usr/lib
-L/usr/src/obj/destdir.macppc/usr/lib
/usr/src/obj/destdir.macppc/usr/lib/libgcc_eh.a(unwind-dw2.o):(.toc+0x20):
undefined reference to `__libc_stack_end'
collect2: ld returned 1 exit status
The code which makes the reference is being emitted by
the compiler.
>How-To-Repeat:
Do a:
MACHINE=macppc64 ./build.sh distribution
>Fix:
The code in question is in
src/gnu/dist/gcc4/gcc/config/rs6000/linux-unwind.h,
which ends up being included in the compiler via
src/gnu/dist/gcc4/gcc/config/rs6000/netbsd64.h. I
think the latter is just a boo-boo; even if the external
reference were somehow fixed I don't think the rest of
the code can be usefully used with NetBSD. Note that
the thing being done in there is more of a platform thing
than a particular processor thing; if rs6000/netbsd64.h
needed an equivalent then surely so would rs6000/netbsd.h
and likely the other NetBSD ports too. Because rs6000/netbsd.h
gets by without it I'm fairly comfortable the following is
correct:
Index: netbsd64.h
===================================================================
RCS file: /cvsroot/src/gnu/dist/gcc4/gcc/config/rs6000/netbsd64.h,v
retrieving revision 1.5
diff -u -r1.5 netbsd64.h
--- netbsd64.h 4 Feb 2008 04:20:51 -0000 1.5
+++ netbsd64.h 23 Mar 2010 09:06:11 -0000
@@ -571,6 +571,4 @@
#define LINK_GCC_C_SEQUENCE_SPEC \
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
-#define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h"
-
#define POWERPC_NETBSD
Home |
Main Index |
Thread Index |
Old Index