This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
RE: solaris, collect2 and ld
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: RE: solaris, collect2 and ld
- From: Drury Tim <Tim_Drury at bscc dot bls dot com>
- Date: Wed, 9 Jun 1999 09:39:52 -0400
- Cc: "'Alexandre Oliva'" <oliva at dcc dot unicamp dot br>, Anthony Green <green at cygnus dot com>
Hello all,
Anthony posted this problem for me over here at egcs-bugs;
I'm trying to build the java runtime (libgcj). If you have
a reply to this message (and I hope you do) could you CC:
my email address since I'm not on this list? Thnx...
> collect2 never looks at the PATH on Solaris2, because /usr/ccs/bin is
> listed in the programs search path. There are two ways to
> avoid using
> /usr/ccs/bin/ld on Solaris:
>
> 1) configure --with-ld=/the/wanted/ld
> 2) ln -s /the/wanted/ld
> /path/to/gcc/lib/gcc-lib/sparc-sun-solaris*/*/real-ld
Option #2 is probably out since other folks are using the Solaris
linker and I don't want to introduce possible problems.
I tried running configure with --with-gnu-ld, but during build
/usr/ccs/bin/ld was still used. In fact, I took /usr/ccs/bin/
out of my path and _still_ that linker was used, but this makes
sense if collect2 has some other search path is uses. The option
"--with-ld=/some/linker" I have not seen before. I'll give it
a try but I thought --with-gnu-ld would force it to use the
gnu linker.
> > Is there any trick to using the GNU linker instead of the system
> > one? This situation ends up confusing libtool to no end.
>
> How come? libtool is supposed to detect whether the linker used by
> gcc is GNU ld or not. Are you playing -Bdir/ tricks on it or what?
_I'm_ not playing any tricks. I'm following the directions to
build libgcj. These are the two configurations I tried:
aries:/users/tim> ../libgcj-snapshot-1999-06-02/configure
--prefix=/backup/tim/egcs-1999.06.02 --enable-java-gc=boehm
--enable-fast-character --enable-threads=posix
--disable-shared --with-gnu-as --with-gnu-ld
and this:
aries:/users/tim> ../libgcj-snapshot-1999-06-02/configure
--prefix=/backup/tim/egcs-1999.06.02 --enable-java-gc=boehm
--enable-fast-character --enable-threads=posix --disable-shared
< --with-gnu-as and -with-gnu-ld removed >
And I end up with this error after issuing "gmake":
>
> < lots of stuff deleted >
> creating libgcj.la
> (cd .libs && rm -f libgcj.la && ln -s ../libgcj.la libgcj.la)
> /bin/sh ./libtool --mode=link gcj -g -o jv-convert
> --main=gnu.gcj.convert.Convert -rpath
> /backup/tim/egcs-1999.06.02/sparc-sun-solaris2.5.1/lib
> gnu/gcj/convert/BytesToUnicode.lo gnu/gcj/convert/Convert.lo
> gnu/gcj/convert/Input_8859_1.lo
> gnu/gcj/convert/Input_EUCJIS.lo
> gnu/gcj/convert/Input_JavaSrc.lo
> gnu/gcj/convert/Input_SJIS.lo gnu/gcj/convert/Input_UTF8.lo
> gnu/gcj/convert/Output_8859_1.lo
> gnu/gcj/convert/Output_EUCJIS.lo
> gnu/gcj/convert/Output_JavaSrc.lo
> gnu/gcj/convert/Output_SJIS.lo gnu/gcj/convert/Output_UTF8.lo
> gnu/gcj/convert/UnicodeToBytes.lo libgcj.la
> ./../boehm-gc/libgcjgc.la
> -L/backup/tim/libgcj-obj/sparc-sun-solaris2.5.1/libjava/../boe
> hm-gc/.libs -lpthread -lposix4 ./../zlib/libzgcj.la
> -L/backup/tim/libgcj-obj/sparc-sun-solaris2.5.1/libjava/../zli
> b/.libs -L/backup/tim/libgcj-obj/sparc-sun-solaris2.5.1/libjava/.libs
> gcj -g -o jv-convert --main=gnu.gcj.convert.Convert
> gnu/gcj/convert/BytesToUnicode.o gnu/gcj/convert/Convert.o
> gnu/gcj/convert/Input_8859_1.o gnu/gcj/convert/Input_EUCJIS.o
> gnu/gcj/convert/Input_JavaSrc.o gnu/gcj/convert/Input_SJIS.o
> gnu/gcj/convert/Input_UTF8.o gnu/gcj/convert/Output_8859_1.o
> gnu/gcj/convert/Output_EUCJIS.o
> gnu/gcj/convert/Output_JavaSrc.o
> gnu/gcj/convert/Output_SJIS.o gnu/gcj/convert/Output_UTF8.o
> gnu/gcj/convert/UnicodeToBytes.o .libs/libgcj.a
> ./../boehm-gc/.libs/libgcjgc.a
> -L/backup/tim/libgcj-obj/sparc-sun-solaris2.5.1/libjava/../boe
> hm-gc/.libs
> -lpthread -lposix4 ./../zlib/.libs/libzgcj.a
> -L/backup/tim/libgcj-obj/sparc-sun-solaris2.5.1/libjava/../zli
> b/.libs
> -L/backup/tim/libgcj-obj/sparc-sun-solaris2.5.1/libjava/.libs
> -Wl,--rpath
> -Wl,/backup/tim/egcs-1999.06.02/sparc-sun-solaris2.5.1/lib
> -Wl,--rpath -Wl,/backup/tim/egcs-1999.06.02/sparc-sun-solaris2.5.1/lib
> /usr/ccs/bin/ld: illegal option -- -
> /usr/ccs/bin/ld: illegal option -- p
> /usr/ccs/bin/ld: illegal option -- -
> /usr/ccs/bin/ld: illegal option -- p
> ld: warning: option -h appears more than once, first setting taken
> usage: ld [-abd:e:f:h:il:mo:rstu:z:B:D:F:GI:L:M:N:Q:R:S:VY:] file(s)
> [-a] create an absolute file
> [-b] do not do special PIC relocations in a.out
> [-d y|n] operate in dynamic|static mode
> [-e sym] use `sym' as entry point address
> [-f name] specify library for which this file is
> an auxiliary
> filter
> [-h name] use `name' as internal shared object identifier
> [-i] ignore LD_LIBRARY_PATH setting
> [-l x] search for libx.so or libx.a
> [-m] print memory map
> [-o outfile] name the output file `outfile'
> [-r] create a relocatable object
> [-s] strip any symbol and debugging information
> [-t] do not warn of multiply defined symbols
> of different
> sizes
> [-u sym] create an undefined symbol `sym'
> [-z absexec] when building an exectutable absolute
> symbols referenced in dynamic objects are
> promoted to the executable.
> [-z now] mark object as requiring non-lazy binding
> [-z defs|nodefs]
> disallow|allow undefined symbols
> [-z direct] specify 'direct' bindings for
> executable when run
> [-z groupperm|nogroupperm]
> enable|disable setting of GROUP permissions
> on dynamic dependencies
> [-z ignore|record]
> ignore|record unused dynamic dependencies
> [-z initfirst] mark object so the .init section
> of this object is executed before the
> .init section
> of other objects
> [-z loadfltr] mark filter as requiring immediate
> loading of its
> filtees at runtime
> [-z interpose]
> dynamic object is to be an `interposer' on
> direct bindings
> [-z lazyload|nolazyload]
> enable|disable delayed loading of shared objects
> [-z muldefs] allow multiply defined symbols
> [-z nodelete] mark object as non-deletable
> [-z nodlopen] mark object as non-dlopen()'able
> [-z noversion] don't record any version sections
> [-z origin] mark object as requiring $ORIGIN processing
> [-z redlocsym] reduce local syms in .symtab to a minimum
> [-z text] disallow output relocations against text
> [-z textwarn] warn if there are relocations against text
> [-z textoff] allow output relocations against text
> [-z weakextract]
> allow extraction of archive members to
> resolve weak
> references
> [-z allextract] extract all member files from archive files
> [-z defaultextract]
> extract member files from archive files
> which resolve undefined or tentative symbols
> [-z combreloc] combine multiple relocation sections
> [-B dynamic|static]
> search for shared libraries|archives
> [-B group] relocate object from within group
> [-B eliminate] eliminate unqualified global
> symbols from the symbol table
> [-B local] reduce unqualified global symbols to local
> [-B reduce] process symbol reductions
> [-B symbolic] bind external references to definitions
> when creating
> shared objects
> [-B direct] specify 'direct' bindings for
> executable when run
> [-B translator] specify that this object is to act as a
> 'translator'
> for an application bound with -Bdirect
> [-D options] print diagnostic messages
> [-F name] specify library for which this file is a filter
> [-G] create a shared object
> [-I interp] use `interp' as path name of interpreter
> [-L path] search for libraries in directory `path'
> [-M mapfile] use processing directives contained in `mapfile'
> [-N file] create a dynamic dependency on `file'
> [-Q y|n] do|do not place version information in
> output file
> [-R path] specify a library search path to be
> used at run time
> [-S name] specify a link-edit support library
> [-V] print version information
> [-Y P,dirlist] use `dirlist' as a default path when
> searching for
> libraries
> collect2: ld returned 1 exit status
> gmake[2]: *** [jv-convert] Error 1
> gmake[2]: Leaving directory
> `/backup/tim/libgcj-obj/sparc-sun-solaris2.5.1/libjava'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory
> `/backup/tim/libgcj-obj/sparc-sun-solaris2.5.1/libjava'
> gmake: *** [all-target-libjava] Error 2
> aries:/backup/tim/libgcj-obj>
>
------------------------------------------
Tim Drury
Ciber Information Services
email: tim_drury@bscc.bls.com
inter@ctive pager: ciber1@bellsouthips.com