------- Comment #3 from dave at hiauly1 dot hia dot nrc dot ca  2006-09-14 
00:21 -------
Subject: Re:  Unable to build Python

> ------- Comment #1 from sje at cup dot hp dot com  2006-09-13 20:32 -------
> I had someone try to use 64 bit PA GCC code with HP Java and they ran into two
> unsats, __cxa_finalize and _Jv_RegisterClasses.  In GCC 4.0.3 there is a weak
> definition of __cxa_finalize in libstdc++.sl, but in GCC 4.1.1 there is just 
> an
> undef.  GCC 4.2 also seems to just have an undef.
> 
> David, does this sound familiar to you at all?

There is this patch to ensure that __cxa_finalize gets linked into
non-shared executables.  However, it didn't fix the python problem.
Don't know why and that's why the patch isn't installed.  There's
some other issue when shared libraries are opened with dlopen.

Note that this just pulls in the stub version of __cxa_finalize
from libgcc_stub.a that does nothing.  The same fix could be used
for _Jv_RegisterClasses but probably HP Java probably needs a real
working version of _Jv_RegisterClasses.

Dave
-- 
J. David Anglin                                  [EMAIL PROTECTED]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

Index: config/pa/pa64-hpux.h
===================================================================
--- config/pa/pa64-hpux.h       (revision 115902)
+++ config/pa/pa64-hpux.h       (working copy)
@@ -33,7 +33,8 @@
    %{!shared:%{pg:-L/lib/pa20_64/libp -L/usr/lib/pa20_64/libp %{!static:\
      %nWarning: consider linking with `-static' as system libraries with\n\
      %n  profiling support are only provided in archive format}}}\
-   %{mhp-ld:+Accept TypeMismatch -z} -E %{mlinker-opt:-O} %{!shared:-u main}\
+   %{mhp-ld:+Accept TypeMismatch -z} -E %{mlinker-opt:-O}\
+   %{!shared:-u main %{!nostdlib:%{!nodefaultlibs:-u __cxa_finalize}}}\
    %{static:-a archive} %{shared:%{mhp-ld:-b}%{!mhp-ld:-shared}}"
 #else
 #define LINK_SPEC \
@@ -43,7 +44,8 @@
    %{!shared:%{pg:-L/lib/pa20_64/libp -L/usr/lib/pa20_64/libp %{!static:\
      %nWarning: consider linking with `-static' as system libraries with\n\
      %n  profiling support are only provided in archive format}}}\
-   %{!mgnu-ld:+Accept TypeMismatch -z} -E %{mlinker-opt:-O} %{!shared:-u
main}\
+   %{!mgnu-ld:+Accept TypeMismatch -z} -E %{mlinker-opt:-O}\
+   %{!shared:-u main %{!nostdlib:%{!nodefaultlibs:-u __cxa_finalize}}}\
    %{static:-a archive} %{shared:%{mgnu-ld:-shared}%{!mgnu-ld:-b}}"
 #endif



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28821

Reply via email to