build problems on sun sparc solaris 2.7

Geoff Keating
Thu Dec 7 14:28:00 GMT 2000

Mike Stump <> writes:

> /kankakee1/tmp/mrs/net/gcc-sol/gcc/xgcc -B/kankakee1/tmp/mrs/net/gcc-sol/gcc/ -B/folk/mrs/packages/gcc-20001129/sparc-sun-solaris2.7/bin/ -B/folk/mrs/packages/gcc-20001129/sparc-sun-solaris2.7/lib/ -isystem /folk/mrs/packages/gcc-20001129/sparc-sun-solaris2.7/include -shared  .libs/limitsMEMBERS.o .libs/complex.o .libs/complexf.o .libs/complexl.o .libs/complex_io.o .libs/stdexcept.o .libs/bitset.o .libs/c++io.o .libs/ios.o .libs/stdstreams.o .libs/strstream.o .libs/locale.o .libs/localename.o .libs/codecvt.o .libs/locale-inst.o .libs/stl-inst.o .libs/misc-inst.o .libs/valarray-inst.o .libs/string-inst.o -Wl,--whole-archive ../libmath/.libs/libmath.a ../libsupc++/.libs/libsupc++convenience.a -Wl,--no-whole-archive  -lm ../libmath/.libs/libmath.a -lm ../libsupc++/.libs/libsupc++convenience.a -lm -lm   -lc  -Wl,-O1 -Wl,-soname -Wl, -o .libs/
> /usr/ccs/bin/ld: illegal option -- -

It's a not-a-bug in libtool.  The problem is that when building
without GNU ld in the tree, the toplevel Makefile sets LD_FOR_TARGET
to plain 'ld', but GCC uses ld from /usr/ccs/bin/ld (apparently
hard-coded).  So the configure scripts see the environment variable
LD, assume the user knows what he's doing, and determine that GCC is
using GNU ld when in fact it isn't.

There are good reasons why GCC wants a full path, and the
Makefile can't ask GCC which ld it's using because the variable
is evaluated before GCC is built.

I work around it by doing

make bootstrap LD=/usr/ccs/bin/ld

when I'm not using a combined tree.

- Geoffrey Keating <>

More information about the Gcc-bugs mailing list