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 
>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
NetBSD 5.99.24 NetBSD 5.99.24 (GENERIC) #0: Mon Mar 
22 15:11:34 HKT 2010

Loading a powerpc64 c++ program (any program, I think) fails
with an unresolved external reference to __libc_stack_end.
Here's the first one tries to make:

#      link  grodvi/grodvi
-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/libgroff/obj/libgroff.a -lm -lsupc++      
undefined reference to `__libc_stack_end'
collect2: ld returned 1 exit status

The code which makes the reference is being emitted by
the compiler.
Do a:

    MACHINE=macppc64 ./ distribution
The code in question is in
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

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 @@
   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
-#define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h"

Home | Main Index | Thread Index | Old Index