From: Ian Lance Taylor Date: Fri, 28 Mar 1997 19:25:01 +0000 (+0000) Subject: From Ralf Baechle : X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=515c71428defaa37c730c2f6d7d22e90dd470fab;p=binutils-gdb.git From Ralf Baechle : * configure.in: Set emulations for mips-*-linux*-*. * configure: Rebuild. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 08af885d8f4..79c7ceed071 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,9 @@ Fri Mar 28 13:08:33 1997 Ian Lance Taylor + From Ralf Baechle : + * configure.in: Set emulations for mips-*-linux*-*. + * configure: Rebuild. + * config/tc-mips.c (struct mips_set_options): Define. (mips_opts): New static variable. (mips_isa): Remove. Now a field in mips_opts. Change all diff --git a/gas/configure b/gas/configure index f2a907a35cc..c62593b19a0 100755 --- a/gas/configure +++ b/gas/configure @@ -879,6 +879,7 @@ for this_target in $target $canon_targets ; do 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*) @@ -898,6 +899,7 @@ for this_target in $target $canon_targets ; do esac ;; ppc-*-aix*) fmt=coff ;; + ppc-*-beos*) fmt=coff ;; ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*) fmt=elf case "$endian" in @@ -1017,8 +1019,6 @@ EOF ;; esac -# additional parsers based on cpu-type - case ${cpu_type} in m68k) case ${extra_objects} in @@ -1030,23 +1030,22 @@ EOF 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. @@ -1070,6 +1069,11 @@ EOF 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" ;; @@ -1077,6 +1081,10 @@ EOF 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 @@ -1189,6 +1197,10 @@ for em in . $emulations ; do 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" @@ -1287,15 +1299,6 @@ cat >> confdefs.h <> confdefs.h <<\EOF #define BFD_ASSEMBLER 1 @@ -1418,7 +1420,7 @@ EOF # 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 @@ -1447,7 +1449,7 @@ if test -z "$CC"; then # 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 @@ -1495,7 +1497,7 @@ fi 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. @@ -1505,11 +1507,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&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 @@ -1529,12 +1531,12 @@ if test $ac_cv_prog_cc_works = no; 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 @@ -1543,7 +1545,7 @@ 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 @@ -1558,7 +1560,7 @@ if test $ac_cv_prog_gcc = yes; then 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 @@ -1596,7 +1598,7 @@ fi # 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 @@ -1647,7 +1649,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' 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= @@ -1662,13 +1664,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < 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 : @@ -1679,13 +1681,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < 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 : @@ -1711,17 +1713,17 @@ for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h e 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 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* @@ -1751,7 +1753,7 @@ done # 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 @@ -1766,19 +1768,19 @@ echo "$ac_t""$cross_gas" 1>&6 # 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 < 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 @@ -1799,12 +1801,12 @@ EOF 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 <&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 @@ -1859,12 +1861,12 @@ EOF 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 <&6 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 <&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 @@ -1944,7 +1946,7 @@ done 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 @@ -1952,7 +1954,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&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 @@ -1993,21 +1995,21 @@ EOF 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 <&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 @@ -2037,12 +2039,12 @@ esac 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 <&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 @@ -2094,12 +2096,12 @@ done 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 <&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 @@ -2151,12 +2153,12 @@ done # 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 < #include @@ -2172,7 +2174,7 @@ assert (a == b ; 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 @@ -2213,12 +2215,12 @@ gas_test_headers=" " 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 <&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 @@ -2250,12 +2252,12 @@ EOF 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 <&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 @@ -2287,12 +2289,12 @@ EOF 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 <&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 @@ -2324,12 +2326,12 @@ EOF 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 <&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 @@ -2364,12 +2366,12 @@ EOF # 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 <&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 @@ -2456,6 +2458,8 @@ esac + + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -2607,6 +2611,7 @@ s%@target_frag@%%g 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 @@ -2828,57 +2833,18 @@ cat >> $CONFIG_STATUS <<\EOF fi fi; done -EOF - -cat >> $CONFIG_STATUS <> $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 <> $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 diff --git a/gas/configure.in b/gas/configure.in index bd28052a464..d102e31e642 100644 --- a/gas/configure.in +++ b/gas/configure.in @@ -226,6 +226,7 @@ changequote([,])dnl 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*) @@ -245,6 +246,7 @@ changequote([,])dnl esac ;; ppc-*-aix*) fmt=coff ;; + ppc-*-beos*) fmt=coff ;; ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*) fmt=elf case "$endian" in @@ -367,19 +369,19 @@ changequote([,])dnl ;; 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 ;; @@ -408,6 +410,11 @@ changequote([,])dnl 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" ;; @@ -415,6 +422,10 @@ changequote([,])dnl 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 @@ -509,6 +520,10 @@ for em in . $emulations ; do 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" @@ -544,15 +559,6 @@ AC_SUBST(extra_objects) 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 @@ -569,11 +575,10 @@ esac 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 ;; @@ -771,4 +776,19 @@ AC_SUBST(HLDENV) 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}])