how do you get gcc with gnu ld to work on solaris2.x?

Henry Nelson
Wed Dec 4 17:12:00 GMT 2002

Since updating gcc to 3.2.1 and binutils to 2.13.1 (also tried 2.12.1
with same results) many packages either do not build or even if a binary
is created it cannot find libraries.
    Reading specs from /opt/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.2.1/specs
    Configured with: ../gcc-3.2.1/configure --prefix=/opt/gnu --disable-nls
    --enable-languages=c,c++ --with-gnu-as --with-as=/opt/gnu/bin/as
    --with-gnu-ld --with-ld=/opt/gnu/bin/ld
    Thread model: posix
    gcc version 3.2.1

    GNU ld version 2.12.1
      Supported emulations:

For example, to build a usable "info" I had to add this to my environment
before running configure in the texinfo package:
    setenv LIBS "/usr/local/lib/ -Wl,-rpath -Wl,/usr/local/lib"
    setenv TERMLIBS "-L/usr/local/lib -lncurses -R/usr/local/lib"

The "iconv" binary created in the libiconv-1.8 package can't even find
"" to open it!
   % ls -l /opt/gnu/lib/
   -rw-r--r--   1 root       152396 Dec  1 16:34 /opt/gnu/lib/

Yes, I can `setenv LD_LIBRARY_PATH "/opt/gnu/lib"` before running it, but
that is not a _solution_, it is a _workaround_ that will NOT even work in
all situations.  Since iconv is unusable standalone, configure scripts get
broken right and left.  I even tried installing "libtool," but nothing
has changed.

In it's present state, gcc with gnu ld is pretty much useless to the
_general_ Solaris2.x user.

Please cc me if there is a real solution.  TIA

henry nelson

More information about the Gcc mailing list