From 760b3e8bc9ab6e292debab7758a403fe611d302b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 6 Feb 2021 22:51:30 -0500 Subject: [PATCH] sim: common: split up acinclude.m4 into individual m4 files This file is quite large and is getting unmanageable. Split it apart to follow aclocal best practices by putting one-macro-per-file. There shouldn't be any real functional changes here as can be seen in the configure script regens. --- sim/ChangeLog | 12 + sim/aarch64/ChangeLog | 5 + sim/aarch64/aclocal.m4 | 9 +- sim/aarch64/configure | 29 +- sim/aarch64/configure.ac | 2 +- sim/arm/ChangeLog | 5 + sim/arm/aclocal.m4 | 9 +- sim/arm/configure | 29 +- sim/arm/configure.ac | 2 +- sim/avr/ChangeLog | 5 + sim/avr/aclocal.m4 | 9 +- sim/avr/configure | 29 +- sim/avr/configure.ac | 2 +- sim/bfin/ChangeLog | 5 + sim/bfin/aclocal.m4 | 11 +- sim/bfin/configure | 23 +- sim/bfin/configure.ac | 2 +- sim/bpf/ChangeLog | 5 + sim/bpf/aclocal.m4 | 13 +- sim/bpf/configure | 27 +- sim/bpf/configure.ac | 2 +- sim/common/ChangeLog | 4 + sim/common/acinclude.m4 | 875 -------------------------- sim/cr16/ChangeLog | 5 + sim/cr16/aclocal.m4 | 9 +- sim/cr16/configure | 29 +- sim/cr16/configure.ac | 2 +- sim/cris/ChangeLog | 5 + sim/cris/aclocal.m4 | 13 +- sim/cris/configure | 23 +- sim/cris/configure.ac | 2 +- sim/d10v/ChangeLog | 5 + sim/d10v/aclocal.m4 | 9 +- sim/d10v/configure | 29 +- sim/d10v/configure.ac | 2 +- sim/erc32/ChangeLog | 5 + sim/erc32/aclocal.m4 | 7 +- sim/erc32/configure | 35 +- sim/erc32/configure.ac | 2 +- sim/frv/ChangeLog | 5 + sim/frv/aclocal.m4 | 13 +- sim/frv/configure | 23 +- sim/frv/configure.ac | 2 +- sim/ft32/ChangeLog | 5 + sim/ft32/aclocal.m4 | 9 +- sim/ft32/configure | 29 +- sim/ft32/configure.ac | 2 +- sim/h8300/ChangeLog | 5 + sim/h8300/aclocal.m4 | 9 +- sim/h8300/configure | 29 +- sim/h8300/configure.ac | 2 +- sim/igen/ChangeLog | 5 + sim/igen/configure | 16 +- sim/igen/configure.ac | 2 +- sim/iq2000/ChangeLog | 5 + sim/iq2000/aclocal.m4 | 13 +- sim/iq2000/configure | 23 +- sim/iq2000/configure.ac | 2 +- sim/lm32/ChangeLog | 5 + sim/lm32/aclocal.m4 | 13 +- sim/lm32/configure | 23 +- sim/lm32/configure.ac | 2 +- sim/m32c/ChangeLog | 5 + sim/m32c/aclocal.m4 | 7 +- sim/m32c/configure | 35 +- sim/m32c/configure.ac | 2 +- sim/m32r/ChangeLog | 5 + sim/m32r/aclocal.m4 | 13 +- sim/m32r/configure | 23 +- sim/m32r/configure.ac | 2 +- sim/m4/sim_ac_common.m4 | 260 ++++++++ sim/m4/sim_ac_option_alignment.m4 | 66 ++ sim/m4/sim_ac_option_assert.m4 | 31 + sim/m4/sim_ac_option_bitsize.m4 | 81 +++ sim/m4/sim_ac_option_cgen_maint.m4 | 56 ++ sim/m4/sim_ac_option_default_model.m4 | 31 + sim/m4/sim_ac_option_endian.m4 | 65 ++ sim/m4/sim_ac_option_environment.m4 | 45 ++ sim/m4/sim_ac_option_float.m4 | 47 ++ sim/m4/sim_ac_option_hardware.m4 | 81 +++ sim/m4/sim_ac_option_inline.m4 | 50 ++ sim/m4/sim_ac_option_reserved_bits.m4 | 30 + sim/m4/sim_ac_option_scache.m4 | 34 + sim/m4/sim_ac_option_smp.m4 | 31 + sim/m4/sim_ac_option_warnings.m4 | 103 +++ sim/m4/sim_ac_option_xor_endian.m4 | 30 + sim/m4/sim_ac_output.m4 | 62 ++ sim/m68hc11/ChangeLog | 5 + sim/m68hc11/aclocal.m4 | 10 +- sim/m68hc11/configure | 23 +- sim/m68hc11/configure.ac | 2 +- sim/mcore/ChangeLog | 5 + sim/mcore/aclocal.m4 | 9 +- sim/mcore/configure | 29 +- sim/mcore/configure.ac | 2 +- sim/microblaze/ChangeLog | 5 + sim/microblaze/aclocal.m4 | 9 +- sim/microblaze/configure | 29 +- sim/microblaze/configure.ac | 2 +- sim/mips/ChangeLog | 5 + sim/mips/aclocal.m4 | 13 +- sim/mips/configure | 17 +- sim/mips/configure.ac | 2 +- sim/mn10300/ChangeLog | 5 + sim/mn10300/aclocal.m4 | 12 +- sim/mn10300/configure | 19 +- sim/mn10300/configure.ac | 2 +- sim/moxie/ChangeLog | 5 + sim/moxie/aclocal.m4 | 9 +- sim/moxie/configure | 29 +- sim/moxie/configure.ac | 2 +- sim/msp430/ChangeLog | 5 + sim/msp430/aclocal.m4 | 9 +- sim/msp430/configure | 29 +- sim/msp430/configure.ac | 2 +- sim/or1k/ChangeLog | 5 + sim/or1k/aclocal.m4 | 13 +- sim/or1k/configure | 27 +- sim/or1k/configure.ac | 2 +- sim/ppc/configure.ac | 2 +- sim/pru/ChangeLog | 5 + sim/pru/aclocal.m4 | 9 +- sim/pru/configure | 29 +- sim/pru/configure.ac | 2 +- sim/riscv/ChangeLog | 5 + sim/riscv/aclocal.m4 | 11 +- sim/riscv/configure | 27 +- sim/riscv/configure.ac | 2 +- sim/rl78/ChangeLog | 5 + sim/rl78/aclocal.m4 | 7 +- sim/rl78/configure | 35 +- sim/rl78/configure.ac | 2 +- sim/rx/ChangeLog | 5 + sim/rx/aclocal.m4 | 7 +- sim/rx/configure | 35 +- sim/rx/configure.ac | 2 +- sim/sh/ChangeLog | 5 + sim/sh/aclocal.m4 | 9 +- sim/sh/configure | 29 +- sim/sh/configure.ac | 2 +- sim/v850/ChangeLog | 5 + sim/v850/aclocal.m4 | 11 +- sim/v850/configure | 25 +- sim/v850/configure.ac | 2 +- 144 files changed, 2156 insertions(+), 1197 deletions(-) delete mode 100644 sim/common/acinclude.m4 create mode 100644 sim/m4/sim_ac_common.m4 create mode 100644 sim/m4/sim_ac_option_alignment.m4 create mode 100644 sim/m4/sim_ac_option_assert.m4 create mode 100644 sim/m4/sim_ac_option_bitsize.m4 create mode 100644 sim/m4/sim_ac_option_cgen_maint.m4 create mode 100644 sim/m4/sim_ac_option_default_model.m4 create mode 100644 sim/m4/sim_ac_option_endian.m4 create mode 100644 sim/m4/sim_ac_option_environment.m4 create mode 100644 sim/m4/sim_ac_option_float.m4 create mode 100644 sim/m4/sim_ac_option_hardware.m4 create mode 100644 sim/m4/sim_ac_option_inline.m4 create mode 100644 sim/m4/sim_ac_option_reserved_bits.m4 create mode 100644 sim/m4/sim_ac_option_scache.m4 create mode 100644 sim/m4/sim_ac_option_smp.m4 create mode 100644 sim/m4/sim_ac_option_warnings.m4 create mode 100644 sim/m4/sim_ac_option_xor_endian.m4 create mode 100644 sim/m4/sim_ac_output.m4 diff --git a/sim/ChangeLog b/sim/ChangeLog index 0014a9a6ac9..f96a5dd93a2 100644 --- a/sim/ChangeLog +++ b/sim/ChangeLog @@ -1,3 +1,15 @@ +2021-02-21 Mike Frysinger + + * m4/sim_ac_common.m4, m4/sim_ac_option_alignment.m4, + m4/sim_ac_option_assert.m4, m4/sim_ac_option_bitsize.m4, + m4/sim_ac_option_cgen_maint.m4, m4/sim_ac_option_default_model.m4, + m4/sim_ac_option_endian.m4, m4/sim_ac_option_environment.m4, + m4/sim_ac_option_float.m4, m4/sim_ac_option_hardware.m4, + m4/sim_ac_option_inline.m4, m4/sim_ac_option_reserved_bits.m4, + m4/sim_ac_option_scache.m4, m4/sim_ac_option_smp.m4, + m4/sim_ac_option_warnings.m4, m4/sim_ac_option_xor_endian.m4, + m4/sim_ac_output.m4: New files. + 2021-02-20 Mike Frysinger * configure.tgt: Move arch list ... diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog index c6ecd7f97be..4ab3c0d588f 100644 --- a/sim/aarch64/ChangeLog +++ b/sim/aarch64/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/aarch64/aclocal.m4 b/sim/aarch64/aclocal.m4 index 1c83b202f0b..3326ca9834f 100644 --- a/sim/aarch64/aclocal.m4 +++ b/sim/aarch64/aclocal.m4 @@ -98,6 +98,14 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +118,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/aarch64/configure b/sim/aarch64/configure index 72161e986f8..b4c87d90df1 100755 --- a/sim/aarch64/configure +++ b/sim/aarch64/configure @@ -631,6 +631,14 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_default_model +sim_scache +sim_float +sim_bitsize cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -747,16 +755,8 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11791,7 +11791,6 @@ _ACEOF - wire_endian="" default_endian="" # Check whether --enable-sim-endian was given. @@ -12003,6 +12002,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/aarch64/configure.ac b/sim/aarch64/configure.ac index 8ce7772379c..1c212dc2c95 100644 --- a/sim/aarch64/configure.ac +++ b/sim/aarch64/configure.ac @@ -20,7 +20,7 @@ dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . */ AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index ff9b1f8fc23..9574e7f022d 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/arm/aclocal.m4 b/sim/arm/aclocal.m4 index 1c83b202f0b..3326ca9834f 100644 --- a/sim/arm/aclocal.m4 +++ b/sim/arm/aclocal.m4 @@ -98,6 +98,14 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +118,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/arm/configure b/sim/arm/configure index 7236ae17aef..55e854ad2b2 100755 --- a/sim/arm/configure +++ b/sim/arm/configure @@ -631,6 +631,14 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_default_model +sim_scache +sim_float +sim_bitsize cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -747,16 +755,8 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11791,7 +11791,6 @@ _ACEOF - wire_endian="" default_endian="" # Check whether --enable-sim-endian was given. @@ -11999,6 +11998,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/arm/configure.ac b/sim/arm/configure.ac index e1300c85abc..88fac82e7b4 100644 --- a/sim/arm/configure.ac +++ b/sim/arm/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog index 249f634ec8d..71323f81e81 100644 --- a/sim/avr/ChangeLog +++ b/sim/avr/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/avr/aclocal.m4 b/sim/avr/aclocal.m4 index 1c83b202f0b..3326ca9834f 100644 --- a/sim/avr/aclocal.m4 +++ b/sim/avr/aclocal.m4 @@ -98,6 +98,14 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +118,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/avr/configure b/sim/avr/configure index 84107ef082b..13fe9653d3f 100755 --- a/sim/avr/configure +++ b/sim/avr/configure @@ -631,6 +631,14 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_default_model +sim_scache +sim_float +sim_bitsize cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -747,16 +755,8 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11791,7 +11791,6 @@ _ACEOF - wire_endian="LITTLE" default_endian="" # Check whether --enable-sim-endian was given. @@ -11999,6 +11998,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/avr/configure.ac b/sim/avr/configure.ac index 165b3d83a3c..92046a1762d 100644 --- a/sim/avr/configure.ac +++ b/sim/avr/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 1909707c66c..5ec53e8f584 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/bfin/aclocal.m4 b/sim/bfin/aclocal.m4 index 9c7434a2c88..8928f4ccba2 100644 --- a/sim/bfin/aclocal.m4 +++ b/sim/bfin/aclocal.m4 @@ -98,6 +98,16 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_default_model.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_hardware.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -111,4 +121,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/bfin/configure b/sim/bfin/configure index 599735c8add..706de9aa4ac 100755 --- a/sim/bfin/configure +++ b/sim/bfin/configure @@ -631,6 +631,10 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_scache +sim_float +sim_bitsize cgen_breaks SDL_LIBS SDL_CFLAGS @@ -752,16 +756,12 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize +sim_default_model sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11814,7 +11814,6 @@ _ACEOF - wire_endian="LITTLE" default_endian="" # Check whether --enable-sim-endian was given. @@ -12474,6 +12473,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/bfin/configure.ac b/sim/bfin/configure.ac index 5c70ba7758e..0ca02ba78b8 100644 --- a/sim/bfin/configure.ac +++ b/sim/bfin/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/bpf/ChangeLog b/sim/bpf/ChangeLog index cd934adacc8..a042b7fba54 100644 --- a/sim/bpf/ChangeLog +++ b/sim/bpf/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/bpf/aclocal.m4 b/sim/bpf/aclocal.m4 index 1c83b202f0b..14d865b222e 100644 --- a/sim/bpf/aclocal.m4 +++ b/sim/bpf/aclocal.m4 @@ -98,6 +98,18 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_bitsize.m4]) +m4_include([../m4/sim_ac_option_cgen_maint.m4]) +m4_include([../m4/sim_ac_option_default_model.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_scache.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +122,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/bpf/configure b/sim/bpf/configure index f9aa6aa9652..0633f8586fd 100755 --- a/sim/bpf/configure +++ b/sim/bpf/configure @@ -631,6 +631,11 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_float cgen_breaks cgen cgendir @@ -750,15 +755,10 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits -sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model sim_scache -sim_float +sim_inline sim_endian +sim_default_model sim_bitsize sim_alignment' ac_subst_files='' @@ -11803,7 +11803,6 @@ _ACEOF - wire_word_bitsize="64" wire_word_msb="" wire_address_bitsize="" @@ -12136,6 +12135,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/bpf/configure.ac b/sim/bpf/configure.ac index 4e08e2cb38e..a0f8576fc39 100644 --- a/sim/bpf/configure.ac +++ b/sim/bpf/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index faf02b3f17f..75df703075c 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,7 @@ +2021-02-21 Mike Frysinger + + * acinclude.m4: Removed. + 2021-02-13 Mike Frysinger * acinclude.m4: Delete all sinclude & m4_include calls. diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4 deleted file mode 100644 index 1337a0494b8..00000000000 --- a/sim/common/acinclude.m4 +++ /dev/null @@ -1,875 +0,0 @@ -# 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. -# -# See README-HACKING for more details. - -AC_DEFUN([SIM_AC_COMMON], -[ -AC_REQUIRE([AC_PROG_CC]) -AC_CONFIG_HEADERS([config.h:config.in]) -AC_CANONICAL_SYSTEM -AC_USE_SYSTEM_EXTENSIONS -AC_C_BIGENDIAN -AC_ARG_PROGRAM -AC_PROG_INSTALL - -# Put a plausible default for CC_FOR_BUILD in Makefile. -if test -z "$CC_FOR_BUILD"; then - if test "x$cross_compiling" = "xno"; then - CC_FOR_BUILD='$(CC)' - else - CC_FOR_BUILD=gcc - fi -fi -AC_SUBST(CC_FOR_BUILD) - -AC_SUBST(CFLAGS) -AR=${AR-ar} -AC_SUBST(AR) -AC_PROG_RANLIB - -# Require C11 or newer. Autoconf-2.70 provides ac_cv_prog_cc_c11 when using -# AC_PROG_CC, but we're still using Autoconf-2.69, and the newest it understands -# is C99. So handle it ourselves. -m4_version_prereq([2.70], [AC_MSG_ERROR([clean this up!])], [:]) -C_DIALECT= -AC_MSG_CHECKING([whether C11 is supported by default]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L -# error "C11 support not found" -#endif -])], [AC_MSG_RESULT([yes])], [ - AC_MSG_RESULT([no]) - AC_MSG_CHECKING([for -std=c11 support]) - ac_save_CC="$CC" - CC="$CC -std=c11" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L -# error "C11 support not found" -#endif -])], [ - AC_MSG_RESULT([yes]) - CC="$ac_save_CC" - C_DIALECT="-std=c11" -], [AC_MSG_ERROR([C11 is required])])]) -AC_SUBST(C_DIALECT) - -# Some of the common include files depend on bfd.h, and bfd.h checks -# that config.h is included first by testing that the PACKAGE macro -# is defined. -PACKAGE=sim -AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package. ]) -AC_SUBST(PACKAGE) - -# Dependency checking. -ZW_CREATE_DEPDIR -ZW_PROG_COMPILER_DEPENDENCIES([CC]) - -# Check for the 'make' the user wants to use. -AC_CHECK_PROGS(MAKE, make) -MAKE_IS_GNU= -case "`$MAKE --version 2>&1 | sed 1q`" in - *GNU*) - MAKE_IS_GNU=yes - ;; -esac -AM_CONDITIONAL(GMAKE, test "$MAKE_IS_GNU" = yes) - -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. -# NB: You can assume C11 headers exist. -AC_CHECK_HEADERS(unistd.h) -AC_CHECK_HEADERS(sys/time.h sys/times.h sys/resource.h sys/mman.h) -AC_CHECK_HEADERS(fcntl.h fpu_control.h) -AC_CHECK_HEADERS(dlfcn.h sys/stat.h) -AC_CHECK_FUNCS(getrusage time sigaction __setfpucw) -AC_CHECK_FUNCS(mmap munmap lstat truncate ftruncate posix_fallocate) -AC_CHECK_MEMBERS([[struct stat.st_dev], [struct stat.st_ino], -[struct stat.st_mode], [struct stat.st_nlink], [struct stat.st_uid], -[struct stat.st_gid], [struct stat.st_rdev], [struct stat.st_size], -[struct stat.st_blksize], [struct stat.st_blocks], [struct stat.st_atime], -[struct stat.st_mtime], [struct stat.st_ctime]], [], [], -[[#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif]]) -AC_CHECK_TYPES(socklen_t, [], [], -[#include -#include -]) - -# 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 - -# BFD uses libdl when when plugins enabled. -AC_PLUGINS -AM_CONDITIONAL(PLUGINS, test "$plugins" = yes) -LT_INIT([dlopen]) -AC_SUBST(lt_cv_dlopen_libs) - -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. -AM_MAINTAINER_MODE - - -dnl --enable-sim-debug is for developers of the simulator -dnl the allowable values are work-in-progress -AC_MSG_CHECKING([for sim debug setting]) -sim_debug="0" -AC_ARG_ENABLE(sim-debug, -[AS_HELP_STRING([--enable-sim-debug=opts], - [Enable debugging flags (for developers of the sim itself)])], -[case "${enableval}" in - yes) sim_debug="7";; - no) sim_debug="0";; - *) sim_debug="($enableval)";; -esac])dnl -if test "$sim_debug" != "0"; then - AC_DEFINE_UNQUOTED([DEBUG], [$sim_debug], [Sim debug setting]) -fi -AC_DEFINE_UNQUOTED([WITH_DEBUG], [$sim_debug], [Sim debug setting]) -AC_MSG_RESULT($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_MSG_CHECKING([for sim stdio debug behavior]) -sim_stdio="0" -AC_ARG_ENABLE(sim-stdio, -[AS_HELP_STRING([--enable-sim-stdio], - [Specify whether to use stdio for console input/output])], -[case "${enableval}" in - yes) sim_stdio="DO_USE_STDIO";; - no) sim_stdio="DONT_USE_STDIO";; - *) AC_MSG_ERROR([Unknown value $enableval passed to --enable-sim-stdio]);; -esac])dnl -AC_DEFINE_UNQUOTED([WITH_STDIO], [$sim_stdio], [How to route I/O]) -AC_MSG_RESULT($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. Default to all tracing but internal debug. -AC_MSG_CHECKING([for sim trace settings]) -sim_trace="~TRACE_debug" -AC_ARG_ENABLE(sim-trace, -[AS_HELP_STRING([--enable-sim-trace=opts], - [Enable tracing of simulated programs])], -[case "${enableval}" in - yes) sim_trace="-1";; - no) sim_trace="0";; - [[-0-9]]*) - sim_trace="'(${enableval})'";; - [[[:lower:]]]*) - sim_trace="" - for x in `echo "$enableval" | sed -e "s/,/ /g"`; do - if test x"$sim_trace" = x; then - sim_trace="(TRACE_$x" - else - sim_trace="${sim_trace}|TRACE_$x" - fi - done - sim_trace="$sim_trace)" ;; -esac])dnl -AC_DEFINE_UNQUOTED([WITH_TRACE], [$sim_trace], [Sim trace settings]) -AC_MSG_RESULT($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_MSG_CHECKING([for sim profile settings]) -profile="1" -sim_profile="-1" -AC_ARG_ENABLE(sim-profile, -[AS_HELP_STRING([--enable-sim-profile=opts], [Enable profiling flags])], -[case "${enableval}" in - yes) profile="1" sim_profile="-1";; - no) profile="0" sim_profile="0";; - [[-0-9]]*) - profile="(${enableval})" sim_profile="(${enableval})";; - [[a-z]]*) - profile="1" - sim_profile="" - for x in `echo "$enableval" | sed -e "s/,/ /g"`; do - if test x"$sim_profile" = x; then - sim_profile="(PROFILE_$x" - else - sim_profile="${sim_profile}|PROFILE_$x" - fi - done - sim_profile="$sim_profile)" ;; -esac])dnl -AC_DEFINE_UNQUOTED([PROFILE], [$profile], [Sim profile settings]) -AC_DEFINE_UNQUOTED([WITH_PROFILE], [$sim_profile], [Sim profile settings]) -AC_MSG_RESULT($sim_profile) - - -SIM_AC_OPTION_ASSERT -SIM_AC_OPTION_ENVIRONMENT -SIM_AC_OPTION_INLINE - -ACX_PKGVERSION([SIM]) -ACX_BUGURL([https://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 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.ac 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.ac 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_MSG_CHECKING([default sim environment setting]) -sim_environment="ALL_ENVIRONMENT" -AC_ARG_ENABLE(sim-environment, -[AS_HELP_STRING([--enable-sim-environment=environment], - [Specify mixed, user, virtual or operating environment])], -[case "${enableval}" in - all | ALL) sim_environment="ALL_ENVIRONMENT";; - user | USER) sim_environment="USER_ENVIRONMENT";; - virtual | VIRTUAL) sim_environment="VIRTUAL_ENVIRONMENT";; - operating | OPERATING) sim_environment="OPERATING_ENVIRONMENT";; - *) AC_MSG_ERROR([Unknown value $enableval passed to --enable-sim-environment]);; -esac])dnl -AC_DEFINE_UNQUOTED([WITH_ENVIRONMENT], [$sim_environment], [Sim default environment]) -AC_MSG_RESULT($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, -[AS_HELP_STRING([--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_MSG_CHECKING([whether to enable sim asserts]) -sim_assert="1" -AC_ARG_ENABLE(sim-assert, -[AS_HELP_STRING([--enable-sim-assert], - [Specify whether to perform random assertions])], -[case "${enableval}" in - yes) sim_assert="1";; - no) sim_assert="0";; - *) AC_MSG_ERROR([--enable-sim-assert does not take a value]);; -esac])dnl -AC_DEFINE_UNQUOTED([WITH_ASSERT], [$sim_assert], [Sim assert settings]) -AC_MSG_RESULT($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, -[AS_HELP_STRING([--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, -[AS_HELP_STRING([--enable-sim-endian=endian], - [Specify target byte endian orientation])], -[case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - 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=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi])dnl -]) -AC_SUBST(sim_endian) - - -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, -[AS_HELP_STRING([--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, -[AS_HELP_STRING([--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, -[AS_HELP_STRING([--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 "[$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, - [AS_HELP_STRING([--enable-sim-hardware=LIST], - [Specify the hardware to be included in the build.])], - ,[enable_sim_hardware="[$1]"]) -case ${enable_sim_hardware} in - yes|no) ;; - ,*) hardware="${hardware} `echo ${enableval} | sed -e 's/,/ /'`";; - *,) hardware="`echo ${enableval} | sed -e 's/,/ /'` ${hardware}";; - *) hardware="`echo ${enableval} | sed -e 's/,/ /'`"'';; -esac - -if test "$enable_sim_hardware" = no; 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 - # mingw does not support sockser - case ${host} in - *mingw*) ;; - *) # TODO: We don't add dv-sockser to sim_hw as it is not a "real" device - # that you instatiate. Instead, other code will call into it directly. - # At some point, we should convert it over. - sim_hw_objs="$sim_hw_objs dv-sockser.o" - AC_DEFINE_UNQUOTED( - [HAVE_DV_SOCKSER], 1, [Define if dv-sockser is usable.]) - ;; - esac - if test x"$silent" != x"yes"; then - echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs" - fi - dnl Some devices require extra libraries. - case " $hardware " in - *" cfi "*) AC_CHECK_LIB(m, log2);; - esac -fi -]) -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 Default sims to no inlining. -AC_DEFUN([SIM_AC_OPTION_INLINE], -[ -sim_inline="-DDEFAULT_INLINE=m4_ifblank([$1],[0],[$1])" -AC_ARG_ENABLE(sim-inline, -[AS_HELP_STRING([--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])dnl -]) -AC_SUBST(sim_inline) - - -AC_DEFUN([SIM_AC_OPTION_RESERVED_BITS], -[ -default_sim_reserved_bits="ifelse([$1],,1,[$1])" -AC_ARG_ENABLE(sim-reserved-bits, -[AS_HELP_STRING([--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], -[ -AC_MSG_CHECKING([number of sim cpus to support]) -default_sim_smp="ifelse([$1],,5,[$1])" -sim_smp="$default_sim_smp"" -AC_ARG_ENABLE(sim-smp, -[AS_HELP_STRING([--enable-sim-smp=n], - [Specify number of processors to configure for (default ${default_sim_smp})])], -[case "${enableval}" in - yes) sim_smp="5";; - no) sim_smp="0";; - *) sim_smp="$enableval";; -esac])dnl -sim_igen_smp="-N ${sim_smp}" -AC_DEFINE_UNQUOTED([WITH_SMP], [$sim_smp], [Sim SMP settings]) -AC_MSG_RESULT($sim_smp) -]) - - -AC_DEFUN([SIM_AC_OPTION_XOR_ENDIAN], -[ -AC_MSG_CHECKING([for xor endian support]) -default_sim_xor_endian="ifelse([$1],,8,[$1])" -sim_xor_endian="$default_sim_xor_endian" -AC_ARG_ENABLE(sim-xor-endian, -[AS_HELP_STRING([--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="8";; - no) sim_xor_endian="0";; - *) sim_xor_endian="$enableval";; -esac])dnl -AC_DEFINE_UNQUOTED([WITH_XOR_ENDIAN], [$sim_xor_endian], [Sim XOR endian settings]) -AC_MSG_RESULT($sim_smp) -]) - - -dnl --enable-build-warnings is for developers of the simulator. -dnl it enables extra GCC specific warnings. -dnl arg[1] Enable -Werror by default? ("yes" or "no") -AC_DEFUN([SIM_AC_OPTION_WARNINGS], -[ -AC_ARG_ENABLE(werror, - AS_HELP_STRING([--enable-werror], [treat compile warnings as errors]), - [case "${enableval}" in - yes | y) ERROR_ON_WARNING="yes" ;; - no | n) ERROR_ON_WARNING="no" ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;; - esac]) - -# Enable -Werror by default when using gcc -if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then - ERROR_ON_WARNING=yes -fi - -WERROR_CFLAGS="" -m4_if(m4_default([$1], [yes]), [yes], [dnl - if test "${ERROR_ON_WARNING}" = yes ; then - WERROR_CFLAGS="-Werror" - fi -])dnl - -build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ --Wpointer-sign \ --Wno-unused -Wunused-value -Wunused-function \ --Wno-switch -Wno-char-subscripts -Wmissing-prototypes --Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \ --Wold-style-declaration -Wold-style-definition" - -# Enable -Wno-format by default when using gcc on mingw since many -# GCC versions complain about %I64. -case "${host}" in - *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; - *) build_warnings="$build_warnings -Wformat-nonliteral" ;; -esac - -AC_ARG_ENABLE(build-warnings, -AS_HELP_STRING([--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, -AS_HELP_STRING([--enable-sim-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="" -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], -[dnl -AC_REQUIRE([SIM_AC_OPTION_WARNINGS])dnl - -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 -]) - -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, -[AS_HELP_STRING([--enable-cgen-maint[=DIR]], [build cgen generated files])], -[case "${enableval}" in - yes) cgen_maint=yes ;; - no) cgen_maint=no ;; - *) - # Argument is a directory where cgen can be found. In some - # future world cgen could be installable, but right now this - # is not the case. Instead we assume the directory is a path - # to the cgen source tree. - cgen_maint=yes - if test -r ${enableval}/iformat.scm; then - # This looks like a cgen source tree. - cgendir=${enableval} - else - AC_MSG_ERROR(${enableval} doesn't look like a cgen source tree) - fi - ;; -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/cr16/ChangeLog b/sim/cr16/ChangeLog index b26bdfae8ae..f4a342d980e 100644 --- a/sim/cr16/ChangeLog +++ b/sim/cr16/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/cr16/aclocal.m4 b/sim/cr16/aclocal.m4 index 1c83b202f0b..3326ca9834f 100644 --- a/sim/cr16/aclocal.m4 +++ b/sim/cr16/aclocal.m4 @@ -98,6 +98,14 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +118,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/cr16/configure b/sim/cr16/configure index f7885ce6257..31a7b6bb34a 100755 --- a/sim/cr16/configure +++ b/sim/cr16/configure @@ -631,6 +631,14 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_default_model +sim_scache +sim_float +sim_bitsize cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -747,16 +755,8 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11791,7 +11791,6 @@ _ACEOF - wire_endian="LITTLE" default_endian="" # Check whether --enable-sim-endian was given. @@ -11996,6 +11995,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/cr16/configure.ac b/sim/cr16/configure.ac index 791fa930d83..582779750d8 100644 --- a/sim/cr16/configure.ac +++ b/sim/cr16/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog index 5e833557649..6613c3cf5f6 100644 --- a/sim/cris/ChangeLog +++ b/sim/cris/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/cris/aclocal.m4 b/sim/cris/aclocal.m4 index 1c83b202f0b..155b726707c 100644 --- a/sim/cris/aclocal.m4 +++ b/sim/cris/aclocal.m4 @@ -98,6 +98,18 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_cgen_maint.m4]) +m4_include([../m4/sim_ac_option_default_model.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_hardware.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_scache.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +122,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/cris/configure b/sim/cris/configure index 3c0330baa82..82d65be64d7 100755 --- a/sim/cris/configure +++ b/sim/cris/configure @@ -631,6 +631,9 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_float +sim_bitsize cgen_breaks cgen cgendir @@ -750,16 +753,13 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits +sim_scache sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize +sim_default_model sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11804,7 +11804,6 @@ _ACEOF - # For dv-rv and rvdummy. for ac_header in sys/socket.h sys/select.h sys/param.h do : @@ -12202,6 +12201,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/cris/configure.ac b/sim/cris/configure.ac index 5bf23136b6a..1eee81762ad 100644 --- a/sim/cris/configure.ac +++ b/sim/cris/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index 6ff8d7e8366..e85d51b1a51 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/d10v/aclocal.m4 b/sim/d10v/aclocal.m4 index 1c83b202f0b..3326ca9834f 100644 --- a/sim/d10v/aclocal.m4 +++ b/sim/d10v/aclocal.m4 @@ -98,6 +98,14 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +118,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/d10v/configure b/sim/d10v/configure index 7ed827d926c..ce4eab5bccf 100755 --- a/sim/d10v/configure +++ b/sim/d10v/configure @@ -631,6 +631,14 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_default_model +sim_scache +sim_float +sim_bitsize cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -747,16 +755,8 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11791,7 +11791,6 @@ _ACEOF - wire_endian="" default_endian="" # Check whether --enable-sim-endian was given. @@ -11996,6 +11995,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/d10v/configure.ac b/sim/d10v/configure.ac index a22577f7617..4417ba4e561 100644 --- a/sim/d10v/configure.ac +++ b/sim/d10v/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog index aa58e908300..b518ae5fe07 100644 --- a/sim/erc32/ChangeLog +++ b/sim/erc32/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/erc32/aclocal.m4 b/sim/erc32/aclocal.m4 index 1c83b202f0b..a29db710788 100644 --- a/sim/erc32/aclocal.m4 +++ b/sim/erc32/aclocal.m4 @@ -98,6 +98,12 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +116,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/erc32/configure b/sim/erc32/configure index 3f88b355ce5..75d43ac04b2 100755 --- a/sim/erc32/configure +++ b/sim/erc32/configure @@ -631,6 +631,16 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_default_model +sim_scache +sim_float +sim_endian +sim_bitsize +sim_alignment cgen_breaks READLINE TERMCAP @@ -749,17 +759,7 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits -sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float -sim_endian -sim_bitsize -sim_alignment' +sim_inline' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -11785,7 +11785,6 @@ _ACEOF - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -12037,6 +12036,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/erc32/configure.ac b/sim/erc32/configure.ac index f864e970774..0edd6e3e67f 100644 --- a/sim/erc32/configure.ac +++ b/sim/erc32/configure.ac @@ -15,7 +15,7 @@ dnl along with this program. If not, see . dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_WARNINGS(no) diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index 63e358f84d7..b7befea03ab 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/frv/aclocal.m4 b/sim/frv/aclocal.m4 index 1c83b202f0b..155b726707c 100644 --- a/sim/frv/aclocal.m4 +++ b/sim/frv/aclocal.m4 @@ -98,6 +98,18 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_cgen_maint.m4]) +m4_include([../m4/sim_ac_option_default_model.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_hardware.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_scache.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +122,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/frv/configure b/sim/frv/configure index 406e7683ff2..983b16f2db5 100755 --- a/sim/frv/configure +++ b/sim/frv/configure @@ -631,6 +631,9 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_float +sim_bitsize cgen_breaks sim_trapdump cgen @@ -751,16 +754,13 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits +sim_scache sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize +sim_default_model sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11808,7 +11808,6 @@ _ACEOF - wire_endian="BIG" default_endian="" # Check whether --enable-sim-endian was given. @@ -12207,6 +12206,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/frv/configure.ac b/sim/frv/configure.ac index 55b300e7393..b4f5953051f 100644 --- a/sim/frv/configure.ac +++ b/sim/frv/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog index 88dbdd477eb..69baf195261 100644 --- a/sim/ft32/ChangeLog +++ b/sim/ft32/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/ft32/aclocal.m4 b/sim/ft32/aclocal.m4 index 1c83b202f0b..3326ca9834f 100644 --- a/sim/ft32/aclocal.m4 +++ b/sim/ft32/aclocal.m4 @@ -98,6 +98,14 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +118,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/ft32/configure b/sim/ft32/configure index 530f2d7fd62..2d0b715883b 100755 --- a/sim/ft32/configure +++ b/sim/ft32/configure @@ -631,6 +631,14 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_default_model +sim_scache +sim_float +sim_bitsize cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -747,16 +755,8 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11791,7 +11791,6 @@ _ACEOF - wire_endian="LITTLE" default_endian="" # Check whether --enable-sim-endian was given. @@ -11999,6 +11998,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/ft32/configure.ac b/sim/ft32/configure.ac index 8ace4ddf39d..658a0a459d0 100644 --- a/sim/ft32/configure.ac +++ b/sim/ft32/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog index 9958f7aa07a..f0fb782ae45 100644 --- a/sim/h8300/ChangeLog +++ b/sim/h8300/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/h8300/aclocal.m4 b/sim/h8300/aclocal.m4 index 1c83b202f0b..3326ca9834f 100644 --- a/sim/h8300/aclocal.m4 +++ b/sim/h8300/aclocal.m4 @@ -98,6 +98,14 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +118,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/h8300/configure b/sim/h8300/configure index b9f83014c48..6622a8c372e 100755 --- a/sim/h8300/configure +++ b/sim/h8300/configure @@ -631,6 +631,14 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_default_model +sim_scache +sim_float +sim_bitsize cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -747,16 +755,8 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11791,7 +11791,6 @@ _ACEOF - wire_endian="BIG" default_endian="" # Check whether --enable-sim-endian was given. @@ -12009,6 +12008,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/h8300/configure.ac b/sim/h8300/configure.ac index ef6257c97ab..177f7dee465 100644 --- a/sim/h8300/configure.ac +++ b/sim/h8300/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/igen/ChangeLog b/sim/igen/ChangeLog index 54ffcafa46d..5489e70baa3 100644 --- a/sim/igen/ChangeLog +++ b/sim/igen/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/igen/configure b/sim/igen/configure index 0b14176017e..38b8b8b4db3 100755 --- a/sim/igen/configure +++ b/sim/igen/configure @@ -692,18 +692,7 @@ PACKAGE_NAME PATH_SEPARATOR SHELL WERROR_CFLAGS -WARN_CFLAGS -sim_reserved_bits -sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float -sim_endian -sim_bitsize -sim_alignment' +WARN_CFLAGS' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -2067,9 +2056,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then diff --git a/sim/igen/configure.ac b/sim/igen/configure.ac index 5763b8407bf..f93ca4ba469 100644 --- a/sim/igen/configure.ac +++ b/sim/igen/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(table.h) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) AC_PROG_INSTALL AC_PROG_CC diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog index c9cf7d19cdd..569226d609f 100644 --- a/sim/iq2000/ChangeLog +++ b/sim/iq2000/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/iq2000/aclocal.m4 b/sim/iq2000/aclocal.m4 index 1c83b202f0b..155b726707c 100644 --- a/sim/iq2000/aclocal.m4 +++ b/sim/iq2000/aclocal.m4 @@ -98,6 +98,18 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_cgen_maint.m4]) +m4_include([../m4/sim_ac_option_default_model.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_hardware.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_scache.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +122,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/iq2000/configure b/sim/iq2000/configure index bf7d321d453..213800d6060 100755 --- a/sim/iq2000/configure +++ b/sim/iq2000/configure @@ -631,6 +631,9 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_float +sim_bitsize cgen_breaks cgen cgendir @@ -750,16 +753,13 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits +sim_scache sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize +sim_default_model sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11805,7 +11805,6 @@ _ACEOF - wire_endian="BIG" default_endian="" # Check whether --enable-sim-endian was given. @@ -12186,6 +12185,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/iq2000/configure.ac b/sim/iq2000/configure.ac index d8db34ee5ad..1a5dcfb276a 100644 --- a/sim/iq2000/configure.ac +++ b/sim/iq2000/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog index 7536b9592c0..3abf22cada9 100644 --- a/sim/lm32/ChangeLog +++ b/sim/lm32/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/lm32/aclocal.m4 b/sim/lm32/aclocal.m4 index 1c83b202f0b..155b726707c 100644 --- a/sim/lm32/aclocal.m4 +++ b/sim/lm32/aclocal.m4 @@ -98,6 +98,18 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_cgen_maint.m4]) +m4_include([../m4/sim_ac_option_default_model.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_hardware.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_scache.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +122,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/lm32/configure b/sim/lm32/configure index 5405b97030d..ccda45d60a1 100755 --- a/sim/lm32/configure +++ b/sim/lm32/configure @@ -631,6 +631,9 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_float +sim_bitsize cgen_breaks cgen cgendir @@ -750,16 +753,13 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits +sim_scache sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize +sim_default_model sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11805,7 +11805,6 @@ _ACEOF - wire_endian="BIG" default_endian="" # Check whether --enable-sim-endian was given. @@ -12185,6 +12184,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/lm32/configure.ac b/sim/lm32/configure.ac index d62f5160f64..83ed5034580 100644 --- a/sim/lm32/configure.ac +++ b/sim/lm32/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog index 60cf51f973e..1f2d7e08ce7 100644 --- a/sim/m32c/ChangeLog +++ b/sim/m32c/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/m32c/aclocal.m4 b/sim/m32c/aclocal.m4 index 1c83b202f0b..a29db710788 100644 --- a/sim/m32c/aclocal.m4 +++ b/sim/m32c/aclocal.m4 @@ -98,6 +98,12 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +116,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/m32c/configure b/sim/m32c/configure index 91ae88e9c2e..6e49badf67d 100755 --- a/sim/m32c/configure +++ b/sim/m32c/configure @@ -631,6 +631,16 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_default_model +sim_scache +sim_float +sim_endian +sim_bitsize +sim_alignment cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -747,17 +757,7 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits -sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float -sim_endian -sim_bitsize -sim_alignment' +sim_inline' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -11784,7 +11784,6 @@ _ACEOF - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -11912,6 +11911,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/m32c/configure.ac b/sim/m32c/configure.ac index beaf2059916..789bce45a02 100644 --- a/sim/m32c/configure.ac +++ b/sim/m32c/configure.ac @@ -19,7 +19,7 @@ dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog index b14664cdf51..fe214494aa8 100644 --- a/sim/m32r/ChangeLog +++ b/sim/m32r/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/m32r/aclocal.m4 b/sim/m32r/aclocal.m4 index 1c83b202f0b..155b726707c 100644 --- a/sim/m32r/aclocal.m4 +++ b/sim/m32r/aclocal.m4 @@ -98,6 +98,18 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_cgen_maint.m4]) +m4_include([../m4/sim_ac_option_default_model.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_hardware.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_scache.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +122,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/m32r/configure b/sim/m32r/configure index 851c0f87231..ce3e6a0e19f 100755 --- a/sim/m32r/configure +++ b/sim/m32r/configure @@ -631,6 +631,9 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_float +sim_bitsize cgen_breaks sim_extra_cflags traps_obj @@ -752,16 +755,13 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits +sim_scache sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize +sim_default_model sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11807,7 +11807,6 @@ _ACEOF - wire_endian="BIG" default_endian="" # Check whether --enable-sim-endian was given. @@ -12201,6 +12200,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/m32r/configure.ac b/sim/m32r/configure.ac index f27135db68f..2fd7f7265b0 100644 --- a/sim/m32r/configure.ac +++ b/sim/m32r/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/m4/sim_ac_common.m4 b/sim/m4/sim_ac_common.m4 new file mode 100644 index 00000000000..bfbde3fe1bf --- /dev/null +++ b/sim/m4/sim_ac_common.m4 @@ -0,0 +1,260 @@ +dnl Copyright (C) 1997-2021 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +dnl +dnl SIM_AC_COMMON invokes AC macros used by all simulators and by the common +dnl directory. It is intended to be invoked before any target specific stuff. +dnl SIM_AC_OUTPUT is a cover function to AC_OUTPUT to generate the Makefile. +dnl It is intended to be invoked last. +dnl +dnl See README-HACKING for more details. +AC_DEFUN([SIM_AC_COMMON], +[ +AC_REQUIRE([AC_PROG_CC]) +AC_CONFIG_HEADERS([config.h:config.in]) +AC_CANONICAL_SYSTEM +AC_USE_SYSTEM_EXTENSIONS +AC_C_BIGENDIAN +AC_ARG_PROGRAM +AC_PROG_INSTALL + +# Put a plausible default for CC_FOR_BUILD in Makefile. +if test -z "$CC_FOR_BUILD"; then + if test "x$cross_compiling" = "xno"; then + CC_FOR_BUILD='$(CC)' + else + CC_FOR_BUILD=gcc + fi +fi +AC_SUBST(CC_FOR_BUILD) + +AC_SUBST(CFLAGS) +AR=${AR-ar} +AC_SUBST(AR) +AC_PROG_RANLIB + +# Require C11 or newer. Autoconf-2.70 provides ac_cv_prog_cc_c11 when using +# AC_PROG_CC, but we're still using Autoconf-2.69, and the newest it understands +# is C99. So handle it ourselves. +m4_version_prereq([2.70], [AC_MSG_ERROR([clean this up!])], [:]) +C_DIALECT= +AC_MSG_CHECKING([whether C11 is supported by default]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "C11 support not found" +#endif +])], [AC_MSG_RESULT([yes])], [ + AC_MSG_RESULT([no]) + AC_MSG_CHECKING([for -std=c11 support]) + ac_save_CC="$CC" + CC="$CC -std=c11" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "C11 support not found" +#endif +])], [ + AC_MSG_RESULT([yes]) + CC="$ac_save_CC" + C_DIALECT="-std=c11" +], [AC_MSG_ERROR([C11 is required])])]) +AC_SUBST(C_DIALECT) + +# Some of the common include files depend on bfd.h, and bfd.h checks +# that config.h is included first by testing that the PACKAGE macro +# is defined. +PACKAGE=sim +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package. ]) +AC_SUBST(PACKAGE) + +# Dependency checking. +ZW_CREATE_DEPDIR +ZW_PROG_COMPILER_DEPENDENCIES([CC]) + +# Check for the 'make' the user wants to use. +AC_CHECK_PROGS(MAKE, make) +MAKE_IS_GNU= +case "`$MAKE --version 2>&1 | sed 1q`" in + *GNU*) + MAKE_IS_GNU=yes + ;; +esac +AM_CONDITIONAL(GMAKE, test "$MAKE_IS_GNU" = yes) + +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. +# NB: You can assume C11 headers exist. +AC_CHECK_HEADERS(unistd.h) +AC_CHECK_HEADERS(sys/time.h sys/times.h sys/resource.h sys/mman.h) +AC_CHECK_HEADERS(fcntl.h fpu_control.h) +AC_CHECK_HEADERS(dlfcn.h sys/stat.h) +AC_CHECK_FUNCS(getrusage time sigaction __setfpucw) +AC_CHECK_FUNCS(mmap munmap lstat truncate ftruncate posix_fallocate) +AC_CHECK_MEMBERS([[struct stat.st_dev], [struct stat.st_ino], +[struct stat.st_mode], [struct stat.st_nlink], [struct stat.st_uid], +[struct stat.st_gid], [struct stat.st_rdev], [struct stat.st_size], +[struct stat.st_blksize], [struct stat.st_blocks], [struct stat.st_atime], +[struct stat.st_mtime], [struct stat.st_ctime]], [], [], +[[#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_STAT_H +#include +#endif]]) +AC_CHECK_TYPES(socklen_t, [], [], +[#include +#include +]) + +# 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 + +# BFD uses libdl when when plugins enabled. +AC_PLUGINS +AM_CONDITIONAL(PLUGINS, test "$plugins" = yes) +LT_INIT([dlopen]) +AC_SUBST(lt_cv_dlopen_libs) + +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. +AM_MAINTAINER_MODE + + +dnl --enable-sim-debug is for developers of the simulator +dnl the allowable values are work-in-progress +AC_MSG_CHECKING([for sim debug setting]) +sim_debug="0" +AC_ARG_ENABLE(sim-debug, +[AS_HELP_STRING([--enable-sim-debug=opts], + [Enable debugging flags (for developers of the sim itself)])], +[case "${enableval}" in + yes) sim_debug="7";; + no) sim_debug="0";; + *) sim_debug="($enableval)";; +esac])dnl +if test "$sim_debug" != "0"; then + AC_DEFINE_UNQUOTED([DEBUG], [$sim_debug], [Sim debug setting]) +fi +AC_DEFINE_UNQUOTED([WITH_DEBUG], [$sim_debug], [Sim debug setting]) +AC_MSG_RESULT($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_MSG_CHECKING([for sim stdio debug behavior]) +sim_stdio="0" +AC_ARG_ENABLE(sim-stdio, +[AS_HELP_STRING([--enable-sim-stdio], + [Specify whether to use stdio for console input/output])], +[case "${enableval}" in + yes) sim_stdio="DO_USE_STDIO";; + no) sim_stdio="DONT_USE_STDIO";; + *) AC_MSG_ERROR([Unknown value $enableval passed to --enable-sim-stdio]);; +esac])dnl +AC_DEFINE_UNQUOTED([WITH_STDIO], [$sim_stdio], [How to route I/O]) +AC_MSG_RESULT($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. Default to all tracing but internal debug. +AC_MSG_CHECKING([for sim trace settings]) +sim_trace="~TRACE_debug" +AC_ARG_ENABLE(sim-trace, +[AS_HELP_STRING([--enable-sim-trace=opts], + [Enable tracing of simulated programs])], +[case "${enableval}" in + yes) sim_trace="-1";; + no) sim_trace="0";; + [[-0-9]]*) + sim_trace="'(${enableval})'";; + [[[:lower:]]]*) + sim_trace="" + for x in `echo "$enableval" | sed -e "s/,/ /g"`; do + if test x"$sim_trace" = x; then + sim_trace="(TRACE_$x" + else + sim_trace="${sim_trace}|TRACE_$x" + fi + done + sim_trace="$sim_trace)" ;; +esac])dnl +AC_DEFINE_UNQUOTED([WITH_TRACE], [$sim_trace], [Sim trace settings]) +AC_MSG_RESULT($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_MSG_CHECKING([for sim profile settings]) +profile="1" +sim_profile="-1" +AC_ARG_ENABLE(sim-profile, +[AS_HELP_STRING([--enable-sim-profile=opts], [Enable profiling flags])], +[case "${enableval}" in + yes) profile="1" sim_profile="-1";; + no) profile="0" sim_profile="0";; + [[-0-9]]*) + profile="(${enableval})" sim_profile="(${enableval})";; + [[a-z]]*) + profile="1" + sim_profile="" + for x in `echo "$enableval" | sed -e "s/,/ /g"`; do + if test x"$sim_profile" = x; then + sim_profile="(PROFILE_$x" + else + sim_profile="${sim_profile}|PROFILE_$x" + fi + done + sim_profile="$sim_profile)" ;; +esac])dnl +AC_DEFINE_UNQUOTED([PROFILE], [$profile], [Sim profile settings]) +AC_DEFINE_UNQUOTED([WITH_PROFILE], [$sim_profile], [Sim profile settings]) +AC_MSG_RESULT($sim_profile) + + +SIM_AC_OPTION_ASSERT +SIM_AC_OPTION_ENVIRONMENT +SIM_AC_OPTION_INLINE + +ACX_PKGVERSION([SIM]) +ACX_BUGURL([https://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 End of SIM_AC_COMMON diff --git a/sim/m4/sim_ac_option_alignment.m4 b/sim/m4/sim_ac_option_alignment.m4 new file mode 100644 index 00000000000..dcfa47984a6 --- /dev/null +++ b/sim/m4/sim_ac_option_alignment.m4 @@ -0,0 +1,66 @@ +dnl Copyright (C) 1997-2021 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +dnl +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, +[AS_HELP_STRING([--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) diff --git a/sim/m4/sim_ac_option_assert.m4 b/sim/m4/sim_ac_option_assert.m4 new file mode 100644 index 00000000000..44304fc92fe --- /dev/null +++ b/sim/m4/sim_ac_option_assert.m4 @@ -0,0 +1,31 @@ +dnl Copyright (C) 1997-2021 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +dnl +dnl Conditionally compile in assertion statements. +AC_DEFUN([SIM_AC_OPTION_ASSERT], +[ +AC_MSG_CHECKING([whether to enable sim asserts]) +sim_assert="1" +AC_ARG_ENABLE(sim-assert, +[AS_HELP_STRING([--enable-sim-assert], + [Specify whether to perform random assertions])], +[case "${enableval}" in + yes) sim_assert="1";; + no) sim_assert="0";; + *) AC_MSG_ERROR([--enable-sim-assert does not take a value]);; +esac])dnl +AC_DEFINE_UNQUOTED([WITH_ASSERT], [$sim_assert], [Sim assert settings]) +AC_MSG_RESULT($sim_assert) +]) diff --git a/sim/m4/sim_ac_option_bitsize.m4 b/sim/m4/sim_ac_option_bitsize.m4 new file mode 100644 index 00000000000..f4fdefbdf3f --- /dev/null +++ b/sim/m4/sim_ac_option_bitsize.m4 @@ -0,0 +1,81 @@ +dnl Copyright (C) 1997-2021 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +dnl +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, +[AS_HELP_STRING([--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) diff --git a/sim/m4/sim_ac_option_cgen_maint.m4 b/sim/m4/sim_ac_option_cgen_maint.m4 new file mode 100644 index 00000000000..00d54ff142e --- /dev/null +++ b/sim/m4/sim_ac_option_cgen_maint.m4 @@ -0,0 +1,56 @@ +dnl Copyright (C) 1997-2021 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +dnl +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, +[AS_HELP_STRING([--enable-cgen-maint[=DIR]], [build cgen generated files])], +[case "${enableval}" in + yes) cgen_maint=yes ;; + no) cgen_maint=no ;; + *) + # Argument is a directory where cgen can be found. In some + # future world cgen could be installable, but right now this + # is not the case. Instead we assume the directory is a path + # to the cgen source tree. + cgen_maint=yes + if test -r ${enableval}/iformat.scm; then + # This looks like a cgen source tree. + cgendir=${enableval} + else + AC_MSG_ERROR(${enableval} doesn't look like a cgen source tree) + fi + ;; +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/m4/sim_ac_option_default_model.m4 b/sim/m4/sim_ac_option_default_model.m4 new file mode 100644 index 00000000000..115093734bc --- /dev/null +++ b/sim/m4/sim_ac_option_default_model.m4 @@ -0,0 +1,31 @@ +dnl Copyright (C) 1997-2021 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +dnl +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, +[AS_HELP_STRING([--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) diff --git a/sim/m4/sim_ac_option_endian.m4 b/sim/m4/sim_ac_option_endian.m4 new file mode 100644 index 00000000000..e5a5b61dc17 --- /dev/null +++ b/sim/m4/sim_ac_option_endian.m4 @@ -0,0 +1,65 @@ +dnl Copyright (C) 1997-2021 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +dnl +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, +[AS_HELP_STRING([--enable-sim-endian=endian], + [Specify target byte endian orientation])], +[case "${enableval}" in + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; + yes) if test x"$wire_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" + else + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" + else + echo "No hard-wired endian for target $target" 1>&6 + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" + fi + fi;; + no) if test x"$default_endian" != x; then + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" + else + if test x"$wire_endian" != x; then + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" + else + echo "No default endian for target $target" 1>&6 + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" + 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=BFD_ENDIAN_${default_endian}" +else + if test x"$wire_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" + else + sim_endian= + fi +fi])dnl +]) +AC_SUBST(sim_endian) diff --git a/sim/m4/sim_ac_option_environment.m4 b/sim/m4/sim_ac_option_environment.m4 new file mode 100644 index 00000000000..d49c5b261a9 --- /dev/null +++ b/sim/m4/sim_ac_option_environment.m4 @@ -0,0 +1,45 @@ +dnl Copyright (C) 1997-2021 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +dnl +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.ac file between the SIM_AC_COMMON +dnl and SIM_AC_OUTPUT lines. +dnl +dnl Specify the running environment. +dnl If the simulator invokes this in its configure.ac 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_MSG_CHECKING([default sim environment setting]) +sim_environment="ALL_ENVIRONMENT" +AC_ARG_ENABLE(sim-environment, +[AS_HELP_STRING([--enable-sim-environment=environment], + [Specify mixed, user, virtual or operating environment])], +[case "${enableval}" in + all | ALL) sim_environment="ALL_ENVIRONMENT";; + user | USER) sim_environment="USER_ENVIRONMENT";; + virtual | VIRTUAL) sim_environment="VIRTUAL_ENVIRONMENT";; + operating | OPERATING) sim_environment="OPERATING_ENVIRONMENT";; + *) AC_MSG_ERROR([Unknown value $enableval passed to --enable-sim-environment]);; +esac])dnl +AC_DEFINE_UNQUOTED([WITH_ENVIRONMENT], [$sim_environment], [Sim default environment]) +AC_MSG_RESULT($sim_environment) +]) diff --git a/sim/m4/sim_ac_option_float.m4 b/sim/m4/sim_ac_option_float.m4 new file mode 100644 index 00000000000..a38678cf2e0 --- /dev/null +++ b/sim/m4/sim_ac_option_float.m4 @@ -0,0 +1,47 @@ +dnl Copyright (C) 1997-2021 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +dnl +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, +[AS_HELP_STRING([--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) diff --git a/sim/m4/sim_ac_option_hardware.m4 b/sim/m4/sim_ac_option_hardware.m4 new file mode 100644 index 00000000000..cc84fadcc51 --- /dev/null +++ b/sim/m4/sim_ac_option_hardware.m4 @@ -0,0 +1,81 @@ +dnl Copyright (C) 1997-2021 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +dnl +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 "[$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, + [AS_HELP_STRING([--enable-sim-hardware=LIST], + [Specify the hardware to be included in the build.])], + ,[enable_sim_hardware="[$1]"]) +case ${enable_sim_hardware} in + yes|no) ;; + ,*) hardware="${hardware} `echo ${enableval} | sed -e 's/,/ /'`";; + *,) hardware="`echo ${enableval} | sed -e 's/,/ /'` ${hardware}";; + *) hardware="`echo ${enableval} | sed -e 's/,/ /'`"'';; +esac + +if test "$enable_sim_hardware" = no; 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 + # mingw does not support sockser + case ${host} in + *mingw*) ;; + *) # TODO: We don't add dv-sockser to sim_hw as it is not a "real" device + # that you instatiate. Instead, other code will call into it directly. + # At some point, we should convert it over. + sim_hw_objs="$sim_hw_objs dv-sockser.o" + AC_DEFINE_UNQUOTED( + [HAVE_DV_SOCKSER], 1, [Define if dv-sockser is usable.]) + ;; + esac + if test x"$silent" != x"yes"; then + echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs" + fi + dnl Some devices require extra libraries. + case " $hardware " in + *" cfi "*) AC_CHECK_LIB(m, log2);; + esac +fi +]) +AC_SUBST(sim_hw_cflags) +AC_SUBST(sim_hw_objs) +AC_SUBST(sim_hw) diff --git a/sim/m4/sim_ac_option_inline.m4 b/sim/m4/sim_ac_option_inline.m4 new file mode 100644 index 00000000000..42221bc4672 --- /dev/null +++ b/sim/m4/sim_ac_option_inline.m4 @@ -0,0 +1,50 @@ +dnl Copyright (C) 1997-2021 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +dnl +dnl --enable-sim-inline is for users that wish to ramp up the simulator's +dnl performance by inlining functions. +dnl Default sims to no inlining. +AC_DEFUN([SIM_AC_OPTION_INLINE], +[ +sim_inline="-DDEFAULT_INLINE=m4_ifblank([$1],[0],[$1])" +AC_ARG_ENABLE(sim-inline, +[AS_HELP_STRING([--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])dnl +]) +AC_SUBST(sim_inline) diff --git a/sim/m4/sim_ac_option_reserved_bits.m4 b/sim/m4/sim_ac_option_reserved_bits.m4 new file mode 100644 index 00000000000..8147ed8bfdd --- /dev/null +++ b/sim/m4/sim_ac_option_reserved_bits.m4 @@ -0,0 +1,30 @@ +dnl Copyright (C) 1997-2021 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +AC_DEFUN([SIM_AC_OPTION_RESERVED_BITS], +[ +default_sim_reserved_bits="ifelse([$1],,1,[$1])" +AC_ARG_ENABLE(sim-reserved-bits, +[AS_HELP_STRING([--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) diff --git a/sim/m4/sim_ac_option_scache.m4 b/sim/m4/sim_ac_option_scache.m4 new file mode 100644 index 00000000000..20e36158f90 --- /dev/null +++ b/sim/m4/sim_ac_option_scache.m4 @@ -0,0 +1,34 @@ +dnl Copyright (C) 1997-2021 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +dnl +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, +[AS_HELP_STRING([--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) diff --git a/sim/m4/sim_ac_option_smp.m4 b/sim/m4/sim_ac_option_smp.m4 new file mode 100644 index 00000000000..9f384e25915 --- /dev/null +++ b/sim/m4/sim_ac_option_smp.m4 @@ -0,0 +1,31 @@ +dnl Copyright (C) 1997-2021 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +AC_DEFUN([SIM_AC_OPTION_SMP], +[ +AC_MSG_CHECKING([number of sim cpus to support]) +default_sim_smp="ifelse([$1],,5,[$1])" +sim_smp="$default_sim_smp"" +AC_ARG_ENABLE(sim-smp, +[AS_HELP_STRING([--enable-sim-smp=n], + [Specify number of processors to configure for (default ${default_sim_smp})])], +[case "${enableval}" in + yes) sim_smp="5";; + no) sim_smp="0";; + *) sim_smp="$enableval";; +esac])dnl +sim_igen_smp="-N ${sim_smp}" +AC_DEFINE_UNQUOTED([WITH_SMP], [$sim_smp], [Sim SMP settings]) +AC_MSG_RESULT($sim_smp) +]) diff --git a/sim/m4/sim_ac_option_warnings.m4 b/sim/m4/sim_ac_option_warnings.m4 new file mode 100644 index 00000000000..dc9837061e1 --- /dev/null +++ b/sim/m4/sim_ac_option_warnings.m4 @@ -0,0 +1,103 @@ +dnl Copyright (C) 1997-2021 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +dnl +dnl --enable-build-warnings is for developers of the simulator. +dnl it enables extra GCC specific warnings. +dnl arg[1] Enable -Werror by default? ("yes" or "no") +AC_DEFUN([SIM_AC_OPTION_WARNINGS], +[ +AC_ARG_ENABLE(werror, + AS_HELP_STRING([--enable-werror], [treat compile warnings as errors]), + [case "${enableval}" in + yes | y) ERROR_ON_WARNING="yes" ;; + no | n) ERROR_ON_WARNING="no" ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;; + esac]) + +# Enable -Werror by default when using gcc +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then + ERROR_ON_WARNING=yes +fi + +WERROR_CFLAGS="" +m4_if(m4_default([$1], [yes]), [yes], [dnl + if test "${ERROR_ON_WARNING}" = yes ; then + WERROR_CFLAGS="-Werror" + fi +])dnl + +build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ +-Wpointer-sign \ +-Wno-unused -Wunused-value -Wunused-function \ +-Wno-switch -Wno-char-subscripts -Wmissing-prototypes +-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \ +-Wold-style-declaration -Wold-style-definition" + +# Enable -Wno-format by default when using gcc on mingw since many +# GCC versions complain about %I64. +case "${host}" in + *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; + *) build_warnings="$build_warnings -Wformat-nonliteral" ;; +esac + +AC_ARG_ENABLE(build-warnings, +AS_HELP_STRING([--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, +AS_HELP_STRING([--enable-sim-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="" +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) diff --git a/sim/m4/sim_ac_option_xor_endian.m4 b/sim/m4/sim_ac_option_xor_endian.m4 new file mode 100644 index 00000000000..0ed97c55ef1 --- /dev/null +++ b/sim/m4/sim_ac_option_xor_endian.m4 @@ -0,0 +1,30 @@ +dnl Copyright (C) 1997-2021 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +AC_DEFUN([SIM_AC_OPTION_XOR_ENDIAN], +[ +AC_MSG_CHECKING([for xor endian support]) +default_sim_xor_endian="ifelse([$1],,8,[$1])" +sim_xor_endian="$default_sim_xor_endian" +AC_ARG_ENABLE(sim-xor-endian, +[AS_HELP_STRING([--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="8";; + no) sim_xor_endian="0";; + *) sim_xor_endian="$enableval";; +esac])dnl +AC_DEFINE_UNQUOTED([WITH_XOR_ENDIAN], [$sim_xor_endian], [Sim XOR endian settings]) +AC_MSG_RESULT($sim_smp) +]) diff --git a/sim/m4/sim_ac_output.m4 b/sim/m4/sim_ac_output.m4 new file mode 100644 index 00000000000..9ec566d8acd --- /dev/null +++ b/sim/m4/sim_ac_output.m4 @@ -0,0 +1,62 @@ +dnl Copyright (C) 1997-2021 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +dnl +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], +[dnl +AC_REQUIRE([SIM_AC_OPTION_WARNINGS])dnl + +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]) + +dnl These are unfortunate. They are conditionally called by other sim macros +dnl but always used by common/Make-common.in. So we have to subst here even +dnl when the rest of the code is in the respective macros. +AC_SUBST(sim_alignment) +AC_SUBST(sim_bitsize) +AC_SUBST(sim_endian) +AC_SUBST(sim_float) +AC_SUBST(sim_scache) +AC_SUBST(sim_default_model) +AC_SUBST(sim_hw_cflags) +AC_SUBST(sim_hw_objs) +AC_SUBST(sim_hw) +AC_SUBST(sim_reserved_bits) + +AC_OUTPUT +]) diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog index 7deb1b6d2d7..5223443bf61 100644 --- a/sim/m68hc11/ChangeLog +++ b/sim/m68hc11/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/m68hc11/aclocal.m4 b/sim/m68hc11/aclocal.m4 index 1c83b202f0b..1183d422cc3 100644 --- a/sim/m68hc11/aclocal.m4 +++ b/sim/m68hc11/aclocal.m4 @@ -98,6 +98,15 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_hardware.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +119,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/m68hc11/configure b/sim/m68hc11/configure index 32a326946c4..6498bf0020b 100755 --- a/sim/m68hc11/configure +++ b/sim/m68hc11/configure @@ -631,6 +631,11 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_default_model +sim_scache +sim_float +sim_bitsize cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -747,16 +752,11 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11794,7 +11794,6 @@ _ACEOF - wire_endian="BIG" default_endian="" # Check whether --enable-sim-endian was given. @@ -12106,6 +12105,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/m68hc11/configure.ac b/sim/m68hc11/configure.ac index 34ae17ea93a..6148d1dae4e 100644 --- a/sim/m68hc11/configure.ac +++ b/sim/m68hc11/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog index 96da9c1836a..575451b072f 100644 --- a/sim/mcore/ChangeLog +++ b/sim/mcore/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/mcore/aclocal.m4 b/sim/mcore/aclocal.m4 index 1c83b202f0b..3326ca9834f 100644 --- a/sim/mcore/aclocal.m4 +++ b/sim/mcore/aclocal.m4 @@ -98,6 +98,14 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +118,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/mcore/configure b/sim/mcore/configure index 7ed827d926c..ce4eab5bccf 100755 --- a/sim/mcore/configure +++ b/sim/mcore/configure @@ -631,6 +631,14 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_default_model +sim_scache +sim_float +sim_bitsize cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -747,16 +755,8 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11791,7 +11791,6 @@ _ACEOF - wire_endian="" default_endian="" # Check whether --enable-sim-endian was given. @@ -11996,6 +11995,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/mcore/configure.ac b/sim/mcore/configure.ac index a22577f7617..4417ba4e561 100644 --- a/sim/mcore/configure.ac +++ b/sim/mcore/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog index a61834961f5..b93e3117c9f 100644 --- a/sim/microblaze/ChangeLog +++ b/sim/microblaze/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/microblaze/aclocal.m4 b/sim/microblaze/aclocal.m4 index 1c83b202f0b..3326ca9834f 100644 --- a/sim/microblaze/aclocal.m4 +++ b/sim/microblaze/aclocal.m4 @@ -98,6 +98,14 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +118,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/microblaze/configure b/sim/microblaze/configure index 7236ae17aef..55e854ad2b2 100755 --- a/sim/microblaze/configure +++ b/sim/microblaze/configure @@ -631,6 +631,14 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_default_model +sim_scache +sim_float +sim_bitsize cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -747,16 +755,8 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11791,7 +11791,6 @@ _ACEOF - wire_endian="" default_endian="" # Check whether --enable-sim-endian was given. @@ -11999,6 +11998,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/microblaze/configure.ac b/sim/microblaze/configure.ac index e1300c85abc..88fac82e7b4 100644 --- a/sim/microblaze/configure.ac +++ b/sim/microblaze/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index 56493604001..5b3517648f0 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/mips/aclocal.m4 b/sim/mips/aclocal.m4 index 1c83b202f0b..3a4af946103 100644 --- a/sim/mips/aclocal.m4 +++ b/sim/mips/aclocal.m4 @@ -98,6 +98,18 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_bitsize.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_float.m4]) +m4_include([../m4/sim_ac_option_hardware.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_reserved_bits.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +122,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/mips/configure b/sim/mips/configure index 53afe738651..aa877ad7111 100755 --- a/sim/mips/configure +++ b/sim/mips/configure @@ -631,6 +631,8 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_default_model +sim_scache cgen_breaks mips_extra_libs XMKMF @@ -765,8 +767,6 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_default_model -sim_scache sim_float sim_endian sim_bitsize @@ -11823,7 +11823,6 @@ _ACEOF - wire_alignment="NONSTRICT_ALIGNMENT" default_alignment="" @@ -12925,6 +12924,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac index fe8f4b0386a..ec45245dc1f 100644 --- a/sim/mips/configure.ac +++ b/sim/mips/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index 4f77dae368a..b8f6bb7bcd7 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/mn10300/aclocal.m4 b/sim/mn10300/aclocal.m4 index 1c83b202f0b..1d6e9ad605a 100644 --- a/sim/mn10300/aclocal.m4 +++ b/sim/mn10300/aclocal.m4 @@ -98,6 +98,17 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_bitsize.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_hardware.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_reserved_bits.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +121,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/mn10300/configure b/sim/mn10300/configure index 512151ce978..1d9dfd4c013 100755 --- a/sim/mn10300/configure +++ b/sim/mn10300/configure @@ -631,6 +631,9 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_default_model +sim_scache +sim_float cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -752,9 +755,6 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian sim_bitsize sim_alignment' @@ -11800,7 +11800,6 @@ _ACEOF - wire_endian="LITTLE" default_endian="" # Check whether --enable-sim-endian was given. @@ -12212,6 +12211,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/mn10300/configure.ac b/sim/mn10300/configure.ac index 1e7498a81a6..e2ae2d835b2 100644 --- a/sim/mn10300/configure.ac +++ b/sim/mn10300/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog index 91edfa59dea..4bf37fa6504 100644 --- a/sim/moxie/ChangeLog +++ b/sim/moxie/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/moxie/aclocal.m4 b/sim/moxie/aclocal.m4 index 1c83b202f0b..3326ca9834f 100644 --- a/sim/moxie/aclocal.m4 +++ b/sim/moxie/aclocal.m4 @@ -98,6 +98,14 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +118,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/moxie/configure b/sim/moxie/configure index 01dfb41472d..61fe1dd42a3 100755 --- a/sim/moxie/configure +++ b/sim/moxie/configure @@ -631,6 +631,14 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_default_model +sim_scache +sim_float +sim_bitsize cgen_breaks DTC REPORT_BUGS_TEXI @@ -748,16 +756,8 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11791,7 +11791,6 @@ _ACEOF - if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dtc", so it can be a program name with args. set dummy ${ac_tool_prefix}dtc; ac_word=$2 @@ -12093,6 +12092,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/moxie/configure.ac b/sim/moxie/configure.ac index 3e9a987082e..fb5a91eacf8 100644 --- a/sim/moxie/configure.ac +++ b/sim/moxie/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog index 8b9d8527f13..0234fd4e022 100644 --- a/sim/msp430/ChangeLog +++ b/sim/msp430/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/msp430/aclocal.m4 b/sim/msp430/aclocal.m4 index 1c83b202f0b..3326ca9834f 100644 --- a/sim/msp430/aclocal.m4 +++ b/sim/msp430/aclocal.m4 @@ -98,6 +98,14 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +118,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/msp430/configure b/sim/msp430/configure index 68104e47f0b..0757df04e68 100755 --- a/sim/msp430/configure +++ b/sim/msp430/configure @@ -631,6 +631,14 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_default_model +sim_scache +sim_float +sim_bitsize cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -747,16 +755,8 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11790,7 +11790,6 @@ _ACEOF - for ac_header in getopt.h do : ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" @@ -12012,6 +12011,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/msp430/configure.ac b/sim/msp430/configure.ac index f74cd7ed507..68e9467339a 100644 --- a/sim/msp430/configure.ac +++ b/sim/msp430/configure.ac @@ -19,7 +19,7 @@ dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/or1k/ChangeLog b/sim/or1k/ChangeLog index ca31ff0bc6d..01a2dd7504e 100644 --- a/sim/or1k/ChangeLog +++ b/sim/or1k/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/or1k/aclocal.m4 b/sim/or1k/aclocal.m4 index 1c83b202f0b..14d865b222e 100644 --- a/sim/or1k/aclocal.m4 +++ b/sim/or1k/aclocal.m4 @@ -98,6 +98,18 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_bitsize.m4]) +m4_include([../m4/sim_ac_option_cgen_maint.m4]) +m4_include([../m4/sim_ac_option_default_model.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_scache.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +122,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/or1k/configure b/sim/or1k/configure index 7be22269d04..b52bd902526 100755 --- a/sim/or1k/configure +++ b/sim/or1k/configure @@ -631,6 +631,11 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_float cgen_breaks cgen cgendir @@ -750,15 +755,10 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits -sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model sim_scache -sim_float +sim_inline sim_endian +sim_default_model sim_bitsize sim_alignment' ac_subst_files='' @@ -11804,7 +11804,6 @@ _ACEOF - wire_endian="BIG" default_endian="" # Check whether --enable-sim-endian was given. @@ -12158,6 +12157,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/or1k/configure.ac b/sim/or1k/configure.ac index a025e034b91..ed0739f74a5 100644 --- a/sim/or1k/configure.ac +++ b/sim/or1k/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac index f74a22a1abb..6482fbab1d7 100644 --- a/sim/ppc/configure.ac +++ b/sim/ppc/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../.. ../../config]) AC_PROG_INSTALL AC_PROG_CC diff --git a/sim/pru/ChangeLog b/sim/pru/ChangeLog index dd291b5799c..afe4c153786 100644 --- a/sim/pru/ChangeLog +++ b/sim/pru/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/pru/aclocal.m4 b/sim/pru/aclocal.m4 index 1c83b202f0b..3326ca9834f 100644 --- a/sim/pru/aclocal.m4 +++ b/sim/pru/aclocal.m4 @@ -98,6 +98,14 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +118,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/pru/configure b/sim/pru/configure index 84107ef082b..13fe9653d3f 100755 --- a/sim/pru/configure +++ b/sim/pru/configure @@ -631,6 +631,14 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_default_model +sim_scache +sim_float +sim_bitsize cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -747,16 +755,8 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11791,7 +11791,6 @@ _ACEOF - wire_endian="LITTLE" default_endian="" # Check whether --enable-sim-endian was given. @@ -11999,6 +11998,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/pru/configure.ac b/sim/pru/configure.ac index dcc2cbae3ef..a4db77beec2 100644 --- a/sim/pru/configure.ac +++ b/sim/pru/configure.ac @@ -19,7 +19,7 @@ dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/riscv/ChangeLog b/sim/riscv/ChangeLog index 00d90c3531d..f5994b113ef 100644 --- a/sim/riscv/ChangeLog +++ b/sim/riscv/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/riscv/aclocal.m4 b/sim/riscv/aclocal.m4 index 1c83b202f0b..71fe45d9edc 100644 --- a/sim/riscv/aclocal.m4 +++ b/sim/riscv/aclocal.m4 @@ -98,6 +98,16 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_bitsize.m4]) +m4_include([../m4/sim_ac_option_default_model.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +120,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/riscv/configure b/sim/riscv/configure index e335680cbcb..be787e2f078 100755 --- a/sim/riscv/configure +++ b/sim/riscv/configure @@ -631,6 +631,12 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_scache +sim_float cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -747,15 +753,9 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian +sim_default_model sim_bitsize sim_alignment' ac_subst_files='' @@ -11796,7 +11796,6 @@ _ACEOF - wire_endian="LITTLE" default_endian="" # Check whether --enable-sim-endian was given. @@ -12115,6 +12114,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/riscv/configure.ac b/sim/riscv/configure.ac index d7505f916fa..84b236adf4f 100644 --- a/sim/riscv/configure.ac +++ b/sim/riscv/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/rl78/ChangeLog b/sim/rl78/ChangeLog index a2a1974746f..895ff6127d6 100644 --- a/sim/rl78/ChangeLog +++ b/sim/rl78/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/rl78/aclocal.m4 b/sim/rl78/aclocal.m4 index 1c83b202f0b..a29db710788 100644 --- a/sim/rl78/aclocal.m4 +++ b/sim/rl78/aclocal.m4 @@ -98,6 +98,12 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +116,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/rl78/configure b/sim/rl78/configure index 1ecbeed8b6a..6f350ed8b04 100755 --- a/sim/rl78/configure +++ b/sim/rl78/configure @@ -631,6 +631,16 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_default_model +sim_scache +sim_float +sim_endian +sim_bitsize +sim_alignment cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -747,17 +757,7 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits -sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float -sim_endian -sim_bitsize -sim_alignment' +sim_inline' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -11783,7 +11783,6 @@ _ACEOF - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -11910,6 +11909,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/rl78/configure.ac b/sim/rl78/configure.ac index decb7e66270..1314b980fea 100644 --- a/sim/rl78/configure.ac +++ b/sim/rl78/configure.ac @@ -19,7 +19,7 @@ dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_WARNINGS(no) diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog index e78fe61dab5..a6e16e9a3ca 100644 --- a/sim/rx/ChangeLog +++ b/sim/rx/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * trace.c (load_file_and_line): Use fread return value to index diff --git a/sim/rx/aclocal.m4 b/sim/rx/aclocal.m4 index 1c83b202f0b..a29db710788 100644 --- a/sim/rx/aclocal.m4 +++ b/sim/rx/aclocal.m4 @@ -98,6 +98,12 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +116,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/rx/configure b/sim/rx/configure index 1a2d7ea6136..545298f4a0f 100755 --- a/sim/rx/configure +++ b/sim/rx/configure @@ -631,6 +631,16 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_default_model +sim_scache +sim_float +sim_endian +sim_bitsize +sim_alignment cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -747,17 +757,7 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits -sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float -sim_endian -sim_bitsize -sim_alignment' +sim_inline' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -11788,7 +11788,6 @@ _ACEOF - for ac_header in getopt.h do : ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" @@ -11955,6 +11954,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/rx/configure.ac b/sim/rx/configure.ac index 1b1ceb2b506..16e64a55690 100644 --- a/sim/rx/configure.ac +++ b/sim/rx/configure.ac @@ -19,7 +19,7 @@ dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index 0edf1bfbfb4..ed97d983ef4 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/sh/aclocal.m4 b/sim/sh/aclocal.m4 index 1c83b202f0b..3326ca9834f 100644 --- a/sim/sh/aclocal.m4 +++ b/sim/sh/aclocal.m4 @@ -98,6 +98,14 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +118,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/sh/configure b/sim/sh/configure index 7ed827d926c..ce4eab5bccf 100755 --- a/sim/sh/configure +++ b/sim/sh/configure @@ -631,6 +631,14 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_reserved_bits +sim_hw +sim_hw_objs +sim_hw_cflags +sim_default_model +sim_scache +sim_float +sim_bitsize cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -747,16 +755,8 @@ PATH_SEPARATOR SHELL WERROR_CFLAGS WARN_CFLAGS -sim_reserved_bits sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian -sim_bitsize sim_alignment' ac_subst_files='' ac_user_opts=' @@ -11791,7 +11791,6 @@ _ACEOF - wire_endian="" default_endian="" # Check whether --enable-sim-endian was given. @@ -11996,6 +11995,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/sh/configure.ac b/sim/sh/configure.ac index a22577f7617..4417ba4e561 100644 --- a/sim/sh/configure.ac +++ b/sim/sh/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 2a3cb5b21ba..a6106056ac9 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,8 @@ +2021-02-21 Mike Frysinger + + * configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4. + * aclocal.m4, configure: Regenerate. + 2021-02-13 Mike Frysinger * configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS. diff --git a/sim/v850/aclocal.m4 b/sim/v850/aclocal.m4 index 1c83b202f0b..f3d00fb79a5 100644 --- a/sim/v850/aclocal.m4 +++ b/sim/v850/aclocal.m4 @@ -98,6 +98,16 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../m4/sim_ac_common.m4]) +m4_include([../m4/sim_ac_option_alignment.m4]) +m4_include([../m4/sim_ac_option_assert.m4]) +m4_include([../m4/sim_ac_option_bitsize.m4]) +m4_include([../m4/sim_ac_option_endian.m4]) +m4_include([../m4/sim_ac_option_environment.m4]) +m4_include([../m4/sim_ac_option_inline.m4]) +m4_include([../m4/sim_ac_option_reserved_bits.m4]) +m4_include([../m4/sim_ac_option_warnings.m4]) +m4_include([../m4/sim_ac_output.m4]) m4_include([../../config/acx.m4]) m4_include([../../config/depstand.m4]) m4_include([../../config/gettext-sister.m4]) @@ -110,4 +120,3 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) -m4_include([../common/acinclude.m4]) diff --git a/sim/v850/configure b/sim/v850/configure index d57e476d230..524b52afb85 100755 --- a/sim/v850/configure +++ b/sim/v850/configure @@ -631,6 +631,12 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +sim_hw +sim_hw_objs +sim_hw_cflags +sim_default_model +sim_scache +sim_float cgen_breaks REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -749,12 +755,6 @@ WERROR_CFLAGS WARN_CFLAGS sim_reserved_bits sim_inline -sim_hw -sim_hw_objs -sim_hw_cflags -sim_default_model -sim_scache -sim_float sim_endian sim_bitsize sim_alignment' @@ -11797,7 +11797,6 @@ _ACEOF - wire_endian="LITTLE" default_endian="" # Check whether --enable-sim-endian was given. @@ -12105,6 +12104,18 @@ ac_config_commands="$ac_config_commands Makefile" ac_config_commands="$ac_config_commands stamp-h" + + + + + + + + + + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/v850/configure.ac b/sim/v850/configure.ac index f8f0355db07..47a5d15cbc6 100644 --- a/sim/v850/configure.ac +++ b/sim/v850/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../common ../.. ../../config]) +AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -- 2.30.2