diff options
author | Ian Lance Taylor <ian@airs.com> | 1996-02-07 19:03:38 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1996-02-07 19:03:38 +0000 |
commit | 2e5983457a7e68ef9089acf42d80be836ba15c01 (patch) | |
tree | e227606f78530b2bcd310fd0506e632505efb540 /ld/configure.host | |
parent | c07dc45948fa30ca7b5035f5802322480d5c6ac5 (diff) | |
download | gdb-2e5983457a7e68ef9089acf42d80be836ba15c01.zip gdb-2e5983457a7e68ef9089acf42d80be836ba15c01.tar.gz gdb-2e5983457a7e68ef9089acf42d80be836ba15c01.tar.bz2 |
* configure.in: Look for --enable-shared. Change the value of
BFDLIB when linking against a shared library on SunOS.
* configure: Rebuild.
* configure.host: If using a shared BFD library, try to pass a
reasonable -rpath option when linking.
* Makefile.in (BFDLIB): Set to @BFDLIB@.
Diffstat (limited to 'ld/configure.host')
-rw-r--r-- | ld/configure.host | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/ld/configure.host b/ld/configure.host index e324be2..8d43d7e 100644 --- a/ld/configure.host +++ b/ld/configure.host @@ -80,11 +80,16 @@ i[345]86-*-lynxos*) HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc -lm /lib/initn.o' ;; -mips-dec-bsd*) +mips*-dec-bsd*) HOSTING_CRT0=/usr/lib/crt0.o ;; -mips-sgi-irix4*) +mips*-sgi-irix4*) + HOSTING_CRT0=/usr/lib/crt1.o + HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o' + ;; + +mips*-sgi-irix5*) HOSTING_CRT0=/usr/lib/crt1.o HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o' ;; @@ -126,3 +131,41 @@ sparc-*-solaris2*) ;; esac + +HLDFLAGS= +# If we have shared libraries, try to set rpath reasonably. +if test "${shared}" = "true"; then + case "${host}" in + *-*-irix5*) + HLDFLAGS='-Wl,-rpath,$(libdir)' + ;; + *-*-linux*aout*) + ;; + *-*-linux*) + HLDFLAGS='-Wl,-rpath,$(libdir)' + ;; + *-*-sysv4* | *-*-solaris*) + HLDFLAGS='-R $(libdir)' + ;; + esac +fi + +# On SunOS, if the linker supports the -rpath option, use it to +# prevent ../bfd and ../opcodes from being included in the run time +# search path. +case "${host}" in + *-*-sunos*) + echo 'main () { }' > conftest.c + ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t + if grep 'unrecognized' conftest.t >/dev/null 2>&1; then + : + elif grep 'No such file' conftest.t >/dev/null 2>&1; then + : + elif test "${shared}" = "true"; then + HLDFLAGS='-Wl,-rpath=$(libdir)' + else + HLDFLAGS='-Wl,-rpath=' + fi + rm -f conftest.t conftest.c conftest + ;; +esac |