[prev in list] [next in list] [prev in thread] [next in thread]
List: hpux-devtools
Subject: Re: HPUX-DEVTOOLS: to build shared libraries with cc
From: "Noby M. Joseph" <noby_josephin () yahoo ! com>
Date: 2001-08-25 0:55:55
[Download RAW message or body]
I had this question long back and the reply i got was
one needs to upgrade the compiler to version
11.11.02 otherwise you should use ld
Noby
--- Hamid Taghavi <x_taghav@ugsolutions.com> wrote:
> Hi,
>
> Is it possible to build shared libraries with cc on
> HP-UX? Here is the
> command that one might try with the error that HP-UX
> reports: The first
> command, (with cc) results in the ld command in the
> next line and then
> the error:
>
>
>
> /bin/cc -v -Wl,-b +DA2.0W -Wl,+s -o mylib.sl
> -Wl,-c mylib.objlist -lCsup
> mylib.a
> /usr/ccs/bin/ld /opt/langtools/lib/pa20_64/crt0.o
> -u main -b +s -o mylib.sl -c
> \
> mylib.objlist -lCsup mylib.a -lc
>
> cc: NLSPATH is
>
/opt/ansic/lib/nls/msg/%L/%N.cat:/opt/ansic/lib/nls/msg/C/%N.cat:
> cc: CCOPTS is not set.
> cc: INCLUDIR is INCLUDIR=/usr/include
> cc: LPATH is
> /usr/lib/pa20_64:/opt/langtools/lib/pa20_64:
> /usr/ccs/bin/ld /opt/langtools/lib/pa20_64/crt0.o -u
> main -b +s -o mylib.sl -c
> mylib.objlist -lCsup mylib.a -lc
> cc: Entering Link editor.
> ld: Invalid dynamic relocation needed for read-only
> section, in finput file
> /opt/langtools/lib/pa20_64/crt0.o, for symbol __gp
> at offset 10
> 1 errors.
>
>
> It appears that cc attempts to include crt0.o in the
> link when it invokes
> ld. Now, if I execute the same ld command but
> exclude
> /opt/langtools/lib/pa20_64/crt0.o
> it can make the shared library fine:
>
> /usr/ccs/bin/ld -u main -b +s -o mylib.sl -c
> mylib.objlist -lCsup mylib.a -lc
>
> So, how does one make this work? Is there anyway to
> exclude crt0.o from the
> link
> when using the cc command? Thanks.
>
> Hamid Taghavi
>
>
_________________________________________________________________
> To leave this mailing list, send mail to
> majordomo@cxx.cup.hp.com
> with the message UNSUBSCRIBE hpux-devtools
>
_________________________________________________________________
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
_________________________________________________________________
To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
with the message UNSUBSCRIBE hpux-devtools
_________________________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic