Subject: Re: pkgsrc with gcc3.1 and native ld on Solaris
To: None <>
From: grant beattie <>
List: tech-pkg
Date: 01/04/2003 14:00:38
On Sat, Jan 04, 2003 at 01:25:33AM +0100, Klaus Heinz wrote:

> > 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
>, and I would expect it to call the linker with correct
> parameters.

That may suggest that gcc is expecting GNU ld, which it is not. Are there
any notes about that gcc which stipulate the use of GNU binutils?

I'll try a few different versions of gcc/binutils on Solaris shortly and
see how things go.

Will you be using gcc 3.1 for building all pkgsrc stuff? Or just to
bootstrap lang/gcc ? (which is 2.95.3)

> > 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.

Given the other bunch of stuff which gets hardcoded in libtool at
build time, it's probably unlikely.

It may be something that we could incorporate into buildlink2 (hi,
Johnny!) as translation of arguments is right up that alley :-)

There are (were) also non-pkgsrc reasons why GNU binutils on Solaris
is a "bad thing", but I believe these issues were fixed in recent