mips-*-irix6*) fmt=elf targ=mips-big ;;
mips-*-irix5*) fmt=elf targ=mips-big ;;
mips-*-irix*) fmt=ecoff targ=mips-big ;;
+ mips-*-lnews*) fmt=ecoff targ=mips-lit em=lnews ;;
mips-*-riscos*) fmt=ecoff targ=mips-big ;;
mips-*-sysv*) fmt=ecoff targ=mips-big ;;
mips-*-elf* | mips-*-rtems* | mips-*-linux*)
esac
;;
ppc-*-aix*) fmt=coff ;;
+ ppc-*-beos*) fmt=coff ;;
ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
fmt=elf
case "$endian" in
;;
esac
-# additional parsers based on cpu-type
-
case ${cpu_type} in
m68k)
case ${extra_objects} in
mips)
echo ${extra_objects} | grep -s "itbl-parse.o"
if test $? -ne 0 ; then
- extra_objects="$extra_objects itbl-parse.o"
+ extra_objects="$extra_objects itbl-parse.o"
fi
echo ${extra_objects} | grep -s "itbl-lex.o"
if test $? -ne 0 ; then
- extra_objects="$extra_objects itbl-lex.o"
+ extra_objects="$extra_objects itbl-lex.o"
fi
echo ${extra_objects} | grep -s "itbl-ops.o"
if test $? -ne 0 ; then
- extra_objects="$extra_objects itbl-ops.o"
+ extra_objects="$extra_objects itbl-ops.o"
fi
;;
*)
;;
-
esac
# See if we really can support this configuration with the emulation code.
case ${generic_target}-${fmt} in
mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
+ mips-*-linux*-*) case "$endian" in
+ big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
+ *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
+ esac ;;
+ mips-*-lnews*-ecoff) ;;
mips-*-*-ecoff) case "$endian" in
big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
*) emulation="mipslecoff mipsbecoff mipsecoff" ;;
mips-*-*-elf) case "$endian" in
big) emulation="mipsbelf mipslelf mipself" ;;
*) emulation="mipslelf mipsbelf mipself" ;;
+ # Uncommenting the next line will turn on support for i386 COFF
+ # in any i386 ELF configuration. This probably doesn't work
+ # correctly.
+ # i386-*-*-elf) emulation="i386coff i386elf" ;;
esac ;;
esac
fmt=elf file=mipself ;;
mipsbecoff | mipslecoff)
fmt=ecoff file=mipsecoff ;;
+ i386coff)
+ fmt=coff file=i386coff ;;
+ i386elf)
+ fmt=elf file=i386elf ;;
esac
formats="$formats $fmt"
emfiles="$emfiles e-$file.o"
EOF
-files="config/tc-${target_cpu_type}.c config/tc-${target_cpu_type}.h \
- config/obj-${obj_format}.h config/obj-${obj_format}.c \
- config/te-${te_file}.h config/atof-${atof}.c \
- config/itbl-${target_cpu_type}.h \
- $extra_files"
-links="targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c \
- itbl-cpu.h \
- $extra_links"
-
case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
yes-*-coff) need_bfd=yes ;;
no-*-coff) need_bfd=yes
-
case "${primary_bfd_gas}" in
yes) cat >> confdefs.h <<\EOF
#define BFD_ASSEMBLER 1
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1397: checking for $ac_word" >&5
+echo "configure:1424: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1426: checking for $ac_word" >&5
+echo "configure:1453: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1474: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1501: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 1484 "configure"
+#line 1511 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1508: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1535: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1513: checking whether we are using GNU C" >&5
+echo "configure:1540: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1537: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1564: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1575: checking for a BSD compatible install" >&5
+echo "configure:1602: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1626: checking how to run the C preprocessor" >&5
+echo "configure:1653: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1641 "configure"
+#line 1668 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1658 "configure"
+#line 1685 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1690: checking for $ac_hdr" >&5
+echo "configure:1717: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1695 "configure"
+#line 1722 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
# Put this here so that autoconf's "cross-compiling" message doesn't confuse
# people who are not cross-compiling but are compiling cross-assemblers.
echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
-echo "configure:1730: checking whether compiling a cross-assembler" >&5
+echo "configure:1757: checking whether compiling a cross-assembler" >&5
if test "${host}" = "${target}"; then
cross_gas=no
else
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1745: checking for working alloca.h" >&5
+echo "configure:1772: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1750 "configure"
+#line 1777 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1778: checking for alloca" >&5
+echo "configure:1805: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1783 "configure"
+#line 1810 "configure"
#include "confdefs.h"
#ifdef __GNUC__
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1838: checking whether alloca needs Cray hooks" >&5
+echo "configure:1865: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1843 "configure"
+#line 1870 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1868: checking for $ac_func" >&5
+echo "configure:1895: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1873 "configure"
+#line 1900 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1923: checking stack direction for C alloca" >&5
+echo "configure:1950: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1931 "configure"
+#line 1958 "configure"
#include "confdefs.h"
find_stack_direction ()
{
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:1950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1972: checking for inline" >&5
+echo "configure:1999: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1979 "configure"
+#line 2006 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
for ac_func in unlink remove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2016: checking for $ac_func" >&5
+echo "configure:2043: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2021 "configure"
+#line 2048 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
for ac_func in sbrk
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2073: checking for $ac_func" >&5
+echo "configure:2100: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2078 "configure"
+#line 2105 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
# enough, but on some of those systems, the assert macro relies on requoting
# working properly!
echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
-echo "configure:2130: checking for working assert macro" >&5
+echo "configure:2157: checking for working assert macro" >&5
if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2135 "configure"
+#line 2162 "configure"
#include "confdefs.h"
#include <assert.h>
#include <stdio.h>
; return 0; }
EOF
-if { (eval echo configure:2151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_assert_ok=yes
else
"
echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6
-echo "configure:2192: checking whether declaration is required for strstr" >&5
+echo "configure:2219: checking whether declaration is required for strstr" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2197 "configure"
+#line 2224 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
; return 0; }
EOF
-if { (eval echo configure:2208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_strstr=no
else
echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
-echo "configure:2229: checking whether declaration is required for malloc" >&5
+echo "configure:2256: checking whether declaration is required for malloc" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2234 "configure"
+#line 2261 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
; return 0; }
EOF
-if { (eval echo configure:2245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_malloc=no
else
echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
-echo "configure:2266: checking whether declaration is required for free" >&5
+echo "configure:2293: checking whether declaration is required for free" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2271 "configure"
+#line 2298 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
; return 0; }
EOF
-if { (eval echo configure:2282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_free=no
else
echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6
-echo "configure:2303: checking whether declaration is required for sbrk" >&5
+echo "configure:2330: checking whether declaration is required for sbrk" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2308 "configure"
+#line 2335 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
; return 0; }
EOF
-if { (eval echo configure:2319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_sbrk=no
else
# for it?
echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
-echo "configure:2343: checking whether declaration is required for errno" >&5
+echo "configure:2370: checking whether declaration is required for errno" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2348 "configure"
+#line 2375 "configure"
#include "confdefs.h"
#ifdef HAVE_ERRNO_H
; return 0; }
EOF
-if { (eval echo configure:2363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_errno=no
else
+
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
s%@extra_objects@%$extra_objects%g
s%@target_cpu_type@%$target_cpu_type%g
s%@obj_format@%$obj_format%g
+s%@te_file@%$te_file%g
s%@atof@%$atof%g
s%@OPCODES_DEP@%$OPCODES_DEP%g
s%@OPCODES_LIB@%$OPCODES_LIB%g
fi
fi; done
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-ac_sources="$files"
-ac_dests="$links"
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-srcdir=$ac_given_srcdir
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
-
- echo "linking $srcdir/$ac_source to $ac_dest"
-
- if test ! -r $srcdir/$ac_source; then
- { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
- fi
- rm -f $ac_dest
-
- # Make relative symlinks.
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
- # The dest file is in a subdirectory.
- test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
- ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dest_dir_suffix.
- ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dest_dir_suffix= ac_dots=
- fi
-
- case "$srcdir" in
- [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
- *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
- esac
-
- # Make a symlink if possible; otherwise try a hard link.
- if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
- ln $srcdir/$ac_source $ac_dest; then :
- else
- { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
- fi
-done
EOF
cat >> $CONFIG_STATUS <<EOF
-
+target_cpu_type=${target_cpu_type}
+ obj_format=${obj_format}
+ te_file=${te_file}
EOF
cat >> $CONFIG_STATUS <<\EOF
-
+rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
+ echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
+ echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
+ echo '#include "te-'"${te_file}"'.h"' > targ-env.h
+ echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
exit 0
EOF
chmod +x $CONFIG_STATUS
mips-*-irix6*) fmt=elf targ=mips-big ;;
mips-*-irix5*) fmt=elf targ=mips-big ;;
mips-*-irix*) fmt=ecoff targ=mips-big ;;
+ mips-*-lnews*) fmt=ecoff targ=mips-lit em=lnews ;;
mips-*-riscos*) fmt=ecoff targ=mips-big ;;
mips-*-sysv*) fmt=ecoff targ=mips-big ;;
mips-*-elf* | mips-*-rtems* | mips-*-linux*)
esac
;;
ppc-*-aix*) fmt=coff ;;
+ ppc-*-beos*) fmt=coff ;;
ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
fmt=elf
case "$endian" in
;;
mips)
- `echo ${extra_objects}` | grep -s "itbl-parse.o"
+ echo ${extra_objects} | grep -s "itbl-parse.o"
if test $? -ne 0 ; then
- extra_objects="$extra_objects itbl-parse.o"
+ extra_objects="$extra_objects itbl-parse.o"
fi
- `echo ${extra_objects}` | grep -s "itbl-lex.o"
+ echo ${extra_objects} | grep -s "itbl-lex.o"
if test $? -ne 0 ; then
- extra_objects="$extra_objects itbl-lex.o"
+ extra_objects="$extra_objects itbl-lex.o"
fi
- `echo ${extra_objects}` | grep -s "itbl-ops.o"
+ echo ${extra_objects} | grep -s "itbl-ops.o"
if test $? -ne 0 ; then
- extra_objects="$extra_objects itbl-ops.o"
+ extra_objects="$extra_objects itbl-ops.o"
fi
;;
case ${generic_target}-${fmt} in
mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
+ mips-*-linux*-*) case "$endian" in
+ big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
+ *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
+ esac ;;
+ mips-*-lnews*-ecoff) ;;
mips-*-*-ecoff) case "$endian" in
big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
*) emulation="mipslecoff mipsbecoff mipsecoff" ;;
mips-*-*-elf) case "$endian" in
big) emulation="mipsbelf mipslelf mipself" ;;
*) emulation="mipslelf mipsbelf mipself" ;;
+ # Uncommenting the next line will turn on support for i386 COFF
+ # in any i386 ELF configuration. This probably doesn't work
+ # correctly.
+ # i386-*-*-elf) emulation="i386coff i386elf" ;;
esac ;;
esac
fmt=elf file=mipself ;;
mipsbecoff | mipslecoff)
fmt=ecoff file=mipsecoff ;;
+ i386coff)
+ fmt=coff file=i386coff ;;
+ i386elf)
+ fmt=elf file=i386elf ;;
esac
formats="$formats $fmt"
emfiles="$emfiles e-$file.o"
AC_DEFINE_UNQUOTED(EMULATIONS, $EMULATIONS)
AC_DEFINE_UNQUOTED(DEFAULT_EMULATION, "$DEFAULT_EMULATION")
-files="config/tc-${target_cpu_type}.c config/tc-${target_cpu_type}.h \
- config/obj-${obj_format}.h config/obj-${obj_format}.c \
- config/te-${te_file}.h config/atof-${atof}.c \
- config/itbl-${target_cpu_type}.h \
- $extra_files"
-links="targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c \
- itbl-cpu.h \
- $extra_links"
-
case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
yes-*-coff) need_bfd=yes ;;
no-*-coff) need_bfd=yes
AC_SUBST(target_cpu_type)
AC_SUBST(obj_format)
+AC_SUBST(te_file)
AC_SUBST(atof)
dnl AC_SUBST(emulation)
-AC_LINK_FILES($files, $links)
-
case "${primary_bfd_gas}" in
yes) AC_DEFINE(BFD_ASSEMBLER)
need_bfd=yes ;;
AC_SUBST(RPATH_ENVVAR)
dnl This must come last.
-AC_OUTPUT(Makefile doc/Makefile .gdbinit:gdbinit.in)
+
+dnl We used to make symlinks to files in the source directory, but now
+dnl we just use the right name for .c files, and create .h files in
+dnl the build directory which include the right .h file. Make sure
+dnl the old symlinks don't exist, so that a reconfigure in an existing
+dnl directory behaves reasonably.
+
+AC_OUTPUT(Makefile doc/Makefile .gdbinit:gdbinit.in,
+[rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
+ echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
+ echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
+ echo '#include "te-'"${te_file}"'.h"' > targ-env.h
+ echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h],
+[target_cpu_type=${target_cpu_type}
+ obj_format=${obj_format}
+ te_file=${te_file}])