bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Failure building .so on HP-UX 11.00 + cc


From: Ralf Wildenhues
Subject: Re: Failure building .so on HP-UX 11.00 + cc
Date: Sat, 3 Jun 2006 03:24:21 +0200
User-agent: Mutt/1.5.11+cvs20060403

Hi Daniel,

* Daniel Richard G. wrote on Fri, Jun 02, 2006 at 08:07:15PM CEST:
> Working on an HP-UX/PA-RISC 11.00 system, with the native compiler:
> 
>       $ uname -a
>       HP-UX hrdygrdy B.11.00 A 9000/785 2003934647 two-user license
>       $ which cc
>       /opt/ansic/bin/cc
>       $ cc -V -c hello.c -o hello
>       cpp.ansi: HP92453-01 A.11.01.20 HP C Preprocessor (ANSI)
>       ccom: HP92453-01 A.11.01.20 HP C Compiler
>       /usr/ccs/bin/ld: 92453-07 linker linker ld B.11.13 990903

> cc(1) does not understand the -b option, and is attempting to link the 
> library as an executable. This problem occurs with both 1.5.22 and CVS 
> HEAD.

Ahh, the compiler on the 11.00 system I have access to is
| cpp.ansi: HP92453-01 B.11.11.32871.GP HP C Preprocessor (ANSI)
| ccom: HP92453-01 B.11.X.32509-32512.GP HP C Compiler

> Something to consider: The "ld -b" syntax also works fine on 11.23.

Wow, thanks for reporting this.  So the question is at which point can
we be sure that using $CC for link works reliably on HP-UX?

> Is there any benefit to using "cc -b" at all?

I don't know too much about HP's compilers, but most compiler drivers
nowadays pass extra flags to the linker in some cases, and are smart
enough to build shared libraries sanely, so that it's actually less
error-prone to use them instead of calling the linker directly.  For
C++, it's usually required.
(Another benefit is that the logic in ltmain is somewhat simplified.)

> I am attaching a patch (against CVS) that shows the one-line edit I made. 
> It is not a full patch; it addresses only my particular case, and is 
> intended more as illustration than a real fix.

Yes, I guess we need to review this.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]