egcs 1.1b successfully built on HPPA1.1/hpux10.20

Harmanjit Singh harman@omsi.com
Fri Sep 18 17:29:00 GMT 1998


Jeffrey A Law <law@cygnus.com> writes:

>   In message < Pine.GSO.4.02.9809181129290.18572-100000@bhars7e9.europe.nortel.com >you write:
> 
>> What is probably happening is that you are using the HP system ld, now if
>> that sees -g it deceides to do static linking....
>> 
>   > Try adding "-Wl,-a,default" to you egcs link line.
> No, that is not the behavior for hpux10.20.  -g only imples static
> linking for hpux8 and earlier (since gdb can't debug dynamically
> linked code on hpux8)

Well, I am sorry for the confusion I created.  I was perplexed at the
100 kb hello.cc executable when on Linux I get a 5kb executable.

(After stripping, the sizes are 45kb and 3kb).

I think 45 kb is not a size big enough to warrant the conclusion that
static libraries are being used.

It *is* using dynamic libraries! I renamed libstdc++.sl to
libstdc++.sl.old and the hello.cc a.out execution failed.

Sorry guys!

It seems the ld.so invocation and other code at the beginning of the
executable takes up 15-20 kb.  Even hello.c a.out (after stripping) is
20kb.

Anybody knows if there is an ldd equivalent for HP-UX?

But there is another problem, when I try to compile hello.cc
statically either by saying g++ -static or by renaming the
libstdc++.sl, the linking fails after saying:

/usr/ccs/bin/ld: Unsatisfied symbols:
   pthread_once (code)
   pthread_setspecific (code)
   pthread_getspecific (code)
   pthread_keycreate (code)

These symbols are defined in /usr/lib/libcma.sl, hence one has to add
-lcma to compilations by g++ ... -lcma, then everything works ok.

Is this documented anywhere?
-- 
With Warm Regards,
Harmanjit Singh.
http://harman.home.ml.org



More information about the Gcc mailing list