Add support for DragonFlyBSD target.
authorNick Clifton <nickc@redhat.com>
Mon, 28 Mar 2011 11:18:27 +0000 (11:18 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 28 Mar 2011 11:18:27 +0000 (11:18 +0000)
16 files changed:
ChangeLog
bfd/ChangeLog
bfd/config.bfd
bfd/configure
bfd/configure.in
bfd/libbfd.h
configure
configure.ac
gas/ChangeLog
gas/config/tc-i386.c
gas/config/te-dragonfly.h [new file with mode: 0644]
gas/configure.tgt
ld/ChangeLog
ld/configure.host
ld/configure.tgt
ld/ldlex.l

index 681f488136dfae4ba83f5fc8e628c87d3f918da9..a58315dc1776b3313f35e3991ee7516e3676437e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-03-26  John Marino  <binutils@marino.st>
+
+       * configure.ac: Add support for *-*-dragonfly*
+       * configure: Regenerate.
+
 2011-03-25  Joseph Myers  <joseph@codesourcery.com>
 
        * configure.ac (native_only): Remove.
index b4ce01721ef13634c6700875c9349e634dad4be5..80fa801cbe13f58b03e433e6edb97a24c2eecbc5 100644 (file)
@@ -1,3 +1,9 @@
+2011-03-26  John Marino  <binutils@marino.st>
+
+       * config.bfd: Add x86_64-*-dragonfly*, fix i386-*-dragonfly*.
+       * configure.in: Delete unused bfd_elf32_i386_dragonfly_vec.
+       * configure: Regenerate.
+
 2011-03-25  Michael Snyder  <msnyder@vmware.com>
 
        * coffcode.h (coff_set_alignment_hook): Check return of bfd_seek.
index 01fa09abc09377db31ba653e78c3f981d20a0e1b..5e67d6b91c921ca89ac26f2dd98763c48bbfa2c2 100644 (file)
@@ -551,13 +551,17 @@ case "${targ}" in
     targ_defvec=i386bsd_vec
     targ_underscore=yes
     ;;
+  i[3-7]86-*-dragonfly*)
+    targ_defvec=bfd_elf32_i386_vec
+    targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec"
+    ;;
   i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | \
   i[3-7]86-*-freebsd[12])
     targ_defvec=i386freebsd_vec
     targ_selvecs=i386bsd_vec
     targ_underscore=yes
     ;;
-  i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*)
+  i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
     targ_defvec=bfd_elf32_i386_freebsd_vec
     targ_selvecs="bfd_elf32_i386_vec i386pei_vec i386coff_vec"
     targ64_selvecs="bfd_elf64_x86_64_freebsd_vec bfd_elf64_x86_64_vec x86_64pei_vec bfd_elf64_l1om_vec bfd_elf64_l1om_freebsd_vec"
@@ -617,6 +621,11 @@ case "${targ}" in
     targ_selvecs="bfd_elf32_i386_vec bfd_elf64_l1om_vec i386coff_vec"
     want64=true
     ;;
+  x86_64-*-dragonfly*)
+    targ_defvec=bfd_elf64_x86_64_vec
+    targ_selvecs="bfd_elf32_i386_vec bfd_elf64_l1om_vec"
+    want64=true
+    ;;
   x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
     targ_defvec=bfd_elf64_x86_64_freebsd_vec
     targ_selvecs="bfd_elf32_i386_freebsd_vec i386coff_vec i386pei_vec x86_64pei_vec bfd_elf32_i386_vec bfd_elf64_x86_64_vec bfd_elf64_l1om_vec bfd_elf64_l1om_freebsd_vec"
index 63dd10d13771c2b102eb68a7ca99840d89462a1b..d587593e3fb2af38401277a1911b046d4669eb77 100755 (executable)
@@ -15060,8 +15060,6 @@ do
     bfd_elf32_hppa_nbsd_vec)   tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_hppa_vec)                tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_i370_vec)                tb="$tb elf32-i370.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_dragonfly_vec)
-                               tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i386_sol2_vec)   tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i386_freebsd_vec)        tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i386_vxworks_vec)        tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
index 5908a57207bad040f9db6c81a18cff7c0c2cf159..eaba44c09237b3d022d1022902b76156d9a79f0d 100644 (file)
@@ -703,8 +703,6 @@ do
     bfd_elf32_hppa_nbsd_vec)   tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_hppa_vec)                tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_i370_vec)                tb="$tb elf32-i370.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_dragonfly_vec)
-                               tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i386_sol2_vec)   tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i386_freebsd_vec)        tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i386_vxworks_vec)        tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
index 8c5b3b50faa60f3fe1fdb51a9f99f5dd5c885881..bdfbdb27f17630f4dc3a442448d188ab5b3918e7 100644 (file)
@@ -1412,6 +1412,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
   "BFD_RELOC_ARM_LDC_SB_G1",
   "BFD_RELOC_ARM_LDC_SB_G2",
   "BFD_RELOC_ARM_V4BX",
+  "BFD_RELOC_ARM_IRELATIVE",
   "BFD_RELOC_ARM_IMMEDIATE",
   "BFD_RELOC_ARM_ADRL_IMMEDIATE",
   "BFD_RELOC_ARM_T32_IMMEDIATE",
index a922c682028d13714f81b46ec68046e234e656f3..a12de6dad79e854cbf1079aca2c7a896b33219b7 100755 (executable)
--- a/configure
+++ b/configure
@@ -2890,7 +2890,8 @@ case "${ENABLE_GOLD}" in
     case "${target}" in
       *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
       | *-*-linux* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
-      | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-solaris2* | *-*-nto*)
+      | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \
+      | *-*-solaris2* | *-*-nto*)
         case "${target}" in
           *-*-linux*aout* | *-*-linux*oldld*)
             ;;
@@ -3063,7 +3064,7 @@ if test x$enable_libgomp = x ; then
     case "${target}" in
     *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
        ;;
-    *-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
+    *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*)
        ;;
     *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11*)
        ;;
@@ -3099,6 +3100,9 @@ case "${target}" in
     noconfigdirs="$noconfigdirs sim target-rda"
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
+  *-*-dragonfly*)
+    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+    ;;
   *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     ;;
index bac6486bcc3a1e6057cdfbf9c168c73898204116..34aad7598aab22c1a10ee09f71883a444f1abe7d 100644 (file)
@@ -349,7 +349,8 @@ case "${ENABLE_GOLD}" in
     case "${target}" in
       *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
       | *-*-linux* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
-      | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-solaris2* | *-*-nto*)
+      | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \
+      | *-*-solaris2* | *-*-nto*)
         case "${target}" in
           *-*-linux*aout* | *-*-linux*oldld*)
             ;;
@@ -509,7 +510,7 @@ if test x$enable_libgomp = x ; then
     case "${target}" in
     *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
        ;;
-    *-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
+    *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*)
        ;;
     *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11*)
        ;;
@@ -545,6 +546,9 @@ case "${target}" in
     noconfigdirs="$noconfigdirs sim target-rda"
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
+  *-*-dragonfly*)
+    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+    ;;
   *-*-freebsd[[12]] | *-*-freebsd[[12]].* | *-*-freebsd*aout*)
     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     ;;
index 2df29707f87b25455218544bf0b073a61dba6d68..e75980951486c0a5f965d36c3b6dd478911fae83 100644 (file)
@@ -1,3 +1,9 @@
+2011-03-26  John Marino  <binutils@marino.st>
+
+       * configure.tgt: Fix support for *-*-dragonfly*.
+       * config/tc-i386.c: define SVR4_COMMENT_CHARS for dragonfly.
+       * config/te-dragonfly.h: New file.
+
 2011-03-24  Eric B. Weddington  <eric.weddington@atmel.com>
 
        * config/tc-avr.c (mcu_types): Add new devices: atmega325pa,
index 5cc82190a8cb67f4ec9bdd8aeab2f4aeece3f119..e7f9c9aa97aa9690248c80592cdb57cb123fe4d7 100644 (file)
@@ -303,6 +303,7 @@ const char extra_symbol_chars[] = "*%-(["
         && !defined (TE_LINUX)                         \
         && !defined (TE_NETWARE)                       \
         && !defined (TE_FreeBSD)                       \
+        && !defined (TE_DragonFly)                     \
         && !defined (TE_NetBSD)))
 /* This array holds the chars that always start a comment.  If the
    pre-processor is disabled, these aren't very useful.  The option
diff --git a/gas/config/te-dragonfly.h b/gas/config/te-dragonfly.h
new file mode 100644 (file)
index 0000000..45da36f
--- /dev/null
@@ -0,0 +1,30 @@
+/* te-dragonfly.h -- DragonFlyBSD target environment declarations.
+   Copyright 2011 Free Software Foundation, Inc.
+
+   This file is part of GAS, the GNU Assembler.
+
+   GAS is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3, or (at your option)
+   any later version.
+
+   GAS is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GAS; see the file COPYING.  If not, write to the Free
+   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+   02110-1301, USA.  */
+
+/* Target environment for DragonFlyBSD.  It is the same as the generic
+   target, except that it arranges via the TE_DragonFly define to
+   suppress the use of "/" as a comment character.  Some code in the
+   DragonFlyBSD kernel uses "/" to mean division.  (What a concept!)  */
+#define TE_DragonFly 1
+
+#define LOCAL_LABELS_DOLLAR 1
+#define LOCAL_LABELS_FB 1
+
+#include "obj-format.h"
index 8ce9003c894d7871f353cdeb59f074eebcc32fc0..a01ff6c973f26ae462e2dadf0bbdfc0de31ad0cf 100644 (file)
@@ -205,8 +205,8 @@ case ${generic_target} in
   i386-*-freebsdaout*)                 fmt=aout em=386bsd ;;
   i386-*-freebsd[12].*)                        fmt=aout em=386bsd ;;
   i386-*-freebsd[12])                  fmt=aout em=386bsd ;;
-  i386-*-freebsd* | i386-*-kfreebsd*-gnu | i386-*-dragonfly*)
-                                       fmt=elf em=freebsd ;;
+  i386-*-freebsd* \
+  | i386-*-kfreebsd*-gnu)              fmt=elf em=freebsd ;;
   i386-*-sysv*)                                fmt=coff ;;
   i386-*-sco3.2v5*coff)                        fmt=coff ;;
   i386-*-isc*)                         fmt=coff ;;
@@ -421,6 +421,7 @@ case ${generic_target} in
   z8k-*-coff | z8k-*-sim)              fmt=coff ;;
 
   *-*-aout | *-*-scout)                        fmt=aout ;;
+  *-*-dragonfly*)                      fmt=elf em=dragonfly ;;
   *-*-freebsd* | *-*-kfreebsd*-gnu)    fmt=elf em=freebsd ;;
   *-*-bsd*)                            fmt=aout em=sun3 ;;
   *-*-generic)                         fmt=generic ;;
index df4f67f9255e51b16cdb42a2ef65762fd45eaa22..bcfd3016db93be40c7dd7d835276f9d1ba849baa 100644 (file)
@@ -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.
index f2dffe67bc56b4e52dd42ad8eb19e7659e9b16a9..f47b961176fa37c2786aa9ff322b21b06081cdfd 100644 (file)
@@ -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*)
index 88ebee3c1cda384fb46067fa69aa57a4dc4ec3d4..f574e241adeb31384500ba02aa7cc3ba7c651904 100644 (file)
@@ -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*)
   ;;
 
index c77357b732dbc215023b7a3ef70df7147332fd90..a1c954837a0fde2c9e95cf16f1dd5501088ff30d 100644 (file)
@@ -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];