Subject: Re: pkgsrc with gcc3.1 and native ld on Solaris
To: None <tech-pkg@netbsd.org>
From: Klaus Heinz <k.heinz.jan.drei@onlinehome.de>
List: tech-pkg
Date: 01/04/2003 01:25:33
grant beattie wrote:
> On Fri, Jan 03, 2003 at 08:09:35AM -0800, Klaus Heinz wrote:

> > Is this (a prebuilt gcc package wich uses the native ld) a
> > supported configuration or does pkgsrc need gcc with GNU ld?
> 
> I've not yet tried anything but gcc 2.95.3 on Solaris 8.

For the time being I have no influence on which compiler is used on this
box :-(.

> Does your gcc perhaps think that 'ld' is GNU ld? At the moment, the

The file .wrapper.log shows that gcc is called with parameters
'-Wl,-soname -Wl,libltl.something'. Inserting '-v' in this command line
further shows that this gets expanded to a call of the GNU program
'collect2' and then the error strikes.

If I replace the '-soname' parameter with '-h' (a parameter for the Sun
linker) all is well and the verbose output says something about
'Solaris linker version x.y'; I don't have the exact string available
here at home.

The gcc3 package is some prebuilt binary package, probably from
sunfreeware.com, and I would expect it to call the linker with correct
parameters.

> use of GNU ld on Solaris is largely unsupported.
       
If that's the case, does devel/libtool-base try to detect the linker on
on a given machine during its own installation and adjust the
parameters it uses when calling 'gcc' with 'mode=link'? I would rather
expect 'gcc' to accept always the same arguments and translate them for
the actual linker in use.

ciao
     Klaus