Re: NSPR build

Wan-Teh Chang <[email protected]> Mon, 1 Jun 2009 11:39:52 -0700
Newsgroups gmane.comp.mozilla.devel.nspr
Message-ID <[email protected]>
On Mon, Jun 1, 2009 at 9:02 AM, VinuT <[email protected]> wrote:
> Althougg i mention
> CC=gcc CXX=g++ ./configure
> and it seems to build with gcc,
>
> The linker being used is /usr/ccs/bin/ld which is the Sun linker.
>
> How can i make it use the gcc linker?

You can manually change the value of LD for Solaris in
mozilla/nsprpub/configure:

http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/nsprpub/configure&rev=1.256&mark=4770-4771#4767

But you can see that we use the C compiler $(CC) instead of
the linker $(LD) to build shared libraries (the MKSHLIB command).
So I expect that manually changing the value of LD in
mozilla/nsprpub/configure will have no effect.

gcc is hardcoded to use a certain linker.  You can find that out
with this command:

    gcc -print-prog-name=ld

If it returns just "ld", then you can adjust your PATH environment
variable so that the desired "ld" is used.  If it returns a full pathname
such as /usr/ccs/bin/ld, then your gcc was built to use that particular
ld.

Wan-Teh