]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gas/configure.in
Add support for the Infineon XC16X.
[thirdparty/binutils-gdb.git] / gas / configure.in
index bdfa0f45ab90fce35a77d08888670bc912cae54c..f7a75cd4e29d509a025a43c62c040119c45e770b 100644 (file)
@@ -22,14 +22,6 @@ AM_INIT_AUTOMAKE(gas, ${BFD_VERSION})
 
 AM_PROG_LIBTOOL
 
-user_bfd_gas=
-AC_ARG_ENABLE(bfd-assembler,
-[  --enable-bfd-assembler  use BFD back end for writing object files],
-[case "${enableval}" in
-  yes) need_bfd=yes user_bfd_gas=yes ;;
-  no)  user_bfd_gas=no ;;
-  *)   AC_MSG_ERROR(bad value ${enableval} given for bfd-assembler option) ;;
-esac])dnl
 AC_ARG_ENABLE(targets,
 [    targets            alternative target configurations besides the primary],
 [case "${enableval}" in
@@ -277,19 +269,31 @@ changequote([,])dnl
        *opcodes*) shared_opcodes=true ;;
        *) shared_opcodes=false ;;
        esac
-       if test "${shared_opcodes}" = "true"; then
-         # A shared libopcodes must be linked against libbfd.
-         need_bfd=yes
-       fi
        ;;
     esac
 
     # Any other special object files needed ?
     case ${cpu_type} in
+
+      bfin)
+        echo ${extra_objects} | grep -s "bfin-parse.o"
+        if test $? -ne 0 ; then
+          extra_objects="$extra_objects bfin-parse.o"
+        fi
+
+        echo ${extra_objects} | grep -s "bfin-lex.o"
+        if test $? -ne 0 ; then
+          extra_objects="$extra_objects bfin-lex.o"
+        fi
+        ;;
+
       fr30 | ip2k | iq2000 | m32r | openrisc)
        using_cgen=yes
        ;;
 
+      m32c)
+       using_cgen=yes
+       ;;
       frv)
        using_cgen=yes
        ;;
@@ -317,6 +321,10 @@ changequote([,])dnl
        fi
        ;;
 
+      mt)
+        using_cgen=yes
+       ;;
+
       i386 | s390 | sparc)
        if test $this_target = $target ; then
          AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.])
@@ -327,6 +335,10 @@ changequote([,])dnl
        using_cgen=yes
        ;;
 
+      xc16x)
+       using_cgen=yes
+       ;;
+
       xtensa)
        echo ${extra_objects} | grep -s "xtensa-relax.o"
        if test $? -ne 0 ; then
@@ -348,17 +360,8 @@ changequote([,])dnl
 # See if we really can support this configuration with the emulation code.
 
     if test $this_target = $target ; then
-      primary_bfd_gas=$bfd_gas
       obj_format=$fmt
       te_file=$em
-
-      if test $bfd_gas = no ; then
-       # Can't support other configurations this way.
-       break
-      fi
-    elif test $bfd_gas = no ; then
-      # Can't support this configuration.
-      break
     fi
 
 # From target name and format, produce a list of supported emulations.
@@ -452,27 +455,6 @@ if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
   AC_MSG_ERROR(GAS does not have support for object file format ${obj_format})
 fi
 
-case ${user_bfd_gas}-${primary_bfd_gas} in
-  yes-yes | no-no)
-    # We didn't override user's choice.
-    ;;
-  no-yes)
-    AC_MSG_WARN(Use of BFD is required for ${target}; overriding config options.)
-    ;;
-  no-preferred)
-    primary_bfd_gas=no
-    ;;
-  *-preferred)
-    primary_bfd_gas=yes
-    ;;
-  yes-*)
-    primary_bfd_gas=yes
-    ;;
-  -*)
-    # User specified nothing.
-    ;;
-esac
-
 # Some COFF configurations want these random other flags set.
 case ${obj_format} in
   coff)
@@ -485,8 +467,8 @@ case ${obj_format} in
 esac
 
 # Getting this done right is going to be a bitch.  Each configuration specified
-# with --enable-targets=... should be checked for environment, format, cpu, and
-# bfd_gas setting.
+# with --enable-targets=... should be checked for environment, format, cpu
+# setting.
 #
 # For each configuration, the necessary object file support code must be linked
 # in.  This might be only one, it might be up to four.  The necessary emulation
@@ -529,7 +511,6 @@ if test `set . $formats ; shift ; echo $#` -gt 1 ; then
       ecoff)   AC_DEFINE(OBJ_MAYBE_ECOFF, 1,   [ECOFF support?])   ;;
       elf)     AC_DEFINE(OBJ_MAYBE_ELF, 1,     [ELF support?])     ;;
       generic) AC_DEFINE(OBJ_MAYBE_GENERIC, 1, [generic support?]) ;;
-      hp300)   AC_DEFINE(OBJ_MAYBE_HP300, 1,   [HP300 support?])   ;;
       ieee)    AC_DEFINE(OBJ_MAYBE_IEEE, 1,    [IEEE support?])    ;;
       som)     AC_DEFINE(OBJ_MAYBE_SOM, 1,     [SOM support?])     ;;
     esac
@@ -553,12 +534,6 @@ AC_DEFINE_UNQUOTED(EMULATIONS, $EMULATIONS, [Supported emulations.])
 AC_DEFINE_UNQUOTED(DEFAULT_EMULATION, "$DEFAULT_EMULATION",
                   [Default emulation.])
 
-case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
-  yes-*-coff)  need_bfd=yes ;;
-  no-*-coff)   need_bfd=yes
-               AC_DEFINE(MANY_SEGMENTS, 1, [old COFF support?]) ;;
-esac
-
 reject_dev_configs=yes
 
 case ${reject_dev_configs}-${dev} in
@@ -574,11 +549,6 @@ AC_SUBST(install_tooldir)
 AC_SUBST(atof)
 dnl AC_SUBST(emulation)
 
-case "${primary_bfd_gas}" in
-  yes) AC_DEFINE(BFD_ASSEMBLER, 1, [Use BFD interface?])
-       need_bfd=yes ;;
-esac
-
 # do we need the opcodes library?
 case "${need_opcodes}" in
 yes)
@@ -586,13 +556,9 @@ yes)
   ;;
 esac
 
-case "${need_bfd}" in
-yes)
-  BFDLIB=../bfd/libbfd.la
-  BFDVER_H=../bfd/bfdver.h
-  ALL_OBJ_DEPS="$ALL_OBJ_DEPS"' ../bfd/bfd.h $(INCDIR)/symcat.h'
-  ;;
-esac
+BFDLIB=../bfd/libbfd.la
+BFDVER_H=../bfd/bfdver.h
+ALL_OBJ_DEPS="$ALL_OBJ_DEPS"' ../bfd/bfd.h $(INCDIR)/symcat.h'
 
 AC_SUBST(BFDLIB)
 AC_SUBST(OPCODES_LIB)
@@ -701,6 +667,8 @@ GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers)
 GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers)
 GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers)
 
+AC_CHECK_DECLS([vsnprintf])
+
 dnl This must come last.
 
 dnl We used to make symlinks to files in the source directory, but now