From 9c082ca86eb4262078f359850ae4466856f156a1 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 18 Oct 2011 00:31:00 +0000 Subject: [PATCH] sim: rename common/aclocal.m4 to common/acinclude.m4 Automake likes to dump macros automatically used into the aclocal.m4 file, but the common/aclocal.m4 naming prevents that. So rename it to the more normal "acinclude.m4" so the aclocal tool can work. Signed-off-by: Mike Frysinger --- sim/arm/ChangeLog | 4 + sim/arm/configure.ac | 2 +- sim/avr/ChangeLog | 4 + sim/avr/configure.ac | 2 +- sim/bfin/ChangeLog | 5 + sim/bfin/aclocal.m4 | 12 +- sim/bfin/configure | 7 +- sim/bfin/configure.ac | 2 +- sim/common/ChangeLog | 5 + sim/common/acinclude.m4 | 945 +++++++++++++++++++++++++++++++++++ sim/common/aclocal.m4 | 953 +----------------------------------- sim/cr16/ChangeLog | 4 + sim/cr16/configure.ac | 2 +- sim/cris/ChangeLog | 4 + sim/cris/configure.ac | 2 +- sim/d10v/ChangeLog | 4 + sim/d10v/configure.ac | 2 +- sim/erc32/ChangeLog | 4 + sim/erc32/configure.ac | 2 +- sim/frv/ChangeLog | 4 + sim/frv/configure.ac | 2 +- sim/h8300/ChangeLog | 4 + sim/h8300/configure.ac | 2 +- sim/igen/ChangeLog | 4 + sim/igen/configure.ac | 2 +- sim/iq2000/ChangeLog | 4 + sim/iq2000/configure.ac | 2 +- sim/lm32/ChangeLog | 4 + sim/lm32/configure.ac | 2 +- sim/m32c/ChangeLog | 4 + sim/m32c/configure.ac | 2 +- sim/m32r/ChangeLog | 4 + sim/m32r/configure.ac | 2 +- sim/m68hc11/ChangeLog | 4 + sim/m68hc11/configure.ac | 2 +- sim/mcore/ChangeLog | 4 + sim/mcore/configure.ac | 2 +- sim/microblaze/ChangeLog | 4 + sim/microblaze/configure.ac | 2 +- sim/mips/ChangeLog | 4 + sim/mips/configure.ac | 2 +- sim/mn10300/ChangeLog | 4 + sim/mn10300/configure.ac | 2 +- sim/moxie/ChangeLog | 4 + sim/moxie/configure.ac | 2 +- sim/ppc/ChangeLog | 4 + sim/ppc/configure.ac | 2 +- sim/rx/ChangeLog | 4 + sim/rx/configure.ac | 2 +- sim/sh/ChangeLog | 4 + sim/sh/configure.ac | 2 +- sim/sh64/ChangeLog | 4 + sim/sh64/configure.ac | 2 +- sim/v850/ChangeLog | 4 + sim/v850/configure.ac | 2 +- 55 files changed, 1099 insertions(+), 974 deletions(-) create mode 100644 sim/common/acinclude.m4 diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index 4f85db1fe4..e2d321b7de 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/arm/configure.ac b/sim/arm/configure.ac index 9ed3ea5deb..3caf8d5fd5 100644 --- a/sim/arm/configure.ac +++ b/sim/arm/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog index b8dd642831..4e68a5da30 100644 --- a/sim/avr/ChangeLog +++ b/sim/avr/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/avr/configure.ac b/sim/avr/configure.ac index 8fefa07cb9..799a5dfa61 100644 --- a/sim/avr/configure.ac +++ b/sim/avr/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index db7b55f3f7..829a44c9a1 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,8 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + * aclocal.m4, configure: Regenerate. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/bfin/aclocal.m4 b/sim/bfin/aclocal.m4 index cbe3b5592d..af3c83db64 100644 --- a/sim/bfin/aclocal.m4 +++ b/sim/bfin/aclocal.m4 @@ -39,7 +39,8 @@ # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) @@ -85,7 +86,8 @@ m4_define([_PKG_CONFIG], pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried @@ -133,9 +135,9 @@ if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD @@ -159,7 +161,7 @@ path to pkg-config. _PKG_TEXT -To get pkg-config, see .])dnl +To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS diff --git a/sim/bfin/configure b/sim/bfin/configure index af68b3ba3f..0f6ad861dc 100755 --- a/sim/bfin/configure +++ b/sim/bfin/configure @@ -5190,6 +5190,7 @@ BFIN_SIM_EXTRA_OBJS=${BFIN_SIM_EXTRA_OBJS} + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -5318,6 +5319,7 @@ if test -n "$SDL_CFLAGS"; then $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_CFLAGS=`$PKG_CONFIG --cflags "sdl" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -5334,6 +5336,7 @@ if test -n "$SDL_LIBS"; then $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_LIBS=`$PKG_CONFIG --libs "sdl" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -5353,9 +5356,9 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "sdl" 2>&1` + SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sdl" 2>&1` else - SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors "sdl" 2>&1` + SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sdl" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SDL_PKG_ERRORS" >&5 diff --git a/sim/bfin/configure.ac b/sim/bfin/configure.ac index a58616f486..1917c01f07 100644 --- a/sim/bfin/configure.ac +++ b/sim/bfin/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 47066dfe26..1dcbe3f017 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,8 @@ +2011-10-17 Mike Frysinger + + * acinclude.m4: Rename from aclocal.m4. + * aclocal.m4: Regenerate. + 2011-10-17 Mike Frysinger * aclocal.m4: Change AC_PREREQ comment to 2.64. diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4 new file mode 100644 index 0000000000..11398f5cb4 --- /dev/null +++ b/sim/common/acinclude.m4 @@ -0,0 +1,945 @@ +# This file contains common code used by all simulators. +# +# SIM_AC_COMMON invokes AC macros used by all simulators and by the common +# directory. It is intended to be invoked before any target specific stuff. +# SIM_AC_OUTPUT is a cover function to AC_OUTPUT to generate the Makefile. +# It is intended to be invoked last. +# +# The simulator's configure.in should look like: +# +# dnl Process this file with autoconf to produce a configure script. +# AC_PREREQ(2.64)dnl +# AC_INIT(Makefile.in) +# sinclude(../common/aclocal.m4) +# +# SIM_AC_COMMON +# +# ... target specific stuff ... +# +# SIM_AC_OUTPUT + +# Include global overrides and fixes for Autoconf. +m4_include(../../config/override.m4) +sinclude([../../config/zlib.m4]) + +AC_DEFUN([SIM_AC_COMMON], +[ +AC_REQUIRE([AC_PROG_CC]) +# autoconf.info says this should be called right after AC_INIT. +AC_CONFIG_HEADER(ifelse([$1],,config.h,[$1]):config.in) +AC_CANONICAL_SYSTEM +AC_ARG_PROGRAM +AC_PROG_INSTALL + +# Put a plausible default for CC_FOR_BUILD in Makefile. +if test "x$cross_compiling" = "xno"; then + CC_FOR_BUILD='$(CC)' +else + CC_FOR_BUILD=gcc +fi +AC_SUBST(CC_FOR_BUILD) + +AC_SUBST(CFLAGS) +AC_SUBST(HDEFINES) +AR=${AR-ar} +AC_SUBST(AR) +AC_PROG_RANLIB + +dnl We don't use gettext, but bfd does. So we do the appropriate checks +dnl to see if there are intl libraries we should link against. +ALL_LINGUAS= +ZW_GNU_GETTEXT_SISTER_DIR(../../intl) + +# Check for common headers. +# FIXME: Seems to me this can cause problems for i386-windows hosts. +# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*. +AC_CHECK_HEADERS(stdlib.h string.h strings.h unistd.h time.h) +AC_CHECK_HEADERS(sys/time.h sys/resource.h) +AC_CHECK_HEADERS(fcntl.h fpu_control.h) +AC_CHECK_HEADERS(dlfcn.h errno.h sys/stat.h) +AC_CHECK_FUNCS(getrusage time sigaction __setfpucw) + +# Check for socket libraries +AC_CHECK_LIB(socket, bind) +AC_CHECK_LIB(nsl, gethostbyname) + +# BFD conditionally uses zlib, so we must link it in if libbfd does, by +# using the same condition. +AM_ZLIB + +. ${srcdir}/../../bfd/configure.host + +dnl Standard (and optional) simulator options. +dnl Eventually all simulators will support these. +dnl Do not add any here that cannot be supported by all simulators. +dnl Do not add similar but different options to a particular simulator, +dnl all shall eventually behave the same way. + + +dnl We don't use automake, but we still want to support +dnl --enable-maintainer-mode. +USE_MAINTAINER_MODE=no +AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode Enable developer functionality.], +[case "${enableval}" in + yes) MAINT="" USE_MAINTAINER_MODE=yes ;; + no) MAINT="#" ;; + *) AC_MSG_ERROR("--enable-maintainer-mode does not take a value"); MAINT="#" ;; +esac +if test x"$silent" != x"yes" && test x"$MAINT" = x""; then + echo "Setting maintainer mode" 6>&1 +fi],[MAINT="#"])dnl +AC_SUBST(MAINT) + + +dnl This is a generic option to enable special byte swapping +dnl insns on *any* cpu. +AC_ARG_ENABLE(sim-bswap, +[ --enable-sim-bswap Use Host specific BSWAP instruction.], +[case "${enableval}" in + yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";; + no) sim_bswap="-DWITH_BSWAP=0";; + *) AC_MSG_ERROR("--enable-sim-bswap does not take a value"); sim_bswap="";; +esac +if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then + echo "Setting bswap flags = $sim_bswap" 6>&1 +fi],[sim_bswap=""])dnl +AC_SUBST(sim_bswap) + + +AC_ARG_ENABLE(sim-cflags, +[ --enable-sim-cflags=opts Extra CFLAGS for use in building simulator], +[case "${enableval}" in + yes) sim_cflags="-O2 -fomit-frame-pointer";; + trace) AC_MSG_ERROR("Please use --enable-sim-debug instead."); sim_cflags="";; + no) sim_cflags="";; + *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac +if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then + echo "Setting sim cflags = $sim_cflags" 6>&1 +fi],[sim_cflags=""])dnl +AC_SUBST(sim_cflags) + + +dnl --enable-sim-debug is for developers of the simulator +dnl the allowable values are work-in-progress +AC_ARG_ENABLE(sim-debug, +[ --enable-sim-debug=opts Enable debugging flags], +[case "${enableval}" in + yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";; + no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";; + *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";; +esac +if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then + echo "Setting sim debug = $sim_debug" 6>&1 +fi],[sim_debug=""])dnl +AC_SUBST(sim_debug) + + +dnl --enable-sim-stdio is for users of the simulator +dnl It determines if IO from the program is routed through STDIO (buffered) +AC_ARG_ENABLE(sim-stdio, +[ --enable-sim-stdio Specify whether to use stdio for console input/output.], +[case "${enableval}" in + yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";; + no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";; + *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-stdio"); sim_stdio="";; +esac +if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then + echo "Setting stdio flags = $sim_stdio" 6>&1 +fi],[sim_stdio=""])dnl +AC_SUBST(sim_stdio) + + +dnl --enable-sim-trace is for users of the simulator +dnl The argument is either a bitmask of things to enable [exactly what is +dnl up to the simulator], or is a comma separated list of names of tracing +dnl elements to enable. The latter is only supported on simulators that +dnl use WITH_TRACE. +AC_ARG_ENABLE(sim-trace, +[ --enable-sim-trace=opts Enable tracing flags], +[case "${enableval}" in + yes) sim_trace="-DTRACE=1 -DWITH_TRACE=-1";; + no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";; + [[-0-9]]*) + sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";; + [[a-z]]*) + sim_trace="" + for x in `echo "$enableval" | sed -e "s/,/ /g"`; do + if test x"$sim_trace" = x; then + sim_trace="-DWITH_TRACE='(TRACE_$x" + else + sim_trace="${sim_trace}|TRACE_$x" + fi + done + sim_trace="$sim_trace)'" ;; +esac +if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then + echo "Setting sim trace = $sim_trace" 6>&1 +fi],[sim_trace=""])dnl +AC_SUBST(sim_trace) + + +dnl --enable-sim-profile +dnl The argument is either a bitmask of things to enable [exactly what is +dnl up to the simulator], or is a comma separated list of names of profiling +dnl elements to enable. The latter is only supported on simulators that +dnl use WITH_PROFILE. +AC_ARG_ENABLE(sim-profile, +[ --enable-sim-profile=opts Enable profiling flags], +[case "${enableval}" in + yes) sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";; + no) sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";; + [[-0-9]]*) + sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";; + [[a-z]]*) + sim_profile="" + for x in `echo "$enableval" | sed -e "s/,/ /g"`; do + if test x"$sim_profile" = x; then + sim_profile="-DWITH_PROFILE='(PROFILE_$x" + else + sim_profile="${sim_profile}|PROFILE_$x" + fi + done + sim_profile="$sim_profile)'" ;; +esac +if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then + echo "Setting sim profile = $sim_profile" 6>&1 +fi],[sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1"])dnl +AC_SUBST(sim_profile) + +ACX_PKGVERSION([GDB]) +ACX_BUGURL([http://www.gnu.org/software/gdb/bugs/]) +AC_DEFINE_UNQUOTED([PKGVERSION], ["$PKGVERSION"], [Additional package description]) +AC_DEFINE_UNQUOTED([REPORT_BUGS_TO], ["$REPORT_BUGS_TO"], [Bug reporting address]) + +dnl Types used by common code +AC_TYPE_SIGNAL + +dnl Detect exe extension +AC_EXEEXT + +dnl These are available to append to as desired. +sim_link_files= +sim_link_links= + +dnl Create tconfig.h either from simulator's tconfig.in or default one +dnl in common. +sim_link_links=tconfig.h +if test -f ${srcdir}/tconfig.in +then + sim_link_files=tconfig.in +else + sim_link_files=../common/tconfig.in +fi + +# targ-vals.def points to the libc macro description file. +case "${target}" in +*-*-*) TARG_VALS_DEF=../common/nltvals.def ;; +esac +sim_link_files="${sim_link_files} ${TARG_VALS_DEF}" +sim_link_links="${sim_link_links} targ-vals.def" + +]) dnl End of SIM_AC_COMMON + + +dnl Additional SIM options that can (optionally) be configured +dnl For optional simulator options, a macro SIM_AC_OPTION_* is defined. +dnl Simulators that wish to use the relevant option specify the macro +dnl in the simulator specific configure.in file between the SIM_AC_COMMON +dnl and SIM_AC_OUTPUT lines. + + +dnl Specify the running environment. +dnl If the simulator invokes this in its configure.in then without this option +dnl the default is the user environment and all are runtime selectable. +dnl If the simulator doesn't invoke this, only the user environment is +dnl supported. +dnl ??? Until there is demonstrable value in doing something more complicated, +dnl let's not. +AC_DEFUN([SIM_AC_OPTION_ENVIRONMENT], +[ +AC_ARG_ENABLE(sim-environment, +[ --enable-sim-environment=environment Specify mixed, user, virtual or operating environment.], +[case "${enableval}" in + all | ALL) sim_environment="-DWITH_ENVIRONMENT=ALL_ENVIRONMENT";; + user | USER) sim_environment="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";; + virtual | VIRTUAL) sim_environment="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT";; + operating | OPERATING) sim_environment="-DWITH_ENVIRONMENT=OPERATING_ENVIRONMENT";; + *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-environment"); + sim_environment="";; +esac +if test x"$silent" != x"yes" && test x"$sim_environment" != x""; then + echo "Setting sim environment = $sim_environment" 6>&1 +fi], +[sim_environment="-DWITH_ENVIRONMENT=ALL_ENVIRONMENT"])dnl +]) +AC_SUBST(sim_environment) + + +dnl Specify the alignment restrictions of the target architecture. +dnl Without this option all possible alignment restrictions are accommodated. +dnl arg[1] is hardwired target alignment +dnl arg[2] is default target alignment +AC_DEFUN([SIM_AC_OPTION_ALIGNMENT], +wire_alignment="[$1]" +default_alignment="[$2]" +[ +AC_ARG_ENABLE(sim-alignment, +[ --enable-sim-alignment=align Specify strict, nonstrict or forced alignment of memory accesses.], +[case "${enableval}" in + strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; + nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; + forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; + yes) if test x"$wire_alignment" != x; then + sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" + else + if test x"$default_alignment" != x; then + sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" + else + echo "No hard-wired alignment for target $target" 1>&6 + sim_alignment="-DWITH_ALIGNMENT=0" + fi + fi;; + no) if test x"$default_alignment" != x; then + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" + else + if test x"$wire_alignment" != x; then + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" + else + echo "No default alignment for target $target" 1>&6 + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" + fi + fi;; + *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-alignment"); sim_alignment="";; +esac +if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then + echo "Setting alignment flags = $sim_alignment" 6>&1 +fi], +[if test x"$default_alignment" != x; then + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" +else + if test x"$wire_alignment" != x; then + sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" + else + sim_alignment= + fi +fi])dnl +])dnl +AC_SUBST(sim_alignment) + + +dnl Conditionally compile in assertion statements. +AC_DEFUN([SIM_AC_OPTION_ASSERT], +[ +AC_ARG_ENABLE(sim-assert, +[ --enable-sim-assert Specify whether to perform random assertions.], +[case "${enableval}" in + yes) sim_assert="-DWITH_ASSERT=1";; + no) sim_assert="-DWITH_ASSERT=0";; + *) AC_MSG_ERROR("--enable-sim-assert does not take a value"); sim_assert="";; +esac +if test x"$silent" != x"yes" && test x"$sim_assert" != x""; then + echo "Setting assert flags = $sim_assert" 6>&1 +fi],[sim_assert=""])dnl +]) +AC_SUBST(sim_assert) + + + +dnl --enable-sim-bitsize is for developers of the simulator +dnl It specifies the number of BITS in the target. +dnl arg[1] is the number of bits in a word +dnl arg[2] is the number assigned to the most significant bit +dnl arg[3] is the number of bits in an address +dnl arg[4] is the number of bits in an OpenFirmware cell. +dnl FIXME: this information should be obtained from bfd/archure +AC_DEFUN([SIM_AC_OPTION_BITSIZE], +wire_word_bitsize="[$1]" +wire_word_msb="[$2]" +wire_address_bitsize="[$3]" +wire_cell_bitsize="[$4]" +[AC_ARG_ENABLE(sim-bitsize, +[ --enable-sim-bitsize=N Specify target bitsize (32 or 64).], +[sim_bitsize= +case "${enableval}" in + 64,63 | 64,63,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63";; + 32,31 | 32,31,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31";; + 64,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";; + 32,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";; + 32) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then + sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31" + else + sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0" + fi ;; + 64) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then + sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63" + else + sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=0" + fi ;; + *) AC_MSG_ERROR("--enable-sim-bitsize was given $enableval. Expected 32 or 64") ;; +esac +# address bitsize +tmp=`echo "${enableval}" | sed -e "s/^[[0-9]]*,*[[0-9]]*,*//"` +case x"${tmp}" in + x ) ;; + x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=32" ;; + x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=64" ;; + * ) AC_MSG_ERROR("--enable-sim-bitsize was given address size $enableval. Expected 32 or 64") ;; +esac +# cell bitsize +tmp=`echo "${enableval}" | sed -e "s/^[[0-9]]*,*[[0-9*]]*,*[[0-9]]*,*//"` +case x"${tmp}" in + x ) ;; + x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=32" ;; + x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=64" ;; + * ) AC_MSG_ERROR("--enable-sim-bitsize was given cell size $enableval. Expected 32 or 64") ;; +esac +if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then + echo "Setting bitsize flags = $sim_bitsize" 6>&1 +fi], +[sim_bitsize="" +if test x"$wire_word_bitsize" != x; then + sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_BITSIZE=$wire_word_bitsize" +fi +if test x"$wire_word_msb" != x; then + sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_MSB=$wire_word_msb" +fi +if test x"$wire_address_bitsize" != x; then + sim_bitsize="$sim_bitsize -DWITH_TARGET_ADDRESS_BITSIZE=$wire_address_bitsize" +fi +if test x"$wire_cell_bitsize" != x; then + sim_bitsize="$sim_bitsize -DWITH_TARGET_CELL_BITSIZE=$wire_cell_bitsize" +fi])dnl +]) +AC_SUBST(sim_bitsize) + + + +dnl --enable-sim-endian={yes,no,big,little} is for simulators +dnl that support both big and little endian targets. +dnl arg[1] is hardwired target endianness. +dnl arg[2] is default target endianness. +AC_DEFUN([SIM_AC_OPTION_ENDIAN], +[ +wire_endian="[$1]" +default_endian="[$2]" +AC_ARG_ENABLE(sim-endian, +[ --enable-sim-endian=endian Specify target byte endian orientation.], +[case "${enableval}" in + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + yes) if test x"$wire_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + else + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + else + echo "No hard-wired endian for target $target" 1>&6 + sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + fi + fi;; + no) if test x"$default_endian" != x; then + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + else + if test x"$wire_endian" != x; then + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + else + echo "No default endian for target $target" 1>&6 + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + fi + fi;; + *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-endian"); sim_endian="";; +esac +if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then + echo "Setting endian flags = $sim_endian" 6>&1 +fi], +[if test x"$default_endian" != x; then + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" +else + if test x"$wire_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + else + sim_endian= + fi +fi])dnl +]) +AC_SUBST(sim_endian) + + +dnl --enable-sim-hostendian is for users of the simulator when +dnl they find that AC_C_BIGENDIAN does not function correctly +dnl (for instance in a canadian cross) +AC_DEFUN([SIM_AC_OPTION_HOSTENDIAN], +[ +AC_ARG_ENABLE(sim-hostendian, +[ --enable-sim-hostendian=end Specify host byte endian orientation.], +[case "${enableval}" in + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-hostendian"); sim_hostendian="";; +esac +if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then + echo "Setting hostendian flags = $sim_hostendian" 6>&1 +fi],[ +if test "x$cross_compiling" = "xno"; then + AC_C_BIGENDIAN + if test $ac_cv_c_bigendian = yes; then + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + else + sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + fi +else + sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" +fi])dnl +]) +AC_SUBST(sim_hostendian) + + +dnl --enable-sim-float is for developers of the simulator +dnl It specifies the presence of hardware floating point +dnl And optionally the bitsize of the floating point register. +dnl arg[1] specifies the presence (or absence) of floating point hardware +dnl arg[2] specifies the number of bits in a floating point register +AC_DEFUN([SIM_AC_OPTION_FLOAT], +[ +default_sim_float="[$1]" +default_sim_float_bitsize="[$2]" +AC_ARG_ENABLE(sim-float, +[ --enable-sim-float Specify that the target processor has floating point hardware.], +[case "${enableval}" in + yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";; + no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";; + 32) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=32";; + 64) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=64";; + *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-float"); sim_float="";; +esac +if test x"$silent" != x"yes" && test x"$sim_float" != x""; then + echo "Setting float flags = $sim_float" 6>&1 +fi],[ +sim_float= +if test x"${default_sim_float}" != x""; then + sim_float="-DWITH_FLOATING_POINT=${default_sim_float}" +fi +if test x"${default_sim_float_bitsize}" != x""; then + sim_float="$sim_float -DWITH_TARGET_FLOATING_POINT_BITSIZE=${default_sim_float_bitsize}" +fi +])dnl +]) +AC_SUBST(sim_float) + + +dnl The argument is the default cache size if none is specified. +AC_DEFUN([SIM_AC_OPTION_SCACHE], +[ +default_sim_scache="ifelse([$1],,0,[$1])" +AC_ARG_ENABLE(sim-scache, +[ --enable-sim-scache=size Specify simulator execution cache size.], +[case "${enableval}" in + yes) sim_scache="-DWITH_SCACHE=${default_sim_scache}";; + no) sim_scache="-DWITH_SCACHE=0" ;; + [[0-9]]*) sim_scache="-DWITH_SCACHE=${enableval}";; + *) AC_MSG_ERROR("Bad value $enableval passed to --enable-sim-scache"); + sim_scache="";; +esac +if test x"$silent" != x"yes" && test x"$sim_scache" != x""; then + echo "Setting scache size = $sim_scache" 6>&1 +fi],[sim_scache="-DWITH_SCACHE=${default_sim_scache}"]) +]) +AC_SUBST(sim_scache) + + +dnl The argument is the default model if none is specified. +AC_DEFUN([SIM_AC_OPTION_DEFAULT_MODEL], +[ +default_sim_default_model="ifelse([$1],,0,[$1])" +AC_ARG_ENABLE(sim-default-model, +[ --enable-sim-default-model=model Specify default model to simulate.], +[case "${enableval}" in + yes|no) AC_MSG_ERROR("Missing argument to --enable-sim-default-model");; + *) sim_default_model="-DWITH_DEFAULT_MODEL='\"${enableval}\"'";; +esac +if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then + echo "Setting default model = $sim_default_model" 6>&1 +fi],[sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"]) +]) +AC_SUBST(sim_default_model) + + +dnl --enable-sim-hardware is for users of the simulator +dnl arg[1] Enable sim-hw by default? ("yes" or "no") +dnl arg[2] is a space separated list of devices that override the defaults +dnl arg[3] is a space separated list of extra target specific devices. +AC_DEFUN([SIM_AC_OPTION_HARDWARE], +[ +if test x"[$1]" = x"yes"; then + sim_hw_p=yes +else + sim_hw_p=no +fi +if test "[$2]"; then + hardware="[$2]" +else + hardware="cfi core pal glue" +fi +hardware="$hardware [$3]" +sim_hw_cflags="-DWITH_HW=1" +sim_hw="$hardware" +sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([[^ ]][[^ ]]*\)/dv-\1.o/g'`" +AC_ARG_ENABLE(sim-hardware, +[ --enable-sim-hardware=LIST Specify the hardware to be included in the build.], +[ +case "${enableval}" in + yes) sim_hw_p=yes;; + no) sim_hw_p=no;; + ,*) sim_hw_p=yes; hardware="${hardware} `echo ${enableval} | sed -e 's/,/ /'`";; + *,) sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'` ${hardware}";; + *) sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'`"'';; +esac +if test "$sim_hw_p" != yes; then + sim_hw_objs= + sim_hw_cflags="-DWITH_HW=0" + sim_hw= +else + sim_hw_cflags="-DWITH_HW=1" + # remove duplicates + sim_hw="" + sim_hw_objs="\$(SIM_COMMON_HW_OBJS)" + for i in $hardware ; do + case " $sim_hw " in + *" $i "*) ;; + *) sim_hw="$sim_hw $i" ; sim_hw_objs="$sim_hw_objs dv-$i.o";; + esac + done +fi +if test x"$silent" != x"yes" && test "$sim_hw_p" = "yes"; then + echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs" +fi],[ +if test "$sim_hw_p" != yes; then + sim_hw_objs= + sim_hw_cflags="-DWITH_HW=0" + sim_hw= +fi +if test x"$silent" != x"yes"; then + echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs" +fi])dnl +]) +AC_SUBST(sim_hw_cflags) +AC_SUBST(sim_hw_objs) +AC_SUBST(sim_hw) + + +dnl --enable-sim-inline is for users that wish to ramp up the simulator's +dnl performance by inlining functions. +dnl Guarantee that unconfigured simulators do not do any inlining +sim_inline="-DDEFAULT_INLINE=0" +AC_DEFUN([SIM_AC_OPTION_INLINE], +[ +default_sim_inline="ifelse([$1],,,-DDEFAULT_INLINE=[$1])" +AC_ARG_ENABLE(sim-inline, +[ --enable-sim-inline=inlines Specify which functions should be inlined.], +[sim_inline="" +case "$enableval" in + no) sim_inline="-DDEFAULT_INLINE=0";; + 0) sim_inline="-DDEFAULT_INLINE=0";; + yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_C_INLINE";; + 1) sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";; + *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do + new_flag="" + case "$x" in + *_INLINE=*) new_flag="-D$x";; + *=*) new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;; + *_INLINE) new_flag="-D$x=ALL_C_INLINE";; + *) new_flag="-D$x""_INLINE=ALL_C_INLINE";; + esac + if test x"$sim_inline" = x""; then + sim_inline="$new_flag" + else + sim_inline="$sim_inline $new_flag" + fi + done;; +esac +if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then + echo "Setting inline flags = $sim_inline" 6>&1 +fi],[ +if test "x$cross_compiling" = "xno"; then + if test x"$GCC" != "x" -a x"${default_sim_inline}" != "x" ; then + sim_inline="${default_sim_inline}" + if test x"$silent" != x"yes"; then + echo "Setting inline flags = $sim_inline" 6>&1 + fi + else + sim_inline="" + fi +else + sim_inline="-DDEFAULT_INLINE=0" +fi])dnl +]) +AC_SUBST(sim_inline) + + +AC_DEFUN([SIM_AC_OPTION_PACKAGES], +[ +AC_ARG_ENABLE(sim-packages, +[ --enable-sim-packages=list Specify the packages to be included in the build.], +[packages=disklabel +case "${enableval}" in + yes) ;; + no) AC_MSG_ERROR("List of packages must be specified for --enable-sim-packages"); packages="";; + ,*) packages="${packages}${enableval}";; + *,) packages="${enableval}${packages}";; + *) packages="${enableval}"'';; +esac +sim_pk_src=`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$/.c/'` +sim_pk_obj=`echo $sim_pk_src | sed -e 's/\.c/.o/g'` +if test x"$silent" != x"yes" && test x"$packages" != x""; then + echo "Setting packages to $sim_pk_src, $sim_pk_obj" +fi],[packages=disklabel +sim_pk_src=`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$/.c/'` +sim_pk_obj=`echo $sim_pk_src | sed -e 's/\.c/.o/g'` +if test x"$silent" != x"yes"; then + echo "Setting packages to $sim_pk_src, $sim_pk_obj" +fi])dnl +]) +AC_SUBST(sim_packages) + + +AC_DEFUN([SIM_AC_OPTION_REGPARM], +[ +AC_ARG_ENABLE(sim-regparm, +[ --enable-sim-regparm=nr-parm Pass parameters in registers instead of on the stack - x86/GCC specific.], +[case "${enableval}" in + 0*|1*|2*|3*|4*|5*|6*|7*|8*|9*) sim_regparm="-DWITH_REGPARM=${enableval}";; + no) sim_regparm="" ;; + yes) sim_regparm="-DWITH_REGPARM=3";; + *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-regparm"); sim_regparm="";; +esac +if test x"$silent" != x"yes" && test x"$sim_regparm" != x""; then + echo "Setting regparm flags = $sim_regparm" 6>&1 +fi],[sim_regparm=""])dnl +]) +AC_SUBST(sim_regparm) + + +AC_DEFUN([SIM_AC_OPTION_RESERVED_BITS], +[ +default_sim_reserved_bits="ifelse([$1],,1,[$1])" +AC_ARG_ENABLE(sim-reserved-bits, +[ --enable-sim-reserved-bits Specify whether to check reserved bits in instruction.], +[case "${enableval}" in + yes) sim_reserved_bits="-DWITH_RESERVED_BITS=1";; + no) sim_reserved_bits="-DWITH_RESERVED_BITS=0";; + *) AC_MSG_ERROR("--enable-sim-reserved-bits does not take a value"); sim_reserved_bits="";; +esac +if test x"$silent" != x"yes" && test x"$sim_reserved_bits" != x""; then + echo "Setting reserved flags = $sim_reserved_bits" 6>&1 +fi],[sim_reserved_bits="-DWITH_RESERVED_BITS=${default_sim_reserved_bits}"])dnl +]) +AC_SUBST(sim_reserved_bits) + + +AC_DEFUN([SIM_AC_OPTION_SMP], +[ +default_sim_smp="ifelse([$1],,5,[$1])" +AC_ARG_ENABLE(sim-smp, +[ --enable-sim-smp=n Specify number of processors to configure for (default ${default_sim_smp}).], +[case "${enableval}" in + yes) sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5";; + no) sim_smp="-DWITH_SMP=0" ; sim_igen_smp="-N 0";; + *) sim_smp="-DWITH_SMP=$enableval" ; sim_igen_smp="-N $enableval";; +esac +if test x"$silent" != x"yes" && test x"$sim_smp" != x""; then + echo "Setting smp flags = $sim_smp" 6>&1 +fi],[sim_smp="-DWITH_SMP=${default_sim_smp}" ; sim_igen_smp="-N ${default_sim_smp}" +if test x"$silent" != x"yes"; then + echo "Setting smp flags = $sim_smp" 6>&1 +fi])dnl +]) +AC_SUBST(sim_smp) + + +AC_DEFUN([SIM_AC_OPTION_STDCALL], +[ +AC_ARG_ENABLE(sim-stdcall, +[ --enable-sim-stdcall=type Use an alternative function call/return mechanism - x86/GCC specific.], +[case "${enableval}" in + no) sim_stdcall="" ;; + std*) sim_stdcall="-DWITH_STDCALL=1";; + yes) sim_stdcall="-DWITH_STDCALL=1";; + *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-stdcall"); sim_stdcall="";; +esac +if test x"$silent" != x"yes" && test x"$sim_stdcall" != x""; then + echo "Setting function call flags = $sim_stdcall" 6>&1 +fi],[sim_stdcall=""])dnl +]) +AC_SUBST(sim_stdcall) + + +AC_DEFUN([SIM_AC_OPTION_XOR_ENDIAN], +[ +default_sim_xor_endian="ifelse([$1],,8,[$1])" +AC_ARG_ENABLE(sim-xor-endian, +[ --enable-sim-xor-endian=n Specify number bytes involved in XOR bi-endian mode (default ${default_sim_xor_endian}).], +[case "${enableval}" in + yes) sim_xor_endian="-DWITH_XOR_ENDIAN=8";; + no) sim_xor_endian="-DWITH_XOR_ENDIAN=0";; + *) sim_xor_endian="-DWITH_XOR_ENDIAN=$enableval";; +esac +if test x"$silent" != x"yes" && test x"$sim_xor_endian" != x""; then + echo "Setting xor-endian flag = $sim_xor_endian" 6>&1 +fi],[sim_xor_endian="-DWITH_XOR_ENDIAN=${default_sim_xor_endian}"])dnl +]) +AC_SUBST(sim_xor_endian) + + +dnl --enable-build-warnings is for developers of the simulator. +dnl it enables extra GCC specific warnings. +AC_DEFUN([SIM_AC_OPTION_WARNINGS], +[ +# NOTE: Don't add -Wall or -Wunused, they both include +# -Wunused-parameter which reports bogus warnings. +# NOTE: If you add to this list, remember to update +# gdb/doc/gdbint.texinfo. +build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ +-Wformat -Wparentheses -Wpointer-arith" +# GCC supports -Wuninitialized only with -O or -On, n != 0. +if test x${CFLAGS+set} = xset; then + case "${CFLAGS}" in + *"-O0"* ) ;; + *"-O"* ) + build_warnings="${build_warnings} -Wuninitialized" + ;; + esac +else + build_warnings="${build_warnings} -Wuninitialized" +fi +# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs +# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value +# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual +# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes +# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls +# -Woverloaded-virtual -Winline -Werror" +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 compiler warning flags = $build_warnings" 6>&1 +fi])dnl +AC_ARG_ENABLE(sim-build-warnings, +[ --enable-gdb-build-warnings Enable SIM specific 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 GDB specific compiler warning flags = $build_warnings" 6>&1 +fi])dnl +WARN_CFLAGS="" +WERROR_CFLAGS="" +if test "x${build_warnings}" != x -a "x$GCC" = xyes +then + AC_MSG_CHECKING(compiler warning flags) + # Separate out the -Werror flag as some files just cannot be + # compiled with it enabled. + for w in ${build_warnings}; do + case $w in + -Werr*) WERROR_CFLAGS=-Werror ;; + *) # Check that GCC accepts it + saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $w" + AC_TRY_COMPILE([],[],WARN_CFLAGS="${WARN_CFLAGS} $w",) + CFLAGS="$saved_CFLAGS" + esac + done + AC_MSG_RESULT(${WARN_CFLAGS}${WERROR_CFLAGS}) +fi +]) +AC_SUBST(WARN_CFLAGS) +AC_SUBST(WERROR_CFLAGS) + + +dnl Generate the Makefile in a target specific directory. +dnl Substitutions aren't performed on the file in AC_SUBST_FILE, +dnl so this is a cover macro to tuck the details away of how we cope. +dnl We cope by having autoconf generate two files and then merge them into +dnl one afterwards. The two pieces of the common fragment are inserted into +dnl the target's fragment at the appropriate points. + +AC_DEFUN([SIM_AC_OUTPUT], +[ +AC_LINK_FILES($sim_link_files, $sim_link_links) +dnl Make @cgen_breaks@ non-null only if the sim uses CGEN. +cgen_breaks="" +if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then +cgen_breaks="break cgen_rtx_error"; +fi +AC_SUBST(cgen_breaks) +AC_CONFIG_FILES(Makefile.sim:Makefile.in) +AC_CONFIG_FILES(Make-common.sim:../common/Make-common.in) +AC_CONFIG_FILES(.gdbinit:../common/gdbinit.in) +AC_CONFIG_COMMANDS([Makefile], +[echo "Merging Makefile.sim+Make-common.sim into Makefile ..." + rm -f Makesim1.tmp Makesim2.tmp Makefile + sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' Makesim1.tmp + sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' Makesim2.tmp + sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \ + -e '/^## COMMON_POST_/ r Makesim2.tmp' \ + Makefile + rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp +]) +AC_CONFIG_COMMANDS([stamp-h], [echo > stamp-h]) +AC_OUTPUT +]) + +sinclude(../../config/gettext-sister.m4) +sinclude(../../config/acx.m4) + +dnl --enable-cgen-maint support +AC_DEFUN([SIM_AC_OPTION_CGEN_MAINT], +[ +cgen_maint=no +dnl Default is to use one in build tree. +cgen=guile +cgendir='$(srcdir)/../../cgen' +dnl Having --enable-maintainer-mode take arguments is another way to go. +dnl ??? One can argue --with is more appropriate if one wants to specify +dnl a directory name, but what we're doing here is an enable/disable kind +dnl of thing and specifying both --enable and --with is klunky. +dnl If you reeely want this to be --with, go ahead and change it. +AC_ARG_ENABLE(cgen-maint, +[ --enable-cgen-maint[=DIR] build cgen generated files], +[case "${enableval}" in + yes) cgen_maint=yes ;; + no) cgen_maint=no ;; + *) + # argument is cgen install directory (not implemented yet). + # Having a `share' directory might be more appropriate for the .scm, + # .cpu, etc. files. + cgendir=${cgen_maint}/lib/cgen + cgen=guile + ;; +esac])dnl +dnl AM_CONDITIONAL(CGEN_MAINT, test x${cgen_maint} != xno) +if test x${cgen_maint} != xno ; then + CGEN_MAINT='' +else + CGEN_MAINT='#' +fi +AC_SUBST(CGEN_MAINT) +AC_SUBST(cgendir) +AC_SUBST(cgen) +]) diff --git a/sim/common/aclocal.m4 b/sim/common/aclocal.m4 index 11398f5cb4..cdae6e7f72 100644 --- a/sim/common/aclocal.m4 +++ b/sim/common/aclocal.m4 @@ -1,945 +1,14 @@ -# This file contains common code used by all simulators. -# -# SIM_AC_COMMON invokes AC macros used by all simulators and by the common -# directory. It is intended to be invoked before any target specific stuff. -# SIM_AC_OUTPUT is a cover function to AC_OUTPUT to generate the Makefile. -# It is intended to be invoked last. -# -# The simulator's configure.in should look like: -# -# dnl Process this file with autoconf to produce a configure script. -# AC_PREREQ(2.64)dnl -# AC_INIT(Makefile.in) -# sinclude(../common/aclocal.m4) -# -# SIM_AC_COMMON -# -# ... target specific stuff ... -# -# SIM_AC_OUTPUT +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- -# Include global overrides and fixes for Autoconf. -m4_include(../../config/override.m4) -sinclude([../../config/zlib.m4]) +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -AC_DEFUN([SIM_AC_COMMON], -[ -AC_REQUIRE([AC_PROG_CC]) -# autoconf.info says this should be called right after AC_INIT. -AC_CONFIG_HEADER(ifelse([$1],,config.h,[$1]):config.in) -AC_CANONICAL_SYSTEM -AC_ARG_PROGRAM -AC_PROG_INSTALL +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. -# Put a plausible default for CC_FOR_BUILD in Makefile. -if test "x$cross_compiling" = "xno"; then - CC_FOR_BUILD='$(CC)' -else - CC_FOR_BUILD=gcc -fi -AC_SUBST(CC_FOR_BUILD) - -AC_SUBST(CFLAGS) -AC_SUBST(HDEFINES) -AR=${AR-ar} -AC_SUBST(AR) -AC_PROG_RANLIB - -dnl We don't use gettext, but bfd does. So we do the appropriate checks -dnl to see if there are intl libraries we should link against. -ALL_LINGUAS= -ZW_GNU_GETTEXT_SISTER_DIR(../../intl) - -# Check for common headers. -# FIXME: Seems to me this can cause problems for i386-windows hosts. -# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*. -AC_CHECK_HEADERS(stdlib.h string.h strings.h unistd.h time.h) -AC_CHECK_HEADERS(sys/time.h sys/resource.h) -AC_CHECK_HEADERS(fcntl.h fpu_control.h) -AC_CHECK_HEADERS(dlfcn.h errno.h sys/stat.h) -AC_CHECK_FUNCS(getrusage time sigaction __setfpucw) - -# Check for socket libraries -AC_CHECK_LIB(socket, bind) -AC_CHECK_LIB(nsl, gethostbyname) - -# BFD conditionally uses zlib, so we must link it in if libbfd does, by -# using the same condition. -AM_ZLIB - -. ${srcdir}/../../bfd/configure.host - -dnl Standard (and optional) simulator options. -dnl Eventually all simulators will support these. -dnl Do not add any here that cannot be supported by all simulators. -dnl Do not add similar but different options to a particular simulator, -dnl all shall eventually behave the same way. - - -dnl We don't use automake, but we still want to support -dnl --enable-maintainer-mode. -USE_MAINTAINER_MODE=no -AC_ARG_ENABLE(maintainer-mode, -[ --enable-maintainer-mode Enable developer functionality.], -[case "${enableval}" in - yes) MAINT="" USE_MAINTAINER_MODE=yes ;; - no) MAINT="#" ;; - *) AC_MSG_ERROR("--enable-maintainer-mode does not take a value"); MAINT="#" ;; -esac -if test x"$silent" != x"yes" && test x"$MAINT" = x""; then - echo "Setting maintainer mode" 6>&1 -fi],[MAINT="#"])dnl -AC_SUBST(MAINT) - - -dnl This is a generic option to enable special byte swapping -dnl insns on *any* cpu. -AC_ARG_ENABLE(sim-bswap, -[ --enable-sim-bswap Use Host specific BSWAP instruction.], -[case "${enableval}" in - yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";; - no) sim_bswap="-DWITH_BSWAP=0";; - *) AC_MSG_ERROR("--enable-sim-bswap does not take a value"); sim_bswap="";; -esac -if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then - echo "Setting bswap flags = $sim_bswap" 6>&1 -fi],[sim_bswap=""])dnl -AC_SUBST(sim_bswap) - - -AC_ARG_ENABLE(sim-cflags, -[ --enable-sim-cflags=opts Extra CFLAGS for use in building simulator], -[case "${enableval}" in - yes) sim_cflags="-O2 -fomit-frame-pointer";; - trace) AC_MSG_ERROR("Please use --enable-sim-debug instead."); sim_cflags="";; - no) sim_cflags="";; - *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;; -esac -if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then - echo "Setting sim cflags = $sim_cflags" 6>&1 -fi],[sim_cflags=""])dnl -AC_SUBST(sim_cflags) - - -dnl --enable-sim-debug is for developers of the simulator -dnl the allowable values are work-in-progress -AC_ARG_ENABLE(sim-debug, -[ --enable-sim-debug=opts Enable debugging flags], -[case "${enableval}" in - yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";; - no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";; - *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";; -esac -if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then - echo "Setting sim debug = $sim_debug" 6>&1 -fi],[sim_debug=""])dnl -AC_SUBST(sim_debug) - - -dnl --enable-sim-stdio is for users of the simulator -dnl It determines if IO from the program is routed through STDIO (buffered) -AC_ARG_ENABLE(sim-stdio, -[ --enable-sim-stdio Specify whether to use stdio for console input/output.], -[case "${enableval}" in - yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";; - no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";; - *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-stdio"); sim_stdio="";; -esac -if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then - echo "Setting stdio flags = $sim_stdio" 6>&1 -fi],[sim_stdio=""])dnl -AC_SUBST(sim_stdio) - - -dnl --enable-sim-trace is for users of the simulator -dnl The argument is either a bitmask of things to enable [exactly what is -dnl up to the simulator], or is a comma separated list of names of tracing -dnl elements to enable. The latter is only supported on simulators that -dnl use WITH_TRACE. -AC_ARG_ENABLE(sim-trace, -[ --enable-sim-trace=opts Enable tracing flags], -[case "${enableval}" in - yes) sim_trace="-DTRACE=1 -DWITH_TRACE=-1";; - no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";; - [[-0-9]]*) - sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";; - [[a-z]]*) - sim_trace="" - for x in `echo "$enableval" | sed -e "s/,/ /g"`; do - if test x"$sim_trace" = x; then - sim_trace="-DWITH_TRACE='(TRACE_$x" - else - sim_trace="${sim_trace}|TRACE_$x" - fi - done - sim_trace="$sim_trace)'" ;; -esac -if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then - echo "Setting sim trace = $sim_trace" 6>&1 -fi],[sim_trace=""])dnl -AC_SUBST(sim_trace) - - -dnl --enable-sim-profile -dnl The argument is either a bitmask of things to enable [exactly what is -dnl up to the simulator], or is a comma separated list of names of profiling -dnl elements to enable. The latter is only supported on simulators that -dnl use WITH_PROFILE. -AC_ARG_ENABLE(sim-profile, -[ --enable-sim-profile=opts Enable profiling flags], -[case "${enableval}" in - yes) sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";; - no) sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";; - [[-0-9]]*) - sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";; - [[a-z]]*) - sim_profile="" - for x in `echo "$enableval" | sed -e "s/,/ /g"`; do - if test x"$sim_profile" = x; then - sim_profile="-DWITH_PROFILE='(PROFILE_$x" - else - sim_profile="${sim_profile}|PROFILE_$x" - fi - done - sim_profile="$sim_profile)'" ;; -esac -if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then - echo "Setting sim profile = $sim_profile" 6>&1 -fi],[sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1"])dnl -AC_SUBST(sim_profile) - -ACX_PKGVERSION([GDB]) -ACX_BUGURL([http://www.gnu.org/software/gdb/bugs/]) -AC_DEFINE_UNQUOTED([PKGVERSION], ["$PKGVERSION"], [Additional package description]) -AC_DEFINE_UNQUOTED([REPORT_BUGS_TO], ["$REPORT_BUGS_TO"], [Bug reporting address]) - -dnl Types used by common code -AC_TYPE_SIGNAL - -dnl Detect exe extension -AC_EXEEXT - -dnl These are available to append to as desired. -sim_link_files= -sim_link_links= - -dnl Create tconfig.h either from simulator's tconfig.in or default one -dnl in common. -sim_link_links=tconfig.h -if test -f ${srcdir}/tconfig.in -then - sim_link_files=tconfig.in -else - sim_link_files=../common/tconfig.in -fi - -# targ-vals.def points to the libc macro description file. -case "${target}" in -*-*-*) TARG_VALS_DEF=../common/nltvals.def ;; -esac -sim_link_files="${sim_link_files} ${TARG_VALS_DEF}" -sim_link_links="${sim_link_links} targ-vals.def" - -]) dnl End of SIM_AC_COMMON - - -dnl Additional SIM options that can (optionally) be configured -dnl For optional simulator options, a macro SIM_AC_OPTION_* is defined. -dnl Simulators that wish to use the relevant option specify the macro -dnl in the simulator specific configure.in file between the SIM_AC_COMMON -dnl and SIM_AC_OUTPUT lines. - - -dnl Specify the running environment. -dnl If the simulator invokes this in its configure.in then without this option -dnl the default is the user environment and all are runtime selectable. -dnl If the simulator doesn't invoke this, only the user environment is -dnl supported. -dnl ??? Until there is demonstrable value in doing something more complicated, -dnl let's not. -AC_DEFUN([SIM_AC_OPTION_ENVIRONMENT], -[ -AC_ARG_ENABLE(sim-environment, -[ --enable-sim-environment=environment Specify mixed, user, virtual or operating environment.], -[case "${enableval}" in - all | ALL) sim_environment="-DWITH_ENVIRONMENT=ALL_ENVIRONMENT";; - user | USER) sim_environment="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";; - virtual | VIRTUAL) sim_environment="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT";; - operating | OPERATING) sim_environment="-DWITH_ENVIRONMENT=OPERATING_ENVIRONMENT";; - *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-environment"); - sim_environment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_environment" != x""; then - echo "Setting sim environment = $sim_environment" 6>&1 -fi], -[sim_environment="-DWITH_ENVIRONMENT=ALL_ENVIRONMENT"])dnl -]) -AC_SUBST(sim_environment) - - -dnl Specify the alignment restrictions of the target architecture. -dnl Without this option all possible alignment restrictions are accommodated. -dnl arg[1] is hardwired target alignment -dnl arg[2] is default target alignment -AC_DEFUN([SIM_AC_OPTION_ALIGNMENT], -wire_alignment="[$1]" -default_alignment="[$2]" -[ -AC_ARG_ENABLE(sim-alignment, -[ --enable-sim-alignment=align Specify strict, nonstrict or forced alignment of memory accesses.], -[case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-alignment"); sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi], -[if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi])dnl -])dnl -AC_SUBST(sim_alignment) - - -dnl Conditionally compile in assertion statements. -AC_DEFUN([SIM_AC_OPTION_ASSERT], -[ -AC_ARG_ENABLE(sim-assert, -[ --enable-sim-assert Specify whether to perform random assertions.], -[case "${enableval}" in - yes) sim_assert="-DWITH_ASSERT=1";; - no) sim_assert="-DWITH_ASSERT=0";; - *) AC_MSG_ERROR("--enable-sim-assert does not take a value"); sim_assert="";; -esac -if test x"$silent" != x"yes" && test x"$sim_assert" != x""; then - echo "Setting assert flags = $sim_assert" 6>&1 -fi],[sim_assert=""])dnl -]) -AC_SUBST(sim_assert) - - - -dnl --enable-sim-bitsize is for developers of the simulator -dnl It specifies the number of BITS in the target. -dnl arg[1] is the number of bits in a word -dnl arg[2] is the number assigned to the most significant bit -dnl arg[3] is the number of bits in an address -dnl arg[4] is the number of bits in an OpenFirmware cell. -dnl FIXME: this information should be obtained from bfd/archure -AC_DEFUN([SIM_AC_OPTION_BITSIZE], -wire_word_bitsize="[$1]" -wire_word_msb="[$2]" -wire_address_bitsize="[$3]" -wire_cell_bitsize="[$4]" -[AC_ARG_ENABLE(sim-bitsize, -[ --enable-sim-bitsize=N Specify target bitsize (32 or 64).], -[sim_bitsize= -case "${enableval}" in - 64,63 | 64,63,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63";; - 32,31 | 32,31,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31";; - 64,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";; - 32,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";; - 32) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then - sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31" - else - sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0" - fi ;; - 64) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then - sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63" - else - sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=0" - fi ;; - *) AC_MSG_ERROR("--enable-sim-bitsize was given $enableval. Expected 32 or 64") ;; -esac -# address bitsize -tmp=`echo "${enableval}" | sed -e "s/^[[0-9]]*,*[[0-9]]*,*//"` -case x"${tmp}" in - x ) ;; - x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=32" ;; - x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=64" ;; - * ) AC_MSG_ERROR("--enable-sim-bitsize was given address size $enableval. Expected 32 or 64") ;; -esac -# cell bitsize -tmp=`echo "${enableval}" | sed -e "s/^[[0-9]]*,*[[0-9*]]*,*[[0-9]]*,*//"` -case x"${tmp}" in - x ) ;; - x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=32" ;; - x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=64" ;; - * ) AC_MSG_ERROR("--enable-sim-bitsize was given cell size $enableval. Expected 32 or 64") ;; -esac -if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then - echo "Setting bitsize flags = $sim_bitsize" 6>&1 -fi], -[sim_bitsize="" -if test x"$wire_word_bitsize" != x; then - sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_BITSIZE=$wire_word_bitsize" -fi -if test x"$wire_word_msb" != x; then - sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_MSB=$wire_word_msb" -fi -if test x"$wire_address_bitsize" != x; then - sim_bitsize="$sim_bitsize -DWITH_TARGET_ADDRESS_BITSIZE=$wire_address_bitsize" -fi -if test x"$wire_cell_bitsize" != x; then - sim_bitsize="$sim_bitsize -DWITH_TARGET_CELL_BITSIZE=$wire_cell_bitsize" -fi])dnl -]) -AC_SUBST(sim_bitsize) - - - -dnl --enable-sim-endian={yes,no,big,little} is for simulators -dnl that support both big and little endian targets. -dnl arg[1] is hardwired target endianness. -dnl arg[2] is default target endianness. -AC_DEFUN([SIM_AC_OPTION_ENDIAN], -[ -wire_endian="[$1]" -default_endian="[$2]" -AC_ARG_ENABLE(sim-endian, -[ --enable-sim-endian=endian Specify target byte endian orientation.], -[case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" - fi - fi;; - *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-endian"); sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi], -[if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" - else - sim_endian= - fi -fi])dnl -]) -AC_SUBST(sim_endian) - - -dnl --enable-sim-hostendian is for users of the simulator when -dnl they find that AC_C_BIGENDIAN does not function correctly -dnl (for instance in a canadian cross) -AC_DEFUN([SIM_AC_OPTION_HOSTENDIAN], -[ -AC_ARG_ENABLE(sim-hostendian, -[ --enable-sim-hostendian=end Specify host byte endian orientation.], -[case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; - *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-hostendian"); sim_hostendian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then - echo "Setting hostendian flags = $sim_hostendian" 6>&1 -fi],[ -if test "x$cross_compiling" = "xno"; then - AC_C_BIGENDIAN - if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" - else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" - fi -else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" -fi])dnl -]) -AC_SUBST(sim_hostendian) - - -dnl --enable-sim-float is for developers of the simulator -dnl It specifies the presence of hardware floating point -dnl And optionally the bitsize of the floating point register. -dnl arg[1] specifies the presence (or absence) of floating point hardware -dnl arg[2] specifies the number of bits in a floating point register -AC_DEFUN([SIM_AC_OPTION_FLOAT], -[ -default_sim_float="[$1]" -default_sim_float_bitsize="[$2]" -AC_ARG_ENABLE(sim-float, -[ --enable-sim-float Specify that the target processor has floating point hardware.], -[case "${enableval}" in - yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";; - no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";; - 32) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=32";; - 64) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=64";; - *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-float"); sim_float="";; -esac -if test x"$silent" != x"yes" && test x"$sim_float" != x""; then - echo "Setting float flags = $sim_float" 6>&1 -fi],[ -sim_float= -if test x"${default_sim_float}" != x""; then - sim_float="-DWITH_FLOATING_POINT=${default_sim_float}" -fi -if test x"${default_sim_float_bitsize}" != x""; then - sim_float="$sim_float -DWITH_TARGET_FLOATING_POINT_BITSIZE=${default_sim_float_bitsize}" -fi -])dnl -]) -AC_SUBST(sim_float) - - -dnl The argument is the default cache size if none is specified. -AC_DEFUN([SIM_AC_OPTION_SCACHE], -[ -default_sim_scache="ifelse([$1],,0,[$1])" -AC_ARG_ENABLE(sim-scache, -[ --enable-sim-scache=size Specify simulator execution cache size.], -[case "${enableval}" in - yes) sim_scache="-DWITH_SCACHE=${default_sim_scache}";; - no) sim_scache="-DWITH_SCACHE=0" ;; - [[0-9]]*) sim_scache="-DWITH_SCACHE=${enableval}";; - *) AC_MSG_ERROR("Bad value $enableval passed to --enable-sim-scache"); - sim_scache="";; -esac -if test x"$silent" != x"yes" && test x"$sim_scache" != x""; then - echo "Setting scache size = $sim_scache" 6>&1 -fi],[sim_scache="-DWITH_SCACHE=${default_sim_scache}"]) -]) -AC_SUBST(sim_scache) - - -dnl The argument is the default model if none is specified. -AC_DEFUN([SIM_AC_OPTION_DEFAULT_MODEL], -[ -default_sim_default_model="ifelse([$1],,0,[$1])" -AC_ARG_ENABLE(sim-default-model, -[ --enable-sim-default-model=model Specify default model to simulate.], -[case "${enableval}" in - yes|no) AC_MSG_ERROR("Missing argument to --enable-sim-default-model");; - *) sim_default_model="-DWITH_DEFAULT_MODEL='\"${enableval}\"'";; -esac -if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then - echo "Setting default model = $sim_default_model" 6>&1 -fi],[sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"]) -]) -AC_SUBST(sim_default_model) - - -dnl --enable-sim-hardware is for users of the simulator -dnl arg[1] Enable sim-hw by default? ("yes" or "no") -dnl arg[2] is a space separated list of devices that override the defaults -dnl arg[3] is a space separated list of extra target specific devices. -AC_DEFUN([SIM_AC_OPTION_HARDWARE], -[ -if test x"[$1]" = x"yes"; then - sim_hw_p=yes -else - sim_hw_p=no -fi -if test "[$2]"; then - hardware="[$2]" -else - hardware="cfi core pal glue" -fi -hardware="$hardware [$3]" -sim_hw_cflags="-DWITH_HW=1" -sim_hw="$hardware" -sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([[^ ]][[^ ]]*\)/dv-\1.o/g'`" -AC_ARG_ENABLE(sim-hardware, -[ --enable-sim-hardware=LIST Specify the hardware to be included in the build.], -[ -case "${enableval}" in - yes) sim_hw_p=yes;; - no) sim_hw_p=no;; - ,*) sim_hw_p=yes; hardware="${hardware} `echo ${enableval} | sed -e 's/,/ /'`";; - *,) sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'` ${hardware}";; - *) sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'`"'';; -esac -if test "$sim_hw_p" != yes; then - sim_hw_objs= - sim_hw_cflags="-DWITH_HW=0" - sim_hw= -else - sim_hw_cflags="-DWITH_HW=1" - # remove duplicates - sim_hw="" - sim_hw_objs="\$(SIM_COMMON_HW_OBJS)" - for i in $hardware ; do - case " $sim_hw " in - *" $i "*) ;; - *) sim_hw="$sim_hw $i" ; sim_hw_objs="$sim_hw_objs dv-$i.o";; - esac - done -fi -if test x"$silent" != x"yes" && test "$sim_hw_p" = "yes"; then - echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs" -fi],[ -if test "$sim_hw_p" != yes; then - sim_hw_objs= - sim_hw_cflags="-DWITH_HW=0" - sim_hw= -fi -if test x"$silent" != x"yes"; then - echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs" -fi])dnl -]) -AC_SUBST(sim_hw_cflags) -AC_SUBST(sim_hw_objs) -AC_SUBST(sim_hw) - - -dnl --enable-sim-inline is for users that wish to ramp up the simulator's -dnl performance by inlining functions. -dnl Guarantee that unconfigured simulators do not do any inlining -sim_inline="-DDEFAULT_INLINE=0" -AC_DEFUN([SIM_AC_OPTION_INLINE], -[ -default_sim_inline="ifelse([$1],,,-DDEFAULT_INLINE=[$1])" -AC_ARG_ENABLE(sim-inline, -[ --enable-sim-inline=inlines Specify which functions should be inlined.], -[sim_inline="" -case "$enableval" in - no) sim_inline="-DDEFAULT_INLINE=0";; - 0) sim_inline="-DDEFAULT_INLINE=0";; - yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_C_INLINE";; - 1) sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";; - *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do - new_flag="" - case "$x" in - *_INLINE=*) new_flag="-D$x";; - *=*) new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;; - *_INLINE) new_flag="-D$x=ALL_C_INLINE";; - *) new_flag="-D$x""_INLINE=ALL_C_INLINE";; - esac - if test x"$sim_inline" = x""; then - sim_inline="$new_flag" - else - sim_inline="$sim_inline $new_flag" - fi - done;; -esac -if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then - echo "Setting inline flags = $sim_inline" 6>&1 -fi],[ -if test "x$cross_compiling" = "xno"; then - if test x"$GCC" != "x" -a x"${default_sim_inline}" != "x" ; then - sim_inline="${default_sim_inline}" - if test x"$silent" != x"yes"; then - echo "Setting inline flags = $sim_inline" 6>&1 - fi - else - sim_inline="" - fi -else - sim_inline="-DDEFAULT_INLINE=0" -fi])dnl -]) -AC_SUBST(sim_inline) - - -AC_DEFUN([SIM_AC_OPTION_PACKAGES], -[ -AC_ARG_ENABLE(sim-packages, -[ --enable-sim-packages=list Specify the packages to be included in the build.], -[packages=disklabel -case "${enableval}" in - yes) ;; - no) AC_MSG_ERROR("List of packages must be specified for --enable-sim-packages"); packages="";; - ,*) packages="${packages}${enableval}";; - *,) packages="${enableval}${packages}";; - *) packages="${enableval}"'';; -esac -sim_pk_src=`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$/.c/'` -sim_pk_obj=`echo $sim_pk_src | sed -e 's/\.c/.o/g'` -if test x"$silent" != x"yes" && test x"$packages" != x""; then - echo "Setting packages to $sim_pk_src, $sim_pk_obj" -fi],[packages=disklabel -sim_pk_src=`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$/.c/'` -sim_pk_obj=`echo $sim_pk_src | sed -e 's/\.c/.o/g'` -if test x"$silent" != x"yes"; then - echo "Setting packages to $sim_pk_src, $sim_pk_obj" -fi])dnl -]) -AC_SUBST(sim_packages) - - -AC_DEFUN([SIM_AC_OPTION_REGPARM], -[ -AC_ARG_ENABLE(sim-regparm, -[ --enable-sim-regparm=nr-parm Pass parameters in registers instead of on the stack - x86/GCC specific.], -[case "${enableval}" in - 0*|1*|2*|3*|4*|5*|6*|7*|8*|9*) sim_regparm="-DWITH_REGPARM=${enableval}";; - no) sim_regparm="" ;; - yes) sim_regparm="-DWITH_REGPARM=3";; - *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-regparm"); sim_regparm="";; -esac -if test x"$silent" != x"yes" && test x"$sim_regparm" != x""; then - echo "Setting regparm flags = $sim_regparm" 6>&1 -fi],[sim_regparm=""])dnl -]) -AC_SUBST(sim_regparm) - - -AC_DEFUN([SIM_AC_OPTION_RESERVED_BITS], -[ -default_sim_reserved_bits="ifelse([$1],,1,[$1])" -AC_ARG_ENABLE(sim-reserved-bits, -[ --enable-sim-reserved-bits Specify whether to check reserved bits in instruction.], -[case "${enableval}" in - yes) sim_reserved_bits="-DWITH_RESERVED_BITS=1";; - no) sim_reserved_bits="-DWITH_RESERVED_BITS=0";; - *) AC_MSG_ERROR("--enable-sim-reserved-bits does not take a value"); sim_reserved_bits="";; -esac -if test x"$silent" != x"yes" && test x"$sim_reserved_bits" != x""; then - echo "Setting reserved flags = $sim_reserved_bits" 6>&1 -fi],[sim_reserved_bits="-DWITH_RESERVED_BITS=${default_sim_reserved_bits}"])dnl -]) -AC_SUBST(sim_reserved_bits) - - -AC_DEFUN([SIM_AC_OPTION_SMP], -[ -default_sim_smp="ifelse([$1],,5,[$1])" -AC_ARG_ENABLE(sim-smp, -[ --enable-sim-smp=n Specify number of processors to configure for (default ${default_sim_smp}).], -[case "${enableval}" in - yes) sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5";; - no) sim_smp="-DWITH_SMP=0" ; sim_igen_smp="-N 0";; - *) sim_smp="-DWITH_SMP=$enableval" ; sim_igen_smp="-N $enableval";; -esac -if test x"$silent" != x"yes" && test x"$sim_smp" != x""; then - echo "Setting smp flags = $sim_smp" 6>&1 -fi],[sim_smp="-DWITH_SMP=${default_sim_smp}" ; sim_igen_smp="-N ${default_sim_smp}" -if test x"$silent" != x"yes"; then - echo "Setting smp flags = $sim_smp" 6>&1 -fi])dnl -]) -AC_SUBST(sim_smp) - - -AC_DEFUN([SIM_AC_OPTION_STDCALL], -[ -AC_ARG_ENABLE(sim-stdcall, -[ --enable-sim-stdcall=type Use an alternative function call/return mechanism - x86/GCC specific.], -[case "${enableval}" in - no) sim_stdcall="" ;; - std*) sim_stdcall="-DWITH_STDCALL=1";; - yes) sim_stdcall="-DWITH_STDCALL=1";; - *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-stdcall"); sim_stdcall="";; -esac -if test x"$silent" != x"yes" && test x"$sim_stdcall" != x""; then - echo "Setting function call flags = $sim_stdcall" 6>&1 -fi],[sim_stdcall=""])dnl -]) -AC_SUBST(sim_stdcall) - - -AC_DEFUN([SIM_AC_OPTION_XOR_ENDIAN], -[ -default_sim_xor_endian="ifelse([$1],,8,[$1])" -AC_ARG_ENABLE(sim-xor-endian, -[ --enable-sim-xor-endian=n Specify number bytes involved in XOR bi-endian mode (default ${default_sim_xor_endian}).], -[case "${enableval}" in - yes) sim_xor_endian="-DWITH_XOR_ENDIAN=8";; - no) sim_xor_endian="-DWITH_XOR_ENDIAN=0";; - *) sim_xor_endian="-DWITH_XOR_ENDIAN=$enableval";; -esac -if test x"$silent" != x"yes" && test x"$sim_xor_endian" != x""; then - echo "Setting xor-endian flag = $sim_xor_endian" 6>&1 -fi],[sim_xor_endian="-DWITH_XOR_ENDIAN=${default_sim_xor_endian}"])dnl -]) -AC_SUBST(sim_xor_endian) - - -dnl --enable-build-warnings is for developers of the simulator. -dnl it enables extra GCC specific warnings. -AC_DEFUN([SIM_AC_OPTION_WARNINGS], -[ -# NOTE: Don't add -Wall or -Wunused, they both include -# -Wunused-parameter which reports bogus warnings. -# NOTE: If you add to this list, remember to update -# gdb/doc/gdbint.texinfo. -build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ --Wformat -Wparentheses -Wpointer-arith" -# GCC supports -Wuninitialized only with -O or -On, n != 0. -if test x${CFLAGS+set} = xset; then - case "${CFLAGS}" in - *"-O0"* ) ;; - *"-O"* ) - build_warnings="${build_warnings} -Wuninitialized" - ;; - esac -else - build_warnings="${build_warnings} -Wuninitialized" -fi -# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs -# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value -# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual -# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes -# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -# -Woverloaded-virtual -Winline -Werror" -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 compiler warning flags = $build_warnings" 6>&1 -fi])dnl -AC_ARG_ENABLE(sim-build-warnings, -[ --enable-gdb-build-warnings Enable SIM specific 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 GDB specific compiler warning flags = $build_warnings" 6>&1 -fi])dnl -WARN_CFLAGS="" -WERROR_CFLAGS="" -if test "x${build_warnings}" != x -a "x$GCC" = xyes -then - AC_MSG_CHECKING(compiler warning flags) - # Separate out the -Werror flag as some files just cannot be - # compiled with it enabled. - for w in ${build_warnings}; do - case $w in - -Werr*) WERROR_CFLAGS=-Werror ;; - *) # Check that GCC accepts it - saved_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $w" - AC_TRY_COMPILE([],[],WARN_CFLAGS="${WARN_CFLAGS} $w",) - CFLAGS="$saved_CFLAGS" - esac - done - AC_MSG_RESULT(${WARN_CFLAGS}${WERROR_CFLAGS}) -fi -]) -AC_SUBST(WARN_CFLAGS) -AC_SUBST(WERROR_CFLAGS) - - -dnl Generate the Makefile in a target specific directory. -dnl Substitutions aren't performed on the file in AC_SUBST_FILE, -dnl so this is a cover macro to tuck the details away of how we cope. -dnl We cope by having autoconf generate two files and then merge them into -dnl one afterwards. The two pieces of the common fragment are inserted into -dnl the target's fragment at the appropriate points. - -AC_DEFUN([SIM_AC_OUTPUT], -[ -AC_LINK_FILES($sim_link_files, $sim_link_links) -dnl Make @cgen_breaks@ non-null only if the sim uses CGEN. -cgen_breaks="" -if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then -cgen_breaks="break cgen_rtx_error"; -fi -AC_SUBST(cgen_breaks) -AC_CONFIG_FILES(Makefile.sim:Makefile.in) -AC_CONFIG_FILES(Make-common.sim:../common/Make-common.in) -AC_CONFIG_FILES(.gdbinit:../common/gdbinit.in) -AC_CONFIG_COMMANDS([Makefile], -[echo "Merging Makefile.sim+Make-common.sim into Makefile ..." - rm -f Makesim1.tmp Makesim2.tmp Makefile - sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' Makesim1.tmp - sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' Makesim2.tmp - sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \ - -e '/^## COMMON_POST_/ r Makesim2.tmp' \ - Makefile - rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp -]) -AC_CONFIG_COMMANDS([stamp-h], [echo > stamp-h]) -AC_OUTPUT -]) - -sinclude(../../config/gettext-sister.m4) -sinclude(../../config/acx.m4) - -dnl --enable-cgen-maint support -AC_DEFUN([SIM_AC_OPTION_CGEN_MAINT], -[ -cgen_maint=no -dnl Default is to use one in build tree. -cgen=guile -cgendir='$(srcdir)/../../cgen' -dnl Having --enable-maintainer-mode take arguments is another way to go. -dnl ??? One can argue --with is more appropriate if one wants to specify -dnl a directory name, but what we're doing here is an enable/disable kind -dnl of thing and specifying both --enable and --with is klunky. -dnl If you reeely want this to be --with, go ahead and change it. -AC_ARG_ENABLE(cgen-maint, -[ --enable-cgen-maint[=DIR] build cgen generated files], -[case "${enableval}" in - yes) cgen_maint=yes ;; - no) cgen_maint=no ;; - *) - # argument is cgen install directory (not implemented yet). - # Having a `share' directory might be more appropriate for the .scm, - # .cpu, etc. files. - cgendir=${cgen_maint}/lib/cgen - cgen=guile - ;; -esac])dnl -dnl AM_CONDITIONAL(CGEN_MAINT, test x${cgen_maint} != xno) -if test x${cgen_maint} != xno ; then - CGEN_MAINT='' -else - CGEN_MAINT='#' -fi -AC_SUBST(CGEN_MAINT) -AC_SUBST(cgendir) -AC_SUBST(cgen) -]) +m4_include([acinclude.m4]) diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog index 18949f5204..8171185fb6 100644 --- a/sim/cr16/ChangeLog +++ b/sim/cr16/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/cr16/configure.ac b/sim/cr16/configure.ac index f39788de20..a4c274e532 100644 --- a/sim/cr16/configure.ac +++ b/sim/cr16/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog index 4be4bcaff1..7c10bef76f 100644 --- a/sim/cris/ChangeLog +++ b/sim/cris/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/cris/configure.ac b/sim/cris/configure.ac index 1ec765954a..2e9050e0bf 100644 --- a/sim/cris/configure.ac +++ b/sim/cris/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index 5b049a445f..3e0031626a 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/d10v/configure.ac b/sim/d10v/configure.ac index f39788de20..a4c274e532 100644 --- a/sim/d10v/configure.ac +++ b/sim/d10v/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog index 950fdf5cef..3dbbf55173 100644 --- a/sim/erc32/ChangeLog +++ b/sim/erc32/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/erc32/configure.ac b/sim/erc32/configure.ac index c33ce789eb..5a43b5eb50 100644 --- a/sim/erc32/configure.ac +++ b/sim/erc32/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index 3cb3fd8106..c123bdd9bf 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/frv/configure.ac b/sim/frv/configure.ac index 177ff9de38..7f2b7ed8d9 100644 --- a/sim/frv/configure.ac +++ b/sim/frv/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog index 386fce5f06..f7e49595a7 100644 --- a/sim/h8300/ChangeLog +++ b/sim/h8300/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/h8300/configure.ac b/sim/h8300/configure.ac index 1e6a7db632..bc077bb3d3 100644 --- a/sim/h8300/configure.ac +++ b/sim/h8300/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/igen/ChangeLog b/sim/igen/ChangeLog index 8cf489a136..fbd36cb61d 100644 --- a/sim/igen/ChangeLog +++ b/sim/igen/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/igen/configure.ac b/sim/igen/configure.ac index adad41c5bd..4457962c33 100644 --- a/sim/igen/configure.ac +++ b/sim/igen/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59)dnl AC_INIT(table.h) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) AC_PROG_INSTALL AC_PROG_CC diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog index 3203a7c6ec..8e20f15171 100644 --- a/sim/iq2000/ChangeLog +++ b/sim/iq2000/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/iq2000/configure.ac b/sim/iq2000/configure.ac index 4eb1d9ecd6..2484b00558 100644 --- a/sim/iq2000/configure.ac +++ b/sim/iq2000/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog index 762889244d..1dd5e64211 100755 --- a/sim/lm32/ChangeLog +++ b/sim/lm32/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/lm32/configure.ac b/sim/lm32/configure.ac index 22c8e0c861..764c611eb8 100644 --- a/sim/lm32/configure.ac +++ b/sim/lm32/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog index 89e76c7d54..5adbb3d86e 100644 --- a/sim/m32c/ChangeLog +++ b/sim/m32c/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/m32c/configure.ac b/sim/m32c/configure.ac index e696e9b0f0..bf4d19a446 100644 --- a/sim/m32c/configure.ac +++ b/sim/m32c/configure.ac @@ -21,7 +21,7 @@ dnl along with this program. If not, see . dnl AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog index c62dcf6bce..a84521e192 100644 --- a/sim/m32r/ChangeLog +++ b/sim/m32r/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/m32r/configure.ac b/sim/m32r/configure.ac index b28abf0ab5..fff2a2646a 100644 --- a/sim/m32r/configure.ac +++ b/sim/m32r/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog index b6ca11d57e..39caeef413 100644 --- a/sim/m68hc11/ChangeLog +++ b/sim/m68hc11/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/m68hc11/configure.ac b/sim/m68hc11/configure.ac index 6f042b25b6..eef46914a7 100644 --- a/sim/m68hc11/configure.ac +++ b/sim/m68hc11/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog index 7236b4f02d..10bb760452 100644 --- a/sim/mcore/ChangeLog +++ b/sim/mcore/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/mcore/configure.ac b/sim/mcore/configure.ac index 6e6850cb31..dbca36d7bc 100644 --- a/sim/mcore/configure.ac +++ b/sim/mcore/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog index b8dd642831..4e68a5da30 100644 --- a/sim/microblaze/ChangeLog +++ b/sim/microblaze/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/microblaze/configure.ac b/sim/microblaze/configure.ac index 6e6850cb31..dbca36d7bc 100644 --- a/sim/microblaze/configure.ac +++ b/sim/microblaze/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index 196a12791f..ddfd7c2f48 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac index b83eab96ad..4f8b31dd01 100644 --- a/sim/mips/configure.ac +++ b/sim/mips/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index c941d906f1..b33ee2addf 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/mn10300/configure.ac b/sim/mn10300/configure.ac index f30c60aae9..8916c85f7c 100644 --- a/sim/mn10300/configure.ac +++ b/sim/mn10300/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog index 3643b9b24b..57d2360d2a 100644 --- a/sim/moxie/ChangeLog +++ b/sim/moxie/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/moxie/configure.ac b/sim/moxie/configure.ac index 1667c7a309..a6e35babdc 100644 --- a/sim/moxie/configure.ac +++ b/sim/moxie/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog index 8ad4e1acb7..4b06ba946e 100644 --- a/sim/ppc/ChangeLog +++ b/sim/ppc/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac index 7758ab16c7..9c3fa548df 100644 --- a/sim/ppc/configure.ac +++ b/sim/ppc/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) AC_PROG_INSTALL AC_PROG_CC diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog index 682a11317a..8718c258c7 100644 --- a/sim/rx/ChangeLog +++ b/sim/rx/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/rx/configure.ac b/sim/rx/configure.ac index 19657c588f..bc7bab176f 100644 --- a/sim/rx/configure.ac +++ b/sim/rx/configure.ac @@ -21,7 +21,7 @@ dnl along with this program. If not, see . dnl AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index ba0e49ad5e..0e8731d149 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/sh/configure.ac b/sim/sh/configure.ac index 6e6850cb31..dbca36d7bc 100644 --- a/sim/sh/configure.ac +++ b/sim/sh/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/sh64/ChangeLog b/sim/sh64/ChangeLog index a156688a6e..4a317dc5eb 100644 --- a/sim/sh64/ChangeLog +++ b/sim/sh64/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/sh64/configure.ac b/sim/sh64/configure.ac index 122df967dd..d719ee08c4 100644 --- a/sim/sh64/configure.ac +++ b/sim/sh64/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 3d959a6127..7a79037782 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,7 @@ +2011-10-17 Mike Frysinger + + * configure.ac: Change include to common/acinclude.m4. + 2011-10-17 Mike Frysinger * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER diff --git a/sim/v850/configure.ac b/sim/v850/configure.ac index f05f85c227..606d788f2c 100644 --- a/sim/v850/configure.ac +++ b/sim/v850/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64)dnl AC_INIT(Makefile.in) -sinclude(../common/aclocal.m4) +sinclude(../common/acinclude.m4) SIM_AC_COMMON -- 2.34.1