1999-05-03 15:29:11 +08:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
dnl
|
|
|
|
dnl And be careful when changing it! If you must add tests with square
|
|
|
|
dnl brackets, be sure changequote invocations surround it.
|
|
|
|
dnl
|
|
|
|
dnl
|
|
|
|
dnl v2.5 needed for --bindir et al
|
2003-09-03 01:59:13 +08:00
|
|
|
AC_PREREQ(2.57)
|
1999-05-03 15:29:11 +08:00
|
|
|
AC_INIT(as.h)
|
|
|
|
|
2003-09-03 01:59:13 +08:00
|
|
|
dnl Autoconf 2.57 will find the aux dir without this. However, unless
|
|
|
|
dnl we specify this explicitly, automake-1.7 will assume that ylwrap is in
|
|
|
|
dnl gas/ instead of gas/../.
|
|
|
|
AC_CONFIG_AUX_DIR(..)
|
1999-05-03 15:29:11 +08:00
|
|
|
AC_CANONICAL_SYSTEM
|
2000-09-08 05:08:51 +08:00
|
|
|
AC_ISC_POSIX
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2001-02-27 14:43:56 +08:00
|
|
|
changequote(,)dnl
|
|
|
|
BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
|
|
|
|
changequote([,])dnl
|
|
|
|
AM_INIT_AUTOMAKE(gas, ${BFD_VERSION})
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
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
|
|
|
|
yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
|
|
|
|
;;
|
|
|
|
no) enable_targets= ;;
|
|
|
|
*) enable_targets=$enableval ;;
|
|
|
|
esac])dnl
|
|
|
|
AC_ARG_ENABLE(commonbfdlib,
|
|
|
|
[ --enable-commonbfdlib build shared BFD/opcodes/libiberty library],
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) commonbfdlib=true ;;
|
|
|
|
no) commonbfdlib=false ;;
|
|
|
|
*) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
|
|
|
|
esac])dnl
|
|
|
|
|
|
|
|
using_cgen=no
|
|
|
|
|
2001-08-10 18:56:47 +08:00
|
|
|
build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
|
2005-03-17 00:17:14 +08:00
|
|
|
|
2005-03-17 01:18:17 +08:00
|
|
|
AC_ARG_ENABLE(werror,
|
|
|
|
[ --enable-werror treat compile warnings as errors],
|
2005-03-17 00:17:14 +08:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes | y) ERROR_ON_WARNING="yes" ;;
|
|
|
|
no | n) ERROR_ON_WARNING="no" ;;
|
2005-03-17 01:18:17 +08:00
|
|
|
*) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
|
2005-03-17 00:17:14 +08:00
|
|
|
esac])
|
|
|
|
|
2005-03-17 01:18:17 +08:00
|
|
|
# Enable -Werror by default, suppressing it only for --disable-werror
|
2005-03-17 00:17:14 +08:00
|
|
|
# or --disable-build-warnings.
|
|
|
|
if test "${ERROR_ON_WARNING}" != no
|
|
|
|
then
|
|
|
|
build_warnings="$build_warnings -Werror"
|
|
|
|
fi
|
|
|
|
|
2000-04-09 20:17:43 +08:00
|
|
|
AC_ARG_ENABLE(build-warnings,
|
|
|
|
[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) ;;
|
|
|
|
no) build_warnings="-w";;
|
|
|
|
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
|
|
|
|
build_warnings="${build_warnings} ${t}";;
|
|
|
|
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
|
|
|
|
build_warnings="${t} ${build_warnings}";;
|
|
|
|
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
|
|
|
|
esac
|
|
|
|
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
|
|
|
|
echo "Setting warning flags = $build_warnings" 6>&1
|
|
|
|
fi])dnl
|
|
|
|
WARN_CFLAGS=""
|
|
|
|
if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
|
|
|
|
WARN_CFLAGS="${build_warnings}"
|
|
|
|
fi
|
|
|
|
AC_SUBST(WARN_CFLAGS)
|
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
# Generate a header file
|
|
|
|
AM_CONFIG_HEADER(config.h:config.in)
|
|
|
|
|
1999-08-08 23:56:55 +08:00
|
|
|
# If we are on a DOS filesystem, we must use gdb.ini rather than
|
|
|
|
# .gdbinit.
|
|
|
|
case "${host}" in
|
2002-11-12 01:21:33 +08:00
|
|
|
*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-windows*)
|
1999-08-08 23:56:55 +08:00
|
|
|
GDBINIT="gdb.ini"
|
2003-09-03 01:59:13 +08:00
|
|
|
AC_CONFIG_FILES(gdb.ini:gdbinit.in)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
GDBINIT=".gdbinit"
|
|
|
|
AC_CONFIG_FILES(.gdbinit:gdbinit.in)
|
1999-08-08 23:56:55 +08:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_SUBST(GDBINIT)
|
|
|
|
|
2005-03-01 08:43:58 +08:00
|
|
|
#We need this for the host. BOUT header is in host order.
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
te_file=generic
|
|
|
|
|
|
|
|
# Makefile target for installing gas in $(tooldir)/bin.
|
|
|
|
install_tooldir=install-exec-tooldir
|
|
|
|
|
|
|
|
canon_targets=""
|
2000-03-03 04:15:33 +08:00
|
|
|
all_targets=no
|
1999-05-03 15:29:11 +08:00
|
|
|
if test -n "$enable_targets" ; then
|
|
|
|
for t in `echo $enable_targets | sed 's/,/ /g'`; do
|
2000-03-03 04:15:33 +08:00
|
|
|
if test $t = "all"; then
|
|
|
|
all_targets=yes
|
|
|
|
continue
|
|
|
|
fi
|
1999-09-15 07:29:35 +08:00
|
|
|
result=`$ac_config_sub $t 2>/dev/null`
|
1999-05-03 15:29:11 +08:00
|
|
|
if test -n "$result" ; then
|
|
|
|
canon_targets="$canon_targets $result"
|
|
|
|
# else
|
|
|
|
# # Permit "all", etc. We don't support it yet though.
|
|
|
|
# canon_targets="$canon_targets $t"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
GAS_UNIQ(canon_targets)
|
|
|
|
fi
|
|
|
|
|
|
|
|
emulations=""
|
|
|
|
|
|
|
|
for this_target in $target $canon_targets ; do
|
|
|
|
|
2004-12-22 23:29:25 +08:00
|
|
|
targ=${this_target}
|
|
|
|
. ${srcdir}/configure.tgt
|
|
|
|
|
|
|
|
case ${target_cpu} in
|
|
|
|
crisv32)
|
|
|
|
AC_DEFINE_UNQUOTED(DEFAULT_CRIS_ARCH, $arch,
|
|
|
|
[Default CRIS architecture.])
|
|
|
|
;;
|
1999-05-03 15:29:11 +08:00
|
|
|
esac
|
|
|
|
|
|
|
|
if test ${this_target} = $target ; then
|
|
|
|
target_cpu_type=${cpu_type}
|
|
|
|
elif test ${target_cpu_type} != ${cpu_type} ; then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
2004-12-22 23:29:25 +08:00
|
|
|
generic_target=${cpu_type}-${target_vendor}-${target_os}
|
1999-05-03 15:29:11 +08:00
|
|
|
case ${generic_target} in
|
2004-12-22 23:29:25 +08:00
|
|
|
i386-*-sco3.2v5*)
|
|
|
|
if test ${this_target} = $target; then
|
|
|
|
AC_DEFINE(SCO_ELF, 1, [Define if defaulting to ELF on SCO 5.])
|
|
|
|
fi
|
|
|
|
;;
|
2004-07-08 01:28:53 +08:00
|
|
|
|
2002-08-09 11:42:15 +08:00
|
|
|
i386-*-msdosdjgpp* \
|
|
|
|
| i386-*-go32* \
|
2004-12-22 23:29:25 +08:00
|
|
|
| i386-go32-rtems*)
|
|
|
|
AC_DEFINE(STRICTCOFF, 1, [Using strict COFF?])
|
|
|
|
;;
|
2002-08-09 11:42:15 +08:00
|
|
|
|
2004-12-22 23:29:25 +08:00
|
|
|
i860-*-*)
|
|
|
|
AC_MSG_WARN(GAS support for ${generic_target} is preliminary and a work in progress)
|
|
|
|
;;
|
2002-08-09 11:42:15 +08:00
|
|
|
|
2004-12-22 23:29:25 +08:00
|
|
|
mips-sony-bsd*)
|
|
|
|
;;
|
2002-08-09 11:42:15 +08:00
|
|
|
mips-*-bsd*)
|
2004-12-22 23:29:25 +08:00
|
|
|
AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.)
|
|
|
|
;;
|
2004-08-16 16:25:44 +08:00
|
|
|
|
2004-12-22 23:29:25 +08:00
|
|
|
ppc-*-aix5.*)
|
|
|
|
AC_DEFINE(AIX_WEAK_SUPPORT, 1,
|
2003-12-03 23:07:17 +08:00
|
|
|
[Define if using AIX 5.2 value for C_WEAKEXT.])
|
2004-12-22 23:29:25 +08:00
|
|
|
;;
|
|
|
|
ppc-*-linux-gnu*)
|
|
|
|
case "$endian" in
|
|
|
|
big) ;;
|
|
|
|
*) AC_MSG_ERROR(GNU/Linux must be configured big endian) ;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
ppc-*-solaris*)
|
|
|
|
if test ${this_target} = $target; then
|
|
|
|
AC_DEFINE(TARGET_SOLARIS_COMMENT, 1,
|
|
|
|
[Define if default target is PowerPC Solaris.])
|
|
|
|
fi
|
|
|
|
if test x${endian} = xbig; then
|
|
|
|
AC_MSG_ERROR(Solaris must be configured little endian)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
sh*-*-symbianelf*)
|
|
|
|
AC_DEFINE(TARGET_SYMBIAN, 1, [Define if target is Symbian OS.])
|
|
|
|
;;
|
1999-05-03 15:29:11 +08:00
|
|
|
esac
|
|
|
|
|
|
|
|
if test ${this_target} = $target ; then
|
|
|
|
endian_def=
|
|
|
|
if test x${endian} = xbig; then
|
|
|
|
endian_def=1
|
|
|
|
elif test x${endian} = xlittle; then
|
|
|
|
endian_def=0
|
|
|
|
fi
|
|
|
|
if test x${endian_def} != x; then
|
|
|
|
AC_DEFINE_UNQUOTED(TARGET_BYTES_BIG_ENDIAN, $endian_def,
|
|
|
|
[Define as 1 if big endian.])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Other random stuff.
|
|
|
|
|
[gas/]
* doc/c-mips.texi: Remove -mcpu. Document -mabi.
* configure.in (MIPS_CPU_STRING_DEFAULT): New configuration macro.
(USE_E_MIPS_ABI_O32, MIPS_DEFAULT_64BIT): New configuration macros.
* configure, config.in: Regenerate.
* config/tc-mips.c (file_mips_abi): Rename to mips_abi.
(mips_set_options): Remove "abi" field.
(mips_opts): Update accordingly. Replace all uses of mips_opts.abi
with mips_abi.
(mips_cpu): Remove.
(mips_arch_string, mips_arch_info): New vars.
(mips_tune_string, mips_tune_info): New vars.
(ABI_NEEDS_32BIT_REGS, ABI_NEEDS_64BIT_REGS): New macros.
(HAVE_32BIT_GPRS, HAVE_32BIT_FPRS): Don't check the ABI.
(mips_isa_to_str, mips_cpu_to_str): Remove.
(mips_ip): If the selected architecture is a generic ISA rather
than a processor, only mention the ISA level in error messages.
(OPTION_MCPU): Remove.
(OPTION_FP64): New.
(md_longopts): Add -mfp64, remove -mcpu.
(mips_set_option_string): New fn.
(md_parse_option): Make -mipsN update file_mips_isa rather than
mips_opts.isa. Use mips_set_option_string to set -march or -mtune.
Don't let -mgp32 and -mfp32 change the ABI.
(show): Move to end of file. Constify string argument.
(md_show_usage): Move to the end of the file. Read available
architectures from mips_cpu_info_table.
(mips_set_architecture): New fn.
(mips_after_parse_args): Rework. Remove -mcpu handling. -mipsN
is an alias for -march=mipsN. Don't change the ABI based on other
flags. Infer the register size from the ABI as well as the
architecture. Complain about more conflicting arguments.
Unify logic with GCC.
(s_mipsset): Don't change the ABI.
(mips_elf_final_processing): Check USE_E_MIPS_ABI_O32.
(mips_cpu_info_table): Remove Generic-MIPS* entries, keeping just
"mipsN"-type entries. Remove entries that vary only in the
manufacturer's prefix, or that have "000" replaced by "k".
Remove TARGET_CPU entries. Make r2000 entry use CPU_R3000.
(mips_strict_matching_cpu_name_p, mips_matching_cpu_name_p): New fns.
(mips_parse_cpu): New fn.
(mips_cpu_info_from_name, mips_cpu_info_from_cpu): Remove.
(mips_cpu_info_from_isa): Minor formatting tweak.
[gas/testsuite]
* gas/mips/mips-gp32-fp64.d,
* gas/mips/mips-gp32-fp64-pic.d: Add -mfp64.
2002-07-25 17:48:07 +08:00
|
|
|
case ${cpu_type} in
|
|
|
|
mips)
|
|
|
|
# Set mips_cpu to the name of the default CPU.
|
|
|
|
case ${target_cpu} in
|
|
|
|
mips | mipsbe | mipseb | mipsle | mipsel | mips64 | mips64el)
|
|
|
|
mips_cpu=from-abi
|
|
|
|
;;
|
|
|
|
mipsisa32 | mipsisa32el)
|
|
|
|
mips_cpu=mips32
|
|
|
|
;;
|
[ bfd/ChangeLog ]
2002-12-30 Chris Demetriou <cgd@broadcom.com>
* aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
* archures.c (bfd_mach_mipsisa32r2): New define.
* bfd-in2.h: Regenerate.
* cpu-mips.c (I_mipsisa32r2): New enum value.
(arch_info_struct): Add entry for I_mipsisa32r2.
* elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
(_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
(_bfd_mips_elf_final_write_processing): Add
bfd_mach_mipsisa32r2 case.
(_bfd_mips_elf_merge_private_bfd_data): Handle merging of
binaries marked as using MIPS32 Release 2.
[ binutils/ChangeLog ]
2002-12-30 Chris Demetriou <cgd@broadcom.com>
* doc/binutils.texi (objdump): Note MIPS HWR (Hardware Register)
changes in MIPS -M options.
[ gas/ChangeLog ]
2002-12-30 Chris Demetriou <cgd@broadcom.com>
* configure.in: Recognize mipsisa32r2, mipsisa32r2el, and
CPU variants.
* configure: Regenerate.
* config/tc-mips.c (ISA_HAS_DROR, ISA_HAS_ROR): New defines.
(macro_build): Handle "K" operand.
(macro2): Use ISA_HAS_DROR and ISA_HAS_ROR in the places where
CPU_HAS_DROR and CPU_HAS_ROR are currently used.
(mips_ip): New variable "lastpos", and implement "+A", "+B",
and "+C" operands for MIPS32 Release 2 ins/ext instructions.
Implement "K" operand for MIPS32 Release 2 rdhwr instruction.
(validate_mips_insn): Implement "+" as a way to extend the
allowed operands, and implement "K", "+A", "+B", and "+C"
operands.
(OPTION_MIPS32R2): New define.
(md_longopts): Add entry for OPTION_MIPS32R2.
(OPTION_ELF_BASE): Adjust to accomodate OPTIONS_MIPS32R2.
(md_parse_option): Handle OPTION_MIPS32R2.
(s_mipsset): Reimplement handling of ".set mipsN" options
and add support for ".set mips32r2".
(mips_cpu_info_table): Add entry for "mips32r2" (MIPS32 Release 2).
(md_show_usage): Document "-mips32r2" option.
* doc/as.texinfo: Document "-mips32r2" option.
* doc/c-mips.texi: Likewise.
[ gas/testsuite/ChangeLog ]
2002-12-30 Chris Demetriou <cgd@broadcom.com>
* gas/mips/cp0-names-mips32r2.d: New test.
* gas/mips/hwr-names-mips32r2.d: New test.
* gas/mips/hwr-names-numeric.d: New test.
* gas/mips/hwr-names.s: New test source file.
* gas/mips/mips32r2.d: New test.
* gas/mips/mips32r2.s: New test source file.
* gas/mips/mips32r2-ill.l: New test.
* gas/mips/mips32r2-ill.s: New test source file.
* gas/mips/mips.exp: Add mips32r2 architecture data array
entry. Run new tests mentioned above.
[ include/elf/ChangeLog ]
2002-12-30 Chris Demetriou <cgd@broadcom.com>
* mips.h (E_MIPS_ARCH_32R2): New define.
[ include/opcode/ChangeLog ]
2002-12-30 Chris Demetriou <cgd@broadcom.com>
* mips.h: Document "+" as the start of two-character operand
type names, and add new "K", "+A", "+B", and "+C" operand types.
(OP_MASK_INSMSB, OP_SH_INSMSB, OP_MASK_EXTMSB)
(OP_SH_EXTMSB, INSN_ISA32R2, ISA_MIPS32R2, CPU_MIPS32R2): New
defines.
[ opcodes/ChangeLog ]
2002-12-30 Chris Demetriou <cgd@broadcom.com>
* mips-dis.c (mips_cp0_names_mips3264r2, mips_hwr_names_numeric)
(mips_hwr_names_mips3264r2): New arrays.
(mips_arch_choice): New "hwr_names" member.
(mips_arch_choices): Adjust for structure change, and add a new
entry for "mips32r2" ISA.
(mips_hwr_names): New variable.
(set_default_mips_dis_options): Set mips_hwr_names.
(parse_mips_dis_option): New "hwr-names" option which sets
mips_hwr_names, and adjust "reg-names=ARCH" to set mips_hwr_names.
(print_insn_arg): Change return type to "int"
and use that to indicate number of characters consumed.
Add support for "+" operand extension character, "+A", "+B",
"+C", and "K" operands.
(print_insn_mips): Adjust for changes to print_insn_arg.
(print_mips_disassembler_options): Adjust for "hwr-names"
addition and "reg-names" change.
* mips-opc (I33): New define (shorthand for INSN_ISA32R2).
(mips_builtin_opcodes): Note that "nop" and "ssnop" are special
forms of "sll". Add new MIPS32 Release 2 instructions: ehb,
di, ei, ext, ins, jr.hb, jalr.hb, mfhc1, mfhc2, mthc1, mthc2,
rdhwr, rdpgpr, seb, seh, synci, wrpgpr, wsbh.
Note that hardware rotate instructions (ror, rorv) can be
used on MIPS32 Release 2, and add the official mnemonics
for them (rotr, rotrv) and the similar "rotl" mnemonic for
left-rotate.
2002-12-31 15:29:29 +08:00
|
|
|
mipsisa32r2 | mipsisa32r2el)
|
|
|
|
mips_cpu=mips32r2
|
|
|
|
;;
|
[gas/]
* doc/c-mips.texi: Remove -mcpu. Document -mabi.
* configure.in (MIPS_CPU_STRING_DEFAULT): New configuration macro.
(USE_E_MIPS_ABI_O32, MIPS_DEFAULT_64BIT): New configuration macros.
* configure, config.in: Regenerate.
* config/tc-mips.c (file_mips_abi): Rename to mips_abi.
(mips_set_options): Remove "abi" field.
(mips_opts): Update accordingly. Replace all uses of mips_opts.abi
with mips_abi.
(mips_cpu): Remove.
(mips_arch_string, mips_arch_info): New vars.
(mips_tune_string, mips_tune_info): New vars.
(ABI_NEEDS_32BIT_REGS, ABI_NEEDS_64BIT_REGS): New macros.
(HAVE_32BIT_GPRS, HAVE_32BIT_FPRS): Don't check the ABI.
(mips_isa_to_str, mips_cpu_to_str): Remove.
(mips_ip): If the selected architecture is a generic ISA rather
than a processor, only mention the ISA level in error messages.
(OPTION_MCPU): Remove.
(OPTION_FP64): New.
(md_longopts): Add -mfp64, remove -mcpu.
(mips_set_option_string): New fn.
(md_parse_option): Make -mipsN update file_mips_isa rather than
mips_opts.isa. Use mips_set_option_string to set -march or -mtune.
Don't let -mgp32 and -mfp32 change the ABI.
(show): Move to end of file. Constify string argument.
(md_show_usage): Move to the end of the file. Read available
architectures from mips_cpu_info_table.
(mips_set_architecture): New fn.
(mips_after_parse_args): Rework. Remove -mcpu handling. -mipsN
is an alias for -march=mipsN. Don't change the ABI based on other
flags. Infer the register size from the ABI as well as the
architecture. Complain about more conflicting arguments.
Unify logic with GCC.
(s_mipsset): Don't change the ABI.
(mips_elf_final_processing): Check USE_E_MIPS_ABI_O32.
(mips_cpu_info_table): Remove Generic-MIPS* entries, keeping just
"mipsN"-type entries. Remove entries that vary only in the
manufacturer's prefix, or that have "000" replaced by "k".
Remove TARGET_CPU entries. Make r2000 entry use CPU_R3000.
(mips_strict_matching_cpu_name_p, mips_matching_cpu_name_p): New fns.
(mips_parse_cpu): New fn.
(mips_cpu_info_from_name, mips_cpu_info_from_cpu): Remove.
(mips_cpu_info_from_isa): Minor formatting tweak.
[gas/testsuite]
* gas/mips/mips-gp32-fp64.d,
* gas/mips/mips-gp32-fp64-pic.d: Add -mfp64.
2002-07-25 17:48:07 +08:00
|
|
|
mipsisa64 | mipsisa64el)
|
|
|
|
mips_cpu=mips64
|
|
|
|
;;
|
[ bfd/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* archures.c (bfd_mach_mipsisa64r2): New define.
* bfd-in2.h: Regenerate.
* aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
* cpu-mips.c (I_mipsisa64r2): New enum value.
(arch_info_struct): Add entry for I_mipsisa64r2.
* elfxx-mips.c (_bfd_elf_mips_mach)
(_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
(mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
(mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
[ binutils/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* readelf.c (get_machine_flags): Handle E_MIPS_ARCH_64R2.
[ gas/Changelog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* configure.in (mipsisa64r2, mipsisa64r2el, mipsisa64r2*): New CPUs.
* configure: Regenerate.
* config/tc-mips.c (imm2_expr): New variable.
(md_assemble, mips16_ip): Initialize imm2_expr.
(ISA_HAS_64BIT_REGS, ISA_HAS_DROR, ISA_HAS_ROR): Add ISA_MIPS64R2.
(macro_build): Handle +A, +B, +C, +E, +F, +G, and +H format operands.
(macro): Handle M_DEXT and M_DINS.
(validate_mips_insn): Handle +E, +F, +G, +H, and +I format operands.
(mips_ip): Likewise.
(OPTION_MIPS64R2): New define.
(md_longopts): New entry for -mips64r2 (OPTION_MIPS64R2).
OPTION_ASE_BASE): Increase to compensate for OPTION_MIPS64R2.
(md_parse_option): Handle OPTION_MIPS64R2.
(s_mipsset): Handle setting "mips64r2" ISA.
(mips_cpu_info_table): Add mips64r2.
(md_show_usage): Document -mips64r2 option.
* doc/as.texinfo: Docuemnt -mips64r2 option.
* doc/c-mips.texi: Likewise.
[ gas/testsuite/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* gas/mips/cp0-names-mips64r2.d: New file.
* gas/mips/cp0sel-names-mips64r2.d: New file.
* gas/mips/elf_arch_mips64r2.d: New file.
* gas/mips/hwr-names-mips64r2.d: New file.
* gas/mips/mips32r2-ill-fp64.l: New file.
* gas/mips/mips32r2-ill-fp64.s: New file.
* gas/mips/mips64r2-ill.l: New file.
* gas/mips/mips64r2-ill.s: New file.
* gas/mips/mips64r2.d: New file.
* gas/mips/mips64r2.s: New file.
* gas/mips/mips.exp: Define "mips64r2" arch, and run new tests.
[ include/elf/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* mips.h (E_MIPS_ARCH_64R2): New define.
[ include/opcode/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* mips.h: Document +E, +F, +G, +H, and +I operand types.
Update documentation of I, +B and +C operand types.
(INSN_ISA64R2, ISA_MIPS64R2, CPU_MIPS64R2): New defines.
(M_DEXT, M_DINS): New enum values.
[ ld/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* ldmain.c (get_emulation): Ignore "-mips64r2".
[ ld/testsuite/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* ld-mips-elf/mips-elf-flags.exp: Add tests for combinations
with MIPS64r2.
[ opcodes/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* mips-dis.c (mips_arch_choices): Add entry for "mips64r2"
(print_insn_args): Add handing for +E, +F, +G, and +H.
* mips-opc.c (I65): New define for MIPS64r2.
(mips_builtin_opcodes): Add "dext", "dextm", "dextu", "dins",
"dinsm", "dinsu", "drotl", "drotr", "drotr32", "drotrv", "dsbh",
and "dshd" for MIPS64r2. Adjust "dror", "dror32", and "drorv" to
be supported on MIPS64r2.
2003-10-01 00:17:15 +08:00
|
|
|
mipsisa64r2 | mipsisa64r2el)
|
|
|
|
mips_cpu=mips64r2
|
|
|
|
;;
|
[gas/]
* doc/c-mips.texi: Remove -mcpu. Document -mabi.
* configure.in (MIPS_CPU_STRING_DEFAULT): New configuration macro.
(USE_E_MIPS_ABI_O32, MIPS_DEFAULT_64BIT): New configuration macros.
* configure, config.in: Regenerate.
* config/tc-mips.c (file_mips_abi): Rename to mips_abi.
(mips_set_options): Remove "abi" field.
(mips_opts): Update accordingly. Replace all uses of mips_opts.abi
with mips_abi.
(mips_cpu): Remove.
(mips_arch_string, mips_arch_info): New vars.
(mips_tune_string, mips_tune_info): New vars.
(ABI_NEEDS_32BIT_REGS, ABI_NEEDS_64BIT_REGS): New macros.
(HAVE_32BIT_GPRS, HAVE_32BIT_FPRS): Don't check the ABI.
(mips_isa_to_str, mips_cpu_to_str): Remove.
(mips_ip): If the selected architecture is a generic ISA rather
than a processor, only mention the ISA level in error messages.
(OPTION_MCPU): Remove.
(OPTION_FP64): New.
(md_longopts): Add -mfp64, remove -mcpu.
(mips_set_option_string): New fn.
(md_parse_option): Make -mipsN update file_mips_isa rather than
mips_opts.isa. Use mips_set_option_string to set -march or -mtune.
Don't let -mgp32 and -mfp32 change the ABI.
(show): Move to end of file. Constify string argument.
(md_show_usage): Move to the end of the file. Read available
architectures from mips_cpu_info_table.
(mips_set_architecture): New fn.
(mips_after_parse_args): Rework. Remove -mcpu handling. -mipsN
is an alias for -march=mipsN. Don't change the ABI based on other
flags. Infer the register size from the ABI as well as the
architecture. Complain about more conflicting arguments.
Unify logic with GCC.
(s_mipsset): Don't change the ABI.
(mips_elf_final_processing): Check USE_E_MIPS_ABI_O32.
(mips_cpu_info_table): Remove Generic-MIPS* entries, keeping just
"mipsN"-type entries. Remove entries that vary only in the
manufacturer's prefix, or that have "000" replaced by "k".
Remove TARGET_CPU entries. Make r2000 entry use CPU_R3000.
(mips_strict_matching_cpu_name_p, mips_matching_cpu_name_p): New fns.
(mips_parse_cpu): New fn.
(mips_cpu_info_from_name, mips_cpu_info_from_cpu): Remove.
(mips_cpu_info_from_isa): Minor formatting tweak.
[gas/testsuite]
* gas/mips/mips-gp32-fp64.d,
* gas/mips/mips-gp32-fp64-pic.d: Add -mfp64.
2002-07-25 17:48:07 +08:00
|
|
|
mipstx39 | mipstx39el)
|
|
|
|
mips_cpu=r3900
|
|
|
|
;;
|
2002-10-14 14:59:06 +08:00
|
|
|
mips64vr | mips64vrel)
|
|
|
|
mips_cpu=vr4100
|
|
|
|
;;
|
[ bfd/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* archures.c (bfd_mach_mipsisa64r2): New define.
* bfd-in2.h: Regenerate.
* aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
* cpu-mips.c (I_mipsisa64r2): New enum value.
(arch_info_struct): Add entry for I_mipsisa64r2.
* elfxx-mips.c (_bfd_elf_mips_mach)
(_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
(mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
(mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
[ binutils/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* readelf.c (get_machine_flags): Handle E_MIPS_ARCH_64R2.
[ gas/Changelog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* configure.in (mipsisa64r2, mipsisa64r2el, mipsisa64r2*): New CPUs.
* configure: Regenerate.
* config/tc-mips.c (imm2_expr): New variable.
(md_assemble, mips16_ip): Initialize imm2_expr.
(ISA_HAS_64BIT_REGS, ISA_HAS_DROR, ISA_HAS_ROR): Add ISA_MIPS64R2.
(macro_build): Handle +A, +B, +C, +E, +F, +G, and +H format operands.
(macro): Handle M_DEXT and M_DINS.
(validate_mips_insn): Handle +E, +F, +G, +H, and +I format operands.
(mips_ip): Likewise.
(OPTION_MIPS64R2): New define.
(md_longopts): New entry for -mips64r2 (OPTION_MIPS64R2).
OPTION_ASE_BASE): Increase to compensate for OPTION_MIPS64R2.
(md_parse_option): Handle OPTION_MIPS64R2.
(s_mipsset): Handle setting "mips64r2" ISA.
(mips_cpu_info_table): Add mips64r2.
(md_show_usage): Document -mips64r2 option.
* doc/as.texinfo: Docuemnt -mips64r2 option.
* doc/c-mips.texi: Likewise.
[ gas/testsuite/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* gas/mips/cp0-names-mips64r2.d: New file.
* gas/mips/cp0sel-names-mips64r2.d: New file.
* gas/mips/elf_arch_mips64r2.d: New file.
* gas/mips/hwr-names-mips64r2.d: New file.
* gas/mips/mips32r2-ill-fp64.l: New file.
* gas/mips/mips32r2-ill-fp64.s: New file.
* gas/mips/mips64r2-ill.l: New file.
* gas/mips/mips64r2-ill.s: New file.
* gas/mips/mips64r2.d: New file.
* gas/mips/mips64r2.s: New file.
* gas/mips/mips.exp: Define "mips64r2" arch, and run new tests.
[ include/elf/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* mips.h (E_MIPS_ARCH_64R2): New define.
[ include/opcode/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* mips.h: Document +E, +F, +G, +H, and +I operand types.
Update documentation of I, +B and +C operand types.
(INSN_ISA64R2, ISA_MIPS64R2, CPU_MIPS64R2): New defines.
(M_DEXT, M_DINS): New enum values.
[ ld/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* ldmain.c (get_emulation): Ignore "-mips64r2".
[ ld/testsuite/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* ld-mips-elf/mips-elf-flags.exp: Add tests for combinations
with MIPS64r2.
[ opcodes/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* mips-dis.c (mips_arch_choices): Add entry for "mips64r2"
(print_insn_args): Add handing for +E, +F, +G, and +H.
* mips-opc.c (I65): New define for MIPS64r2.
(mips_builtin_opcodes): Add "dext", "dextm", "dextu", "dins",
"dinsm", "dinsu", "drotl", "drotr", "drotr32", "drotrv", "dsbh",
and "dshd" for MIPS64r2. Adjust "dror", "dror32", and "drorv" to
be supported on MIPS64r2.
2003-10-01 00:17:15 +08:00
|
|
|
mipsisa32r2* | mipsisa64r2*)
|
[ bfd/ChangeLog ]
2002-12-30 Chris Demetriou <cgd@broadcom.com>
* aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
* archures.c (bfd_mach_mipsisa32r2): New define.
* bfd-in2.h: Regenerate.
* cpu-mips.c (I_mipsisa32r2): New enum value.
(arch_info_struct): Add entry for I_mipsisa32r2.
* elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
(_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
(_bfd_mips_elf_final_write_processing): Add
bfd_mach_mipsisa32r2 case.
(_bfd_mips_elf_merge_private_bfd_data): Handle merging of
binaries marked as using MIPS32 Release 2.
[ binutils/ChangeLog ]
2002-12-30 Chris Demetriou <cgd@broadcom.com>
* doc/binutils.texi (objdump): Note MIPS HWR (Hardware Register)
changes in MIPS -M options.
[ gas/ChangeLog ]
2002-12-30 Chris Demetriou <cgd@broadcom.com>
* configure.in: Recognize mipsisa32r2, mipsisa32r2el, and
CPU variants.
* configure: Regenerate.
* config/tc-mips.c (ISA_HAS_DROR, ISA_HAS_ROR): New defines.
(macro_build): Handle "K" operand.
(macro2): Use ISA_HAS_DROR and ISA_HAS_ROR in the places where
CPU_HAS_DROR and CPU_HAS_ROR are currently used.
(mips_ip): New variable "lastpos", and implement "+A", "+B",
and "+C" operands for MIPS32 Release 2 ins/ext instructions.
Implement "K" operand for MIPS32 Release 2 rdhwr instruction.
(validate_mips_insn): Implement "+" as a way to extend the
allowed operands, and implement "K", "+A", "+B", and "+C"
operands.
(OPTION_MIPS32R2): New define.
(md_longopts): Add entry for OPTION_MIPS32R2.
(OPTION_ELF_BASE): Adjust to accomodate OPTIONS_MIPS32R2.
(md_parse_option): Handle OPTION_MIPS32R2.
(s_mipsset): Reimplement handling of ".set mipsN" options
and add support for ".set mips32r2".
(mips_cpu_info_table): Add entry for "mips32r2" (MIPS32 Release 2).
(md_show_usage): Document "-mips32r2" option.
* doc/as.texinfo: Document "-mips32r2" option.
* doc/c-mips.texi: Likewise.
[ gas/testsuite/ChangeLog ]
2002-12-30 Chris Demetriou <cgd@broadcom.com>
* gas/mips/cp0-names-mips32r2.d: New test.
* gas/mips/hwr-names-mips32r2.d: New test.
* gas/mips/hwr-names-numeric.d: New test.
* gas/mips/hwr-names.s: New test source file.
* gas/mips/mips32r2.d: New test.
* gas/mips/mips32r2.s: New test source file.
* gas/mips/mips32r2-ill.l: New test.
* gas/mips/mips32r2-ill.s: New test source file.
* gas/mips/mips.exp: Add mips32r2 architecture data array
entry. Run new tests mentioned above.
[ include/elf/ChangeLog ]
2002-12-30 Chris Demetriou <cgd@broadcom.com>
* mips.h (E_MIPS_ARCH_32R2): New define.
[ include/opcode/ChangeLog ]
2002-12-30 Chris Demetriou <cgd@broadcom.com>
* mips.h: Document "+" as the start of two-character operand
type names, and add new "K", "+A", "+B", and "+C" operand types.
(OP_MASK_INSMSB, OP_SH_INSMSB, OP_MASK_EXTMSB)
(OP_SH_EXTMSB, INSN_ISA32R2, ISA_MIPS32R2, CPU_MIPS32R2): New
defines.
[ opcodes/ChangeLog ]
2002-12-30 Chris Demetriou <cgd@broadcom.com>
* mips-dis.c (mips_cp0_names_mips3264r2, mips_hwr_names_numeric)
(mips_hwr_names_mips3264r2): New arrays.
(mips_arch_choice): New "hwr_names" member.
(mips_arch_choices): Adjust for structure change, and add a new
entry for "mips32r2" ISA.
(mips_hwr_names): New variable.
(set_default_mips_dis_options): Set mips_hwr_names.
(parse_mips_dis_option): New "hwr-names" option which sets
mips_hwr_names, and adjust "reg-names=ARCH" to set mips_hwr_names.
(print_insn_arg): Change return type to "int"
and use that to indicate number of characters consumed.
Add support for "+" operand extension character, "+A", "+B",
"+C", and "K" operands.
(print_insn_mips): Adjust for changes to print_insn_arg.
(print_mips_disassembler_options): Adjust for "hwr-names"
addition and "reg-names" change.
* mips-opc (I33): New define (shorthand for INSN_ISA32R2).
(mips_builtin_opcodes): Note that "nop" and "ssnop" are special
forms of "sll". Add new MIPS32 Release 2 instructions: ehb,
di, ei, ext, ins, jr.hb, jalr.hb, mfhc1, mfhc2, mthc1, mthc2,
rdhwr, rdpgpr, seb, seh, synci, wrpgpr, wsbh.
Note that hardware rotate instructions (ror, rorv) can be
used on MIPS32 Release 2, and add the official mnemonics
for them (rotr, rotrv) and the similar "rotl" mnemonic for
left-rotate.
2002-12-31 15:29:29 +08:00
|
|
|
changequote(,)dnl
|
|
|
|
mips_cpu=`echo $target_cpu | sed -e 's/[a-z]*..r2//' -e 's/el$//'`
|
|
|
|
changequote([,])dnl
|
|
|
|
;;
|
[gas/]
* doc/c-mips.texi: Remove -mcpu. Document -mabi.
* configure.in (MIPS_CPU_STRING_DEFAULT): New configuration macro.
(USE_E_MIPS_ABI_O32, MIPS_DEFAULT_64BIT): New configuration macros.
* configure, config.in: Regenerate.
* config/tc-mips.c (file_mips_abi): Rename to mips_abi.
(mips_set_options): Remove "abi" field.
(mips_opts): Update accordingly. Replace all uses of mips_opts.abi
with mips_abi.
(mips_cpu): Remove.
(mips_arch_string, mips_arch_info): New vars.
(mips_tune_string, mips_tune_info): New vars.
(ABI_NEEDS_32BIT_REGS, ABI_NEEDS_64BIT_REGS): New macros.
(HAVE_32BIT_GPRS, HAVE_32BIT_FPRS): Don't check the ABI.
(mips_isa_to_str, mips_cpu_to_str): Remove.
(mips_ip): If the selected architecture is a generic ISA rather
than a processor, only mention the ISA level in error messages.
(OPTION_MCPU): Remove.
(OPTION_FP64): New.
(md_longopts): Add -mfp64, remove -mcpu.
(mips_set_option_string): New fn.
(md_parse_option): Make -mipsN update file_mips_isa rather than
mips_opts.isa. Use mips_set_option_string to set -march or -mtune.
Don't let -mgp32 and -mfp32 change the ABI.
(show): Move to end of file. Constify string argument.
(md_show_usage): Move to the end of the file. Read available
architectures from mips_cpu_info_table.
(mips_set_architecture): New fn.
(mips_after_parse_args): Rework. Remove -mcpu handling. -mipsN
is an alias for -march=mipsN. Don't change the ABI based on other
flags. Infer the register size from the ABI as well as the
architecture. Complain about more conflicting arguments.
Unify logic with GCC.
(s_mipsset): Don't change the ABI.
(mips_elf_final_processing): Check USE_E_MIPS_ABI_O32.
(mips_cpu_info_table): Remove Generic-MIPS* entries, keeping just
"mipsN"-type entries. Remove entries that vary only in the
manufacturer's prefix, or that have "000" replaced by "k".
Remove TARGET_CPU entries. Make r2000 entry use CPU_R3000.
(mips_strict_matching_cpu_name_p, mips_matching_cpu_name_p): New fns.
(mips_parse_cpu): New fn.
(mips_cpu_info_from_name, mips_cpu_info_from_cpu): Remove.
(mips_cpu_info_from_isa): Minor formatting tweak.
[gas/testsuite]
* gas/mips/mips-gp32-fp64.d,
* gas/mips/mips-gp32-fp64-pic.d: Add -mfp64.
2002-07-25 17:48:07 +08:00
|
|
|
mips64* | mipsisa64* | mipsisa32*)
|
|
|
|
changequote(,)dnl
|
|
|
|
mips_cpu=`echo $target_cpu | sed -e 's/[a-z]*..//' -e 's/el$//'`
|
|
|
|
changequote([,])dnl
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_ERROR($target_cpu isn't a supported MIPS CPU name)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
# See whether it's appropriate to set E_MIPS_ABI_O32 for o32
|
|
|
|
# binaries. It's a GNU extension that some OSes don't understand.
|
|
|
|
# The value only matters on ELF targets.
|
|
|
|
case ${target} in
|
|
|
|
*-*-irix*)
|
|
|
|
use_e_mips_abi_o32=0
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
use_e_mips_abi_o32=1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
# Decide whether to generate 32-bit or 64-bit code by default.
|
|
|
|
# Used to resolve -march=from-abi when an embedded ABI is selected.
|
|
|
|
case ${target} in
|
|
|
|
mips64*-*-* | mipsisa64*-*-*)
|
|
|
|
mips_default_64bit=1
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
mips_default_64bit=0
|
|
|
|
;;
|
|
|
|
esac
|
2003-05-07 13:10:45 +08:00
|
|
|
# Decide which ABI to target by default.
|
|
|
|
case ${target} in
|
|
|
|
mips64*-linux* | mips-sgi-irix6*)
|
|
|
|
mips_default_abi=N32_ABI
|
|
|
|
;;
|
|
|
|
mips*-linux*)
|
|
|
|
mips_default_abi=O32_ABI
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
mips_default_abi=NO_ABI
|
|
|
|
;;
|
|
|
|
esac
|
[gas/]
* doc/c-mips.texi: Remove -mcpu. Document -mabi.
* configure.in (MIPS_CPU_STRING_DEFAULT): New configuration macro.
(USE_E_MIPS_ABI_O32, MIPS_DEFAULT_64BIT): New configuration macros.
* configure, config.in: Regenerate.
* config/tc-mips.c (file_mips_abi): Rename to mips_abi.
(mips_set_options): Remove "abi" field.
(mips_opts): Update accordingly. Replace all uses of mips_opts.abi
with mips_abi.
(mips_cpu): Remove.
(mips_arch_string, mips_arch_info): New vars.
(mips_tune_string, mips_tune_info): New vars.
(ABI_NEEDS_32BIT_REGS, ABI_NEEDS_64BIT_REGS): New macros.
(HAVE_32BIT_GPRS, HAVE_32BIT_FPRS): Don't check the ABI.
(mips_isa_to_str, mips_cpu_to_str): Remove.
(mips_ip): If the selected architecture is a generic ISA rather
than a processor, only mention the ISA level in error messages.
(OPTION_MCPU): Remove.
(OPTION_FP64): New.
(md_longopts): Add -mfp64, remove -mcpu.
(mips_set_option_string): New fn.
(md_parse_option): Make -mipsN update file_mips_isa rather than
mips_opts.isa. Use mips_set_option_string to set -march or -mtune.
Don't let -mgp32 and -mfp32 change the ABI.
(show): Move to end of file. Constify string argument.
(md_show_usage): Move to the end of the file. Read available
architectures from mips_cpu_info_table.
(mips_set_architecture): New fn.
(mips_after_parse_args): Rework. Remove -mcpu handling. -mipsN
is an alias for -march=mipsN. Don't change the ABI based on other
flags. Infer the register size from the ABI as well as the
architecture. Complain about more conflicting arguments.
Unify logic with GCC.
(s_mipsset): Don't change the ABI.
(mips_elf_final_processing): Check USE_E_MIPS_ABI_O32.
(mips_cpu_info_table): Remove Generic-MIPS* entries, keeping just
"mipsN"-type entries. Remove entries that vary only in the
manufacturer's prefix, or that have "000" replaced by "k".
Remove TARGET_CPU entries. Make r2000 entry use CPU_R3000.
(mips_strict_matching_cpu_name_p, mips_matching_cpu_name_p): New fns.
(mips_parse_cpu): New fn.
(mips_cpu_info_from_name, mips_cpu_info_from_cpu): Remove.
(mips_cpu_info_from_isa): Minor formatting tweak.
[gas/testsuite]
* gas/mips/mips-gp32-fp64.d,
* gas/mips/mips-gp32-fp64-pic.d: Add -mfp64.
2002-07-25 17:48:07 +08:00
|
|
|
AC_DEFINE_UNQUOTED(MIPS_CPU_STRING_DEFAULT, "$mips_cpu",
|
|
|
|
[Default CPU for MIPS targets. ])
|
|
|
|
AC_DEFINE_UNQUOTED(USE_E_MIPS_ABI_O32, $use_e_mips_abi_o32,
|
|
|
|
[Allow use of E_MIPS_ABI_O32 on MIPS targets. ])
|
|
|
|
AC_DEFINE_UNQUOTED(MIPS_DEFAULT_64BIT, $mips_default_64bit,
|
|
|
|
[Generate 64-bit code by default on MIPS targets. ])
|
2003-05-07 13:10:45 +08:00
|
|
|
AC_DEFINE_UNQUOTED(MIPS_DEFAULT_ABI, $mips_default_abi,
|
|
|
|
[Choose a default ABI for MIPS targets. ])
|
[gas/]
* doc/c-mips.texi: Remove -mcpu. Document -mabi.
* configure.in (MIPS_CPU_STRING_DEFAULT): New configuration macro.
(USE_E_MIPS_ABI_O32, MIPS_DEFAULT_64BIT): New configuration macros.
* configure, config.in: Regenerate.
* config/tc-mips.c (file_mips_abi): Rename to mips_abi.
(mips_set_options): Remove "abi" field.
(mips_opts): Update accordingly. Replace all uses of mips_opts.abi
with mips_abi.
(mips_cpu): Remove.
(mips_arch_string, mips_arch_info): New vars.
(mips_tune_string, mips_tune_info): New vars.
(ABI_NEEDS_32BIT_REGS, ABI_NEEDS_64BIT_REGS): New macros.
(HAVE_32BIT_GPRS, HAVE_32BIT_FPRS): Don't check the ABI.
(mips_isa_to_str, mips_cpu_to_str): Remove.
(mips_ip): If the selected architecture is a generic ISA rather
than a processor, only mention the ISA level in error messages.
(OPTION_MCPU): Remove.
(OPTION_FP64): New.
(md_longopts): Add -mfp64, remove -mcpu.
(mips_set_option_string): New fn.
(md_parse_option): Make -mipsN update file_mips_isa rather than
mips_opts.isa. Use mips_set_option_string to set -march or -mtune.
Don't let -mgp32 and -mfp32 change the ABI.
(show): Move to end of file. Constify string argument.
(md_show_usage): Move to the end of the file. Read available
architectures from mips_cpu_info_table.
(mips_set_architecture): New fn.
(mips_after_parse_args): Rework. Remove -mcpu handling. -mipsN
is an alias for -march=mipsN. Don't change the ABI based on other
flags. Infer the register size from the ABI as well as the
architecture. Complain about more conflicting arguments.
Unify logic with GCC.
(s_mipsset): Don't change the ABI.
(mips_elf_final_processing): Check USE_E_MIPS_ABI_O32.
(mips_cpu_info_table): Remove Generic-MIPS* entries, keeping just
"mipsN"-type entries. Remove entries that vary only in the
manufacturer's prefix, or that have "000" replaced by "k".
Remove TARGET_CPU entries. Make r2000 entry use CPU_R3000.
(mips_strict_matching_cpu_name_p, mips_matching_cpu_name_p): New fns.
(mips_parse_cpu): New fn.
(mips_cpu_info_from_name, mips_cpu_info_from_cpu): Remove.
(mips_cpu_info_from_isa): Minor formatting tweak.
[gas/testsuite]
* gas/mips/mips-gp32-fp64.d,
* gas/mips/mips-gp32-fp64-pic.d: Add -mfp64.
2002-07-25 17:48:07 +08:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
# Do we need the opcodes library?
|
|
|
|
case ${cpu_type} in
|
|
|
|
vax | i386 | tic30)
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
need_opcodes=yes
|
|
|
|
|
|
|
|
case "${enable_shared}" in
|
|
|
|
yes) shared_opcodes=true ;;
|
|
|
|
*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
|
2003-01-04 05:47:21 +08:00
|
|
|
fr30 | ip2k | iq2000 | m32r | openrisc)
|
1999-05-03 15:29:11 +08:00
|
|
|
using_cgen=yes
|
|
|
|
;;
|
|
|
|
|
2002-06-19 05:15:21 +08:00
|
|
|
frv)
|
|
|
|
using_cgen=yes
|
|
|
|
;;
|
1999-05-03 15:29:11 +08:00
|
|
|
m68k)
|
|
|
|
case ${extra_objects} in
|
|
|
|
*m68k-parse.o*) ;;
|
|
|
|
*) extra_objects="$extra_objects m68k-parse.o" ;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
|
|
|
|
mips)
|
|
|
|
echo ${extra_objects} | grep -s "itbl-parse.o"
|
|
|
|
if test $? -ne 0 ; then
|
|
|
|
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"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo ${extra_objects} | grep -s "itbl-ops.o"
|
|
|
|
if test $? -ne 0 ; then
|
|
|
|
extra_objects="$extra_objects itbl-ops.o"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
2001-10-17 13:38:42 +08:00
|
|
|
i386 | s390 | sparc)
|
1999-05-03 15:29:11 +08:00
|
|
|
if test $this_target = $target ; then
|
|
|
|
AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.])
|
|
|
|
fi
|
|
|
|
;;
|
2001-12-08 11:46:03 +08:00
|
|
|
|
|
|
|
xstormy16)
|
|
|
|
using_cgen=yes
|
|
|
|
;;
|
|
|
|
|
2003-04-01 23:50:31 +08:00
|
|
|
xtensa)
|
|
|
|
echo ${extra_objects} | grep -s "xtensa-relax.o"
|
|
|
|
if test $? -ne 0 ; then
|
|
|
|
extra_objects="$extra_objects xtensa-relax.o"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if test $using_cgen = yes ; then
|
|
|
|
case "x${extra_objects}" in
|
|
|
|
*cgen.o*) ;;
|
|
|
|
*) extra_objects="$extra_objects cgen.o" ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
|
|
|
|
case ${generic_target}-${fmt} in
|
|
|
|
mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
|
2001-09-14 14:22:46 +08:00
|
|
|
mips*-*-linux*-*) case "$endian" in
|
2001-06-08 01:23:14 +08:00
|
|
|
big) emulation="mipsbelf mipslelf mipself" ;;
|
|
|
|
*) emulation="mipslelf mipsbelf mipself" ;;
|
1999-05-03 15:29:11 +08:00
|
|
|
esac ;;
|
|
|
|
mips-*-lnews*-ecoff) ;;
|
|
|
|
mips-*-*-ecoff) case "$endian" in
|
|
|
|
big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
|
|
|
|
*) emulation="mipslecoff mipsbecoff mipsecoff" ;;
|
|
|
|
esac ;;
|
|
|
|
mips-*-*-elf) case "$endian" in
|
|
|
|
big) emulation="mipsbelf mipslelf mipself" ;;
|
|
|
|
*) emulation="mipslelf mipsbelf mipself" ;;
|
|
|
|
esac ;;
|
2000-07-13 22:57:49 +08:00
|
|
|
mips-*-sysv4*MP*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
|
2000-06-19 07:47:18 +08:00
|
|
|
# i386-pc-pe-coff != i386-pc-coff.
|
|
|
|
i386-*-pe-coff) ;;
|
2000-01-27 06:48:31 +08:00
|
|
|
# Uncommenting the next line will turn on support for i386 AOUT
|
|
|
|
# for the default linux configuration
|
|
|
|
# i386-*-linux*-elf) emulation="i386elf i386aout" ;;
|
|
|
|
#
|
|
|
|
i386-*-aout) emulation="i386aout" ;;
|
1999-09-02 23:12:01 +08:00
|
|
|
i386-*-coff) emulation="i386coff" ;;
|
2000-01-27 06:48:31 +08:00
|
|
|
i386-*-elf) emulation="i386elf" ;;
|
2000-07-21 01:45:28 +08:00
|
|
|
|
2001-03-27 10:48:19 +08:00
|
|
|
# Always all formats. The first stated emulation becomes the default.
|
|
|
|
cris-*-*aout*) emulation="crisaout criself" ;;
|
|
|
|
cris-*-*) emulation="criself crisaout" ;;
|
1999-05-03 15:29:11 +08:00
|
|
|
esac
|
|
|
|
|
|
|
|
emulations="$emulations $emulation"
|
|
|
|
|
|
|
|
done
|
|
|
|
|
2000-03-03 04:15:33 +08:00
|
|
|
# Turn on all targets if possible
|
|
|
|
if test ${all_targets} = "yes"; then
|
|
|
|
case ${target_cpu_type} in
|
|
|
|
i386)
|
|
|
|
case ${obj_format} in
|
|
|
|
aout)
|
|
|
|
emulations="$emulations i386coff i386elf"
|
|
|
|
;;
|
|
|
|
coff)
|
|
|
|
emulations="$emulations i386aout i386elf"
|
|
|
|
;;
|
|
|
|
elf)
|
|
|
|
emulations="$emulations i386aout i386coff"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
# Assign floating point type. Most processors with FP support
|
|
|
|
# IEEE FP. On those that don't support FP at all, usually IEEE
|
|
|
|
# is emulated.
|
|
|
|
case ${target_cpu} in
|
|
|
|
vax | tahoe ) atof=${target_cpu} ;;
|
2001-02-19 07:33:11 +08:00
|
|
|
pdp11) atof=vax ;;
|
1999-05-03 15:29:11 +08:00
|
|
|
*) atof=ieee ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "${obj_format}" in
|
|
|
|
"") AC_MSG_ERROR(GAS does not know what format to use for target ${target}) ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU).
|
|
|
|
cgen_cpu_prefix=""
|
|
|
|
if test $using_cgen = yes ; then
|
|
|
|
case ${target_cpu} in
|
|
|
|
*) cgen_cpu_prefix=${target_cpu} ;;
|
|
|
|
esac
|
|
|
|
AC_SUBST(cgen_cpu_prefix)
|
|
|
|
AC_DEFINE(USING_CGEN, 1, [Using cgen code?])
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Make sure the desired support files exist.
|
|
|
|
dnl
|
|
|
|
|
|
|
|
if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
|
|
|
|
AC_MSG_ERROR(GAS does not support target CPU ${target_cpu_type})
|
|
|
|
fi
|
|
|
|
|
|
|
|
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)
|
|
|
|
case ${target_cpu_type} in
|
|
|
|
i386) AC_DEFINE(I386COFF, 1, [Using i386 COFF?]) ;;
|
|
|
|
m68k) AC_DEFINE(M68KCOFF, 1, [Using m68k COFF?]) ;;
|
|
|
|
m88k) AC_DEFINE(M88KCOFF, 1, [Using m88k COFF?]) ;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
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.
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
# code needs to be provided, too.
|
|
|
|
#
|
|
|
|
# And then there's "--enable-targets=all"....
|
|
|
|
#
|
|
|
|
# For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.
|
|
|
|
|
|
|
|
formats="${obj_format}"
|
|
|
|
emfiles=""
|
|
|
|
EMULATIONS=""
|
|
|
|
GAS_UNIQ(emulations)
|
|
|
|
for em in . $emulations ; do
|
|
|
|
case $em in
|
|
|
|
.) continue ;;
|
2001-02-11 06:25:10 +08:00
|
|
|
mipsbelf | mipslelf | mipself)
|
1999-05-03 15:29:11 +08:00
|
|
|
fmt=elf file=mipself ;;
|
2001-02-11 06:25:10 +08:00
|
|
|
mipsbecoff | mipslecoff | mipsecoff)
|
1999-05-03 15:29:11 +08:00
|
|
|
fmt=ecoff file=mipsecoff ;;
|
2000-05-22 02:26:10 +08:00
|
|
|
*coff)
|
|
|
|
fmt=coff file=$em ;;
|
|
|
|
*aout)
|
|
|
|
fmt=aout file=$em ;;
|
|
|
|
*elf)
|
|
|
|
fmt=elf file=$em ;;
|
1999-05-03 15:29:11 +08:00
|
|
|
esac
|
|
|
|
formats="$formats $fmt"
|
|
|
|
emfiles="$emfiles e-$file.o"
|
|
|
|
EMULATIONS="$EMULATIONS &$em,"
|
|
|
|
done
|
|
|
|
GAS_UNIQ(formats)
|
|
|
|
GAS_UNIQ(emfiles)
|
|
|
|
if test `set . $formats ; shift ; echo $#` -gt 1 ; then
|
|
|
|
for fmt in $formats ; do
|
|
|
|
case $fmt in
|
|
|
|
aout) AC_DEFINE(OBJ_MAYBE_AOUT, 1, [a.out support?]) ;;
|
|
|
|
bout) AC_DEFINE(OBJ_MAYBE_BOUT, 1, [b.out support?]) ;;
|
|
|
|
coff) AC_DEFINE(OBJ_MAYBE_COFF, 1, [COFF support?]) ;;
|
|
|
|
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
|
|
|
|
extra_objects="$extra_objects obj-$fmt.o"
|
|
|
|
done
|
|
|
|
obj_format=multi
|
|
|
|
fi
|
|
|
|
if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
|
|
|
|
DEFAULT_EMULATION=`set . $emulations ; echo $2`
|
1999-09-02 23:12:01 +08:00
|
|
|
# e-mips* has more than one emulation per file, e-i386* has just one at the
|
|
|
|
# moment. If only one emulation is specified, then don't define
|
|
|
|
# USE_EMULATIONS or include any of the e-files as they will only be bloat.
|
|
|
|
case "${obj_format}${emfiles}" in
|
|
|
|
multi* | *mips*)
|
|
|
|
extra_objects="$extra_objects $emfiles"
|
|
|
|
AC_DEFINE(USE_EMULATIONS, 1, [Use emulation support?]) ;;
|
|
|
|
esac
|
1999-05-03 15:29:11 +08:00
|
|
|
fi
|
|
|
|
AC_SUBST(extra_objects)
|
|
|
|
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
|
|
|
|
yes-yes) # Oops.
|
|
|
|
AC_MSG_ERROR(GAS does not support the ${generic_target} configuration.)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
AC_SUBST(target_cpu_type)
|
|
|
|
AC_SUBST(obj_format)
|
|
|
|
AC_SUBST(te_file)
|
|
|
|
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)
|
|
|
|
OPCODES_LIB=../opcodes/libopcodes.la
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "${need_bfd}" in
|
|
|
|
yes)
|
|
|
|
BFDLIB=../bfd/libbfd.la
|
2002-10-16 21:27:04 +08:00
|
|
|
BFDVER_H=../bfd/bfdver.h
|
2002-05-25 20:53:29 +08:00
|
|
|
ALL_OBJ_DEPS="$ALL_OBJ_DEPS"' ../bfd/bfd.h $(INCDIR)/symcat.h'
|
1999-05-03 15:29:11 +08:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
AC_SUBST(BFDLIB)
|
|
|
|
AC_SUBST(OPCODES_LIB)
|
|
|
|
|
2002-10-16 21:27:04 +08:00
|
|
|
AC_SUBST(BFDVER_H)
|
1999-05-03 15:29:11 +08:00
|
|
|
AC_SUBST(ALL_OBJ_DEPS)
|
|
|
|
|
|
|
|
AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${target_alias}", [Target alias.])
|
|
|
|
AC_DEFINE_UNQUOTED(TARGET_CANONICAL, "${target}", [Canonical target.])
|
|
|
|
AC_DEFINE_UNQUOTED(TARGET_CPU, "${target_cpu}", [Target CPU.])
|
|
|
|
AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}", [Target vendor.])
|
|
|
|
AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.])
|
|
|
|
|
|
|
|
AC_PROG_CC
|
|
|
|
|
|
|
|
AC_PROG_YACC
|
|
|
|
AM_PROG_LEX
|
|
|
|
|
2002-02-26 18:28:13 +08:00
|
|
|
ALL_LINGUAS="fr tr es"
|
1999-05-03 15:29:11 +08:00
|
|
|
CY_GNU_GETTEXT
|
|
|
|
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
AC_EXEEXT
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h)
|
|
|
|
|
|
|
|
# Put this here so that autoconf's "cross-compiling" message doesn't confuse
|
|
|
|
# people who are not cross-compiling but are compiling cross-assemblers.
|
|
|
|
AC_MSG_CHECKING(whether compiling a cross-assembler)
|
|
|
|
if test "${host}" = "${target}"; then
|
|
|
|
cross_gas=no
|
|
|
|
else
|
|
|
|
cross_gas=yes
|
|
|
|
AC_DEFINE(CROSS_COMPILE, 1, [Compiling cross-assembler?])
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT($cross_gas)
|
|
|
|
|
|
|
|
dnl ansidecl.h will deal with const
|
|
|
|
dnl AC_CONST
|
|
|
|
AC_FUNC_ALLOCA
|
|
|
|
AC_C_INLINE
|
|
|
|
|
|
|
|
# VMS doesn't have unlink.
|
|
|
|
AC_CHECK_FUNCS(unlink remove, break)
|
|
|
|
|
|
|
|
# Some systems don't have sbrk().
|
|
|
|
AC_CHECK_FUNCS(sbrk)
|
|
|
|
|
2000-06-20 21:52:32 +08:00
|
|
|
# do we need the math library?
|
|
|
|
case "${need_libm}" in
|
|
|
|
yes)
|
|
|
|
AC_CHECK_LIBM
|
|
|
|
AC_SUBST(LIBM)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
# Some non-ANSI preprocessors botch requoting inside strings. That's bad
|
|
|
|
# enough, but on some of those systems, the assert macro relies on requoting
|
|
|
|
# working properly!
|
|
|
|
GAS_WORKING_ASSERT
|
|
|
|
|
|
|
|
# On some systems, the system header files may not declare malloc, realloc,
|
|
|
|
# and free. There are places where gas needs these functions to have been
|
|
|
|
# declared -- such as when taking their addresses.
|
|
|
|
gas_test_headers="
|
|
|
|
#ifdef HAVE_MEMORY_H
|
|
|
|
#include <memory.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_STRING_H
|
|
|
|
#include <string.h>
|
|
|
|
#else
|
|
|
|
#ifdef HAVE_STRINGS_H
|
|
|
|
#include <strings.h>
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_STDLIB_H
|
|
|
|
#include <stdlib.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
#include <unistd.h>
|
|
|
|
#endif
|
|
|
|
"
|
|
|
|
GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers)
|
|
|
|
GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers)
|
|
|
|
GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers)
|
|
|
|
GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers)
|
|
|
|
GAS_CHECK_DECL_NEEDED(environ, f, char **f, $gas_test_headers)
|
|
|
|
|
|
|
|
# Does errno.h declare errno, or do we have to add a separate declaration
|
|
|
|
# for it?
|
|
|
|
GAS_CHECK_DECL_NEEDED(errno, f, int f, [
|
|
|
|
#ifdef HAVE_ERRNO_H
|
|
|
|
#include <errno.h>
|
|
|
|
#endif
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl This must come last.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
2003-09-03 01:59:13 +08:00
|
|
|
AC_CONFIG_FILES(Makefile doc/Makefile po/Makefile.in:po/Make-in)
|
|
|
|
AC_CONFIG_COMMANDS([default],
|
1999-05-03 15:29:11 +08:00
|
|
|
[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
|
|
|
|
if test "x$cgen_cpu_prefix" != x ; then
|
|
|
|
echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h
|
|
|
|
fi
|
|
|
|
|
|
|
|
sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile],
|
|
|
|
[target_cpu_type=${target_cpu_type}
|
|
|
|
cgen_cpu_prefix=${cgen_cpu_prefix}
|
|
|
|
obj_format=${obj_format}
|
|
|
|
te_file=${te_file}])
|
2003-09-03 01:59:13 +08:00
|
|
|
|
|
|
|
AC_OUTPUT
|