[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Solaris, combining a bunch of convenience archives
From: |
Ralf Wildenhues |
Subject: |
Re: Solaris, combining a bunch of convenience archives |
Date: |
Thu, 13 Oct 2005 09:19:06 +0200 |
User-agent: |
Mutt/1.5.11 |
* Albert Chin wrote on Wed, Oct 12, 2005 at 11:21:50PM CEST:
> On Wed, Oct 12, 2005 at 09:02:08PM +0200, Ralf Wildenhues wrote:
> > * Albert Chin wrote on Wed, Oct 12, 2005 at 07:42:21PM CEST:
> > > On Wed, Oct 12, 2005 at 02:18:28PM +0200, Ralf Wildenhues wrote:
> >
> > > > I haven't found a good way to persuade the compiler driver to invoke the
> > > > linker anyway yet.. does anybody have a better idea than going back to
> > > > linking with $LD (maybe only in the 64bit case)? Any suggestions?
> > >
> > > Infer from -xarch=v9?
> >
> > I don't understand what you are trying to say with this comment.
> > I have added `-xarch=v9' to the link line. cc ignores it.
> >
> > If I invoke ld directly, I have to add `-64', it does not understand
> > `-xarch=v9',..
>
> If libtool sees -xarch=v9, it should add -64 to the linker
> command-line.
Yes, certainly. This solves the issue for branch-1-5, where we use
`$LD' to link. (Of course, we could backport using $CC for linking
instead, but mind the following.)
The other issue is rather independent of this (sorry for mixing it
up in the descriptions):
For CVS HEAD, where we use `$CC' to link, all I can think of is setting
whole_archive_flag_spec=
so that the compiler driver "sees" the objects, so that it actually
*invokes* the linker instead of bailing, because it thinks it has
nothing to give to the linker. See test below.
By the way, this is
| cc: Sun C 5.6 2004/07/15
and I would be grateful if someone with access to a newer compiler
version could check whether this has been fixed in the meantime; we
could then avoid punishing users with newer compilers.
To test:
echo 'int x = 3;' > a.c
cc -Kpic -xarch=v9 -c a.c
ar cru liba.a a.o
cc -G -o liba.so -Wl,-z -Wl,allextract,liba.a -Wl,-z -Wl,defaultextract
-xarch=v9
# the last one fails, but the next instead works (note the xarch is
# necessary):
cc -G -o liba.so a.o -xarch=v9
The same thing also happens in 32 bit mode:
echo 'int x = 3;' > a.c
cc -Kpic -c a.c
ar cru liba.a a.o
cc -G -o liba.so -Wl,-z -Wl,allextract,liba.a -Wl,-z -Wl,defaultextract
# the last one fails
Cheers,
Ralf
- Solaris, combining a bunch of convenience archives, Ralf Wildenhues, 2005/10/12
- Re: Solaris, combining a bunch of convenience archives, Peter O'Gorman, 2005/10/12
- Re: Solaris, combining a bunch of convenience archives, Albert Chin, 2005/10/12
- Re: Solaris, combining a bunch of convenience archives, Ralf Wildenhues, 2005/10/12
- Re: Solaris, combining a bunch of convenience archives, Albert Chin, 2005/10/12
- Re: Solaris, combining a bunch of convenience archives,
Ralf Wildenhues <=
- Re: Solaris, combining a bunch of convenience archives, Ralf Wildenhues, 2005/10/14
- Re: Solaris, combining a bunch of convenience archives, Ralf Wildenhues, 2005/10/26
- Re: Solaris, combining a bunch of convenience archives, Gary V. Vaughan, 2005/10/27