aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2011-03-28 11:18:27 +0000
committerNick Clifton <nickc@redhat.com>2011-03-28 11:18:27 +0000
commit5b806d279379d653094d290ae57498ad4ddd6cbf (patch)
treed3966f050b1757f3c84268f6b56c4c1ff3c23d58 /ld
parentf31d24a0a1236c774e77b9bdb69eab870dddb8e9 (diff)
downloadgdb-5b806d279379d653094d290ae57498ad4ddd6cbf.zip
gdb-5b806d279379d653094d290ae57498ad4ddd6cbf.tar.gz
gdb-5b806d279379d653094d290ae57498ad4ddd6cbf.tar.bz2
Add support for DragonFlyBSD target.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/configure.host12
-rw-r--r--ld/configure.tgt15
-rw-r--r--ld/ldlex.l2
4 files changed, 28 insertions, 7 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index df4f67f..bcfd301 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2011-03-26 John Marino <binutils@marino.st>
+
+ * configure.host: Update *-*-dragonfly* host entry.
+ * configure.tgt: Update *-*-dragonfly* target entry.
+ * ldlex.l: Prevent redefinition of YY_NO_UNPUT.
+
2011-03-28 Joseph Myers <joseph@codesourcery.com>
* configure.in: Check for windows.h, not Windows.h.
diff --git a/ld/configure.host b/ld/configure.host
index f2dffe6..f47b961 100644
--- a/ld/configure.host
+++ b/ld/configure.host
@@ -18,7 +18,12 @@ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ]; then libgcc=../gcc/libgcc.a; else libg
case "${host}" in
-*-*-freebsd* | *-*-kfreebsd*-gnu | *-*-dragonfly*)
+*-*-dragonfly*)
+ HOSTING_CRT0='-dynamic-linker `[ -f \`${CC} --print-prog-name=ld-elf.so.2\` ] || echo /usr/libexec/``${CC} --print-prog-name=ld-elf.so.2` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `${CC} --print-file-name=crtbegin.o`'
+ 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`'
+ ;;
+
+*-*-freebsd* | *-*-kfreebsd*-gnu)
HOSTING_CRT0='-dynamic-linker `[ -f \`${CC} --print-prog-name=ld-elf.so.1\` ] || echo /usr/libexec/``${CC} --print-prog-name=ld-elf.so.1` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `${CC} --print-file-name=crtbegin.o`'
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`'
;;
@@ -200,7 +205,10 @@ sparc64-*-solaris2* | sparcv9-*-solaris2*)
HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`'
;;
-*-*-freebsd* | *-*-kfreebsd*-gnu | *-*-dragonfly*)
+*-*-dragonfly*)
+ ;;
+
+*-*-freebsd* | *-*-kfreebsd*-gnu)
;;
*-*-linux* | *-*-gnu*)
diff --git a/ld/configure.tgt b/ld/configure.tgt
index 88ebee3..f574e24 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -249,7 +249,11 @@ x86_64-*-elf*) targ_emul=elf_x86_64
i[3-7]86-*-kaos*) targ_emul=elf_i386 ;;
i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | i[3-7]86-*-freebsd[12])
targ_emul=i386bsd ;;
-i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*)
+i[3-7]86-*-dragonfly*) targ_emul=elf_i386
+ targ_extra_emuls="i386bsd" ;;
+x86_64-*-dragonfly*) targ_emul=elf_x86_64
+ targ_extra_emuls="elf_i386 elf_l1om" ;;
+i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
targ_emul=elf_i386_fbsd
targ_extra_emuls="elf_i386 i386bsd" ;;
x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
@@ -683,7 +687,11 @@ esac
NATIVE_LIB_DIRS='/usr/local/lib /lib /usr/lib'
case "${target}" in
-*-*-freebsd* | *-*-dragonfly*)
+*-*-dragonfly*)
+ NATIVE_LIB_DIRS='/usr/lib /usr/pkg/lib /usr/local/lib'
+ ;;
+
+*-*-freebsd*)
NATIVE_LIB_DIRS='/lib /usr/lib /usr/local/lib'
;;
@@ -723,9 +731,6 @@ i[03-9x]86-*-cygwin*)
*-*-linux*)
;;
-*-*-freebsd* | *-*-dragonfly*)
- ;;
-
*-*-netbsd*)
;;
diff --git a/ld/ldlex.l b/ld/ldlex.l
index c77357b..a1c9548 100644
--- a/ld/ldlex.l
+++ b/ld/ldlex.l
@@ -60,7 +60,9 @@ const char *lex_string = NULL;
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result = yy_input (buf, max_size)
+#ifndef YY_NO_UNPUT
#define YY_NO_UNPUT
+#endif
#define MAX_INCLUDE_DEPTH 10
static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];