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

Harmanjit Singh
Fri Sep 18 17:29:00 GMT 1998

Jeffrey A Law <> writes:

>   In message < >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 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 to and the a.out execution failed.

Sorry guys!

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

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

But there is another problem, when I try to compile
statically either by saying g++ -static or by renaming the, 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/, hence one has to add
-lcma to compilations by g++ ... -lcma, then everything works ok.

Is this documented anywhere?
With Warm Regards,
Harmanjit Singh.

More information about the Gcc mailing list