aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@netbsd.org>2003-05-29 17:38:52 +0000
committerJason Thorpe <thorpej@netbsd.org>2003-05-29 17:38:52 +0000
commit561c27b2bb69d7be3741308be1e5520e9e314cee (patch)
tree2603f2ba699bf75d0124b585c97e15c2624c44d6 /ld
parent4bf4a8829cc6432bc322a328566cb1c0ba20563a (diff)
downloadgdb-561c27b2bb69d7be3741308be1e5520e9e314cee.zip
gdb-561c27b2bb69d7be3741308be1e5520e9e314cee.tar.gz
gdb-561c27b2bb69d7be3741308be1e5520e9e314cee.tar.bz2
* configure.host (*-*-netbsd*): Set HOSTING_CRT0 and HOSTING_LIBS
correctly for more recent versions of NetBSD. (alpha*-*-netbsd*): Remove. (i[3-7]86-*-netbsd*): Remove.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog7
-rw-r--r--ld/configure.host40
2 files changed, 39 insertions, 8 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index bdb04c1..5b6621e 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,10 @@
+2003-05-29 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * configure.host (*-*-netbsd*): Set HOSTING_CRT0 and HOSTING_LIBS
+ correctly for more recent versions of NetBSD.
+ (alpha*-*-netbsd*): Remove.
+ (i[3-7]86-*-netbsd*): Remove.
+
2003-05-29 Nick Clifton <nickc@redhat.com>
* emultempl/pe.em: Include "safe-ctype.h" instead of <ctype.h>.
diff --git a/ld/configure.host b/ld/configure.host
index 1ce245e..69132cd 100644
--- a/ld/configure.host
+++ b/ld/configure.host
@@ -41,6 +41,37 @@ case "${host}" in
HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
;;
+*-*-netbsd*)
+ # Different versions of NetBSD with the ELF object format use different
+ # sets of start/end files.
+ HOSTING_CRT0='-dynamic-linker /usr/libexec/ld.elf_so /usr/lib/crt0.o'
+ if [ -f `${CC} --print-file-name=crti.o` ]; then
+ # Support for GCC's crtstuff present.
+ HOSTING_CRT0="$HOSTING_CRT0 `${CC} --print-file-name=crti.o`"
+ if [ -f ../gcc/crtbegin.o ]; then
+ HOSTING_CRT0="$HOSTING_CRT0 ../gcc/crtbegin.o"
+ else
+ HOSTING_CRT0="$HOSTING_CRT0 `${CC} --print-file-name=crtbegin.o`"
+ fi
+ else
+ # Support for GCC's crtstuff not present.
+ HOSTING_CRT0="$HOSTING_CRT0 `${CC} --print-file-name=crtbegin.o`"
+ fi
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
+ if [ -f `${CC} --print-file-name=crtn.o` ]; then
+ # Support for GCC's crtstuff present.
+ if [ -f ../gcc/crtbegin.o ]; then
+ HOSTING_LIBS="$HOSTING_LIBS ../gcc/crtend.o"
+ else
+ HOSTING_LIBS="$HOSTING_LIBS `${CC} --print-file-name=crtend.o`"
+ fi
+ HOSTING_LIBS="$HOSTING_LIBS `${CC} --print-file-name=crtn.o`"
+ else
+ # Support for GCC's crtstuff not present.
+ HOSTING_LIBS="$HOSTING_LIBS `${CC} --print-file-name=crtend.o`"
+ fi
+ ;;
+
esac
#
@@ -53,10 +84,6 @@ case "${host}" in
# No further tweaking needed
;;
-alpha*-*-netbsd*)
- HOSTING_CRT0=/usr/lib/crt0.o
- ;;
-
arm*-*-linux-gnu*)
HOSTING_CRT0='-p '`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux,g"`
;;
@@ -67,7 +94,7 @@ hppa*64*-*-hpux11*)
HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else if test "$GCC" = yes; then ${CC} --print-libgcc-file-name; else gcc --print-libgcc-file-name; fi fi` -lc /usr/lib/pa20_64/milli.a'
;;
-i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[12] | i[3-7]86-*-freebsd[12]\.* | i[3-7]86-*-freebsd*aout* | i[3-7]86-*-netbsd*)
+i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[12] | i[3-7]86-*-freebsd[12]\.* | i[3-7]86-*-freebsd*aout*)
HOSTING_CRT0=/usr/lib/crt0.o
;;
@@ -216,9 +243,6 @@ x86_64-*-linux-gnu*)
;;
*-*-netbsd*)
- # NetBSD typically does not use the GCC crtstuff, so ignore it.
- HOSTING_CRT0='-dynamic-linker /usr/libexec/ld.elf_so /usr/lib/crt0.o /usr/lib/crtbegin.o'
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` /usr/lib/crtend.o'
;;
alpha*-*-*)