aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sim/ChangeLog4
-rw-r--r--sim/aarch64/ChangeLog4
-rw-r--r--sim/aarch64/aclocal.m41
-rw-r--r--sim/aarch64/config.in6
-rwxr-xr-xsim/aarch64/configure114
-rw-r--r--sim/arm/ChangeLog4
-rw-r--r--sim/arm/aclocal.m41
-rw-r--r--sim/arm/config.in6
-rwxr-xr-xsim/arm/configure114
-rw-r--r--sim/avr/ChangeLog4
-rw-r--r--sim/avr/aclocal.m41
-rw-r--r--sim/avr/config.in6
-rwxr-xr-xsim/avr/configure114
-rw-r--r--sim/bpf/ChangeLog4
-rw-r--r--sim/bpf/aclocal.m41
-rw-r--r--sim/bpf/config.in6
-rwxr-xr-xsim/bpf/configure114
-rw-r--r--sim/cr16/ChangeLog4
-rw-r--r--sim/cr16/aclocal.m41
-rw-r--r--sim/cr16/config.in6
-rwxr-xr-xsim/cr16/configure114
-rw-r--r--sim/d10v/ChangeLog4
-rw-r--r--sim/d10v/aclocal.m41
-rw-r--r--sim/d10v/config.in6
-rwxr-xr-xsim/d10v/configure114
-rw-r--r--sim/erc32/ChangeLog4
-rw-r--r--sim/erc32/aclocal.m41
-rw-r--r--sim/erc32/config.in6
-rwxr-xr-xsim/erc32/configure116
-rw-r--r--sim/example-synacor/ChangeLog4
-rw-r--r--sim/example-synacor/aclocal.m41
-rw-r--r--sim/example-synacor/config.in6
-rwxr-xr-xsim/example-synacor/configure114
-rw-r--r--sim/frv/ChangeLog5
-rwxr-xr-xsim/frv/configure1
-rw-r--r--sim/frv/configure.ac2
-rw-r--r--sim/ft32/ChangeLog4
-rw-r--r--sim/ft32/aclocal.m41
-rw-r--r--sim/ft32/config.in6
-rwxr-xr-xsim/ft32/configure114
-rw-r--r--sim/h8300/ChangeLog4
-rw-r--r--sim/h8300/aclocal.m41
-rw-r--r--sim/h8300/config.in6
-rwxr-xr-xsim/h8300/configure114
-rw-r--r--sim/iq2000/ChangeLog5
-rwxr-xr-xsim/iq2000/configure1
-rw-r--r--sim/iq2000/configure.ac2
-rw-r--r--sim/m32c/ChangeLog4
-rw-r--r--sim/m32c/aclocal.m41
-rw-r--r--sim/m32c/config.in6
-rwxr-xr-xsim/m32c/configure116
-rw-r--r--sim/m4/sim_ac_output.m41
-rw-r--r--sim/mcore/ChangeLog4
-rw-r--r--sim/mcore/aclocal.m41
-rw-r--r--sim/mcore/config.in6
-rwxr-xr-xsim/mcore/configure114
-rw-r--r--sim/microblaze/ChangeLog4
-rw-r--r--sim/microblaze/aclocal.m41
-rw-r--r--sim/microblaze/config.in6
-rwxr-xr-xsim/microblaze/configure114
-rw-r--r--sim/moxie/ChangeLog4
-rw-r--r--sim/moxie/aclocal.m41
-rw-r--r--sim/moxie/config.in6
-rwxr-xr-xsim/moxie/configure114
-rw-r--r--sim/msp430/ChangeLog4
-rw-r--r--sim/msp430/aclocal.m41
-rw-r--r--sim/msp430/config.in6
-rwxr-xr-xsim/msp430/configure114
-rw-r--r--sim/or1k/ChangeLog4
-rw-r--r--sim/or1k/aclocal.m41
-rw-r--r--sim/or1k/config.in6
-rwxr-xr-xsim/or1k/configure114
-rw-r--r--sim/pru/ChangeLog4
-rw-r--r--sim/pru/aclocal.m41
-rw-r--r--sim/pru/config.in6
-rwxr-xr-xsim/pru/configure114
-rw-r--r--sim/riscv/ChangeLog4
-rw-r--r--sim/riscv/aclocal.m41
-rw-r--r--sim/riscv/config.in6
-rwxr-xr-xsim/riscv/configure114
-rw-r--r--sim/rl78/ChangeLog4
-rw-r--r--sim/rl78/aclocal.m41
-rw-r--r--sim/rl78/config.in6
-rwxr-xr-xsim/rl78/configure116
-rw-r--r--sim/rx/ChangeLog4
-rw-r--r--sim/rx/aclocal.m41
-rw-r--r--sim/rx/config.in6
-rwxr-xr-xsim/rx/configure116
-rw-r--r--sim/sh/ChangeLog4
-rw-r--r--sim/sh/aclocal.m41
-rw-r--r--sim/sh/config.in6
-rwxr-xr-xsim/sh/configure114
-rw-r--r--sim/v850/ChangeLog4
-rw-r--r--sim/v850/aclocal.m41
-rw-r--r--sim/v850/config.in6
-rwxr-xr-xsim/v850/configure114
96 files changed, 2659 insertions, 120 deletions
diff --git a/sim/ChangeLog b/sim/ChangeLog
index fdeed7d..51ca492 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * m4/sim_ac_output.m4 (SIM_AC_OUTPUT): Require SIM_AC_OPTION_HARDWARE.
+
2021-04-23 Mike Frysinger <vapier@gentoo.org>
* README-HACKING (SIM_AC_OPTION_HARDWARE): Delete first two args.
diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog
index 30257c2..23736d6 100644
--- a/sim/aarch64/ChangeLog
+++ b/sim/aarch64/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/aarch64/aclocal.m4 b/sim/aarch64/aclocal.m4
index ddeb1f5..4300d0e 100644
--- a/sim/aarch64/aclocal.m4
+++ b/sim/aarch64/aclocal.m4
@@ -115,6 +115,7 @@ 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])
diff --git a/sim/aarch64/config.in b/sim/aarch64/config.in
index 2416b7f..8d37b72 100644
--- a/sim/aarch64/config.in
+++ b/sim/aarch64/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/aarch64/configure b/sim/aarch64/configure
index 22d4678..1d6a498 100755
--- a/sim/aarch64/configure
+++ b/sim/aarch64/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -757,6 +754,9 @@ SHELL
WERROR_CFLAGS
WARN_CFLAGS
sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags
sim_endian
sim_alignment'
ac_subst_files=''
@@ -785,6 +785,7 @@ enable_sim_alignment
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1444,6 +1445,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11183,7 +11186,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11186 "configure"
+#line 11189 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11289,7 +11292,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11292 "configure"
+#line 11295 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12034,6 +12037,107 @@ fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
index fbd977c..c466deb 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-26 Nick Clifton <nickc@redhat.com>
PR 22790
diff --git a/sim/arm/aclocal.m4 b/sim/arm/aclocal.m4
index ddeb1f5..4300d0e 100644
--- a/sim/arm/aclocal.m4
+++ b/sim/arm/aclocal.m4
@@ -115,6 +115,7 @@ 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])
diff --git a/sim/arm/config.in b/sim/arm/config.in
index 2416b7f..8d37b72 100644
--- a/sim/arm/config.in
+++ b/sim/arm/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/arm/configure b/sim/arm/configure
index 2a74bb7..8cabf92 100755
--- a/sim/arm/configure
+++ b/sim/arm/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -757,6 +754,9 @@ SHELL
WERROR_CFLAGS
WARN_CFLAGS
sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags
sim_endian
sim_alignment'
ac_subst_files=''
@@ -785,6 +785,7 @@ enable_sim_alignment
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1444,6 +1445,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11183,7 +11186,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11186 "configure"
+#line 11189 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11289,7 +11292,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11292 "configure"
+#line 11295 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12030,6 +12033,107 @@ fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog
index c8f51eb..9c53284 100644
--- a/sim/avr/ChangeLog
+++ b/sim/avr/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/avr/aclocal.m4 b/sim/avr/aclocal.m4
index ddeb1f5..4300d0e 100644
--- a/sim/avr/aclocal.m4
+++ b/sim/avr/aclocal.m4
@@ -115,6 +115,7 @@ 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])
diff --git a/sim/avr/config.in b/sim/avr/config.in
index 2416b7f..8d37b72 100644
--- a/sim/avr/config.in
+++ b/sim/avr/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/avr/configure b/sim/avr/configure
index ae50e46..5c43b29 100755
--- a/sim/avr/configure
+++ b/sim/avr/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -757,6 +754,9 @@ SHELL
WERROR_CFLAGS
WARN_CFLAGS
sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags
sim_endian
sim_alignment'
ac_subst_files=''
@@ -785,6 +785,7 @@ enable_sim_alignment
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1444,6 +1445,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11183,7 +11186,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11186 "configure"
+#line 11189 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11289,7 +11292,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11292 "configure"
+#line 11295 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12030,6 +12033,107 @@ fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/bpf/ChangeLog b/sim/bpf/ChangeLog
index 9021585..e5e2231 100644
--- a/sim/bpf/ChangeLog
+++ b/sim/bpf/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/bpf/aclocal.m4 b/sim/bpf/aclocal.m4
index 73a795c..e1659b4 100644
--- a/sim/bpf/aclocal.m4
+++ b/sim/bpf/aclocal.m4
@@ -118,6 +118,7 @@ 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])
diff --git a/sim/bpf/config.in b/sim/bpf/config.in
index 2416b7f..8d37b72 100644
--- a/sim/bpf/config.in
+++ b/sim/bpf/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/bpf/configure b/sim/bpf/configure
index 31e7c82..32b4a77 100755
--- a/sim/bpf/configure
+++ b/sim/bpf/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_float
cgen_breaks
cgen
@@ -758,6 +755,9 @@ WERROR_CFLAGS
WARN_CFLAGS
sim_scache
sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags
sim_endian
sim_default_model
sim_bitsize
@@ -792,6 +792,7 @@ enable_werror
enable_build_warnings
enable_sim_build_warnings
enable_cgen_maint
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1457,6 +1458,8 @@ Optional Features:
enable SIM specific build-time compiler warnings if
gcc is used
--enable-cgen-maint=DIR build cgen generated files
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11196,7 +11199,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11199 "configure"
+#line 11202 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11302,7 +11305,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11305 "configure"
+#line 11308 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12167,6 +12170,107 @@ fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog
index 4be46d6..2540c37 100644
--- a/sim/cr16/ChangeLog
+++ b/sim/cr16/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* simops.c: Update includes.
diff --git a/sim/cr16/aclocal.m4 b/sim/cr16/aclocal.m4
index ddeb1f5..4300d0e 100644
--- a/sim/cr16/aclocal.m4
+++ b/sim/cr16/aclocal.m4
@@ -115,6 +115,7 @@ 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])
diff --git a/sim/cr16/config.in b/sim/cr16/config.in
index 2416b7f..8d37b72 100644
--- a/sim/cr16/config.in
+++ b/sim/cr16/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/cr16/configure b/sim/cr16/configure
index f0cfde9..b0d92ce 100755
--- a/sim/cr16/configure
+++ b/sim/cr16/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -757,6 +754,9 @@ SHELL
WERROR_CFLAGS
WARN_CFLAGS
sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags
sim_endian
sim_alignment'
ac_subst_files=''
@@ -785,6 +785,7 @@ enable_sim_alignment
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1444,6 +1445,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11183,7 +11186,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11186 "configure"
+#line 11189 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11289,7 +11292,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11292 "configure"
+#line 11295 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12030,6 +12033,107 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog
index 22d1e8f..9945be4 100644
--- a/sim/d10v/ChangeLog
+++ b/sim/d10v/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/d10v/aclocal.m4 b/sim/d10v/aclocal.m4
index ddeb1f5..4300d0e 100644
--- a/sim/d10v/aclocal.m4
+++ b/sim/d10v/aclocal.m4
@@ -115,6 +115,7 @@ 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])
diff --git a/sim/d10v/config.in b/sim/d10v/config.in
index 2416b7f..8d37b72 100644
--- a/sim/d10v/config.in
+++ b/sim/d10v/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/d10v/configure b/sim/d10v/configure
index c02a02b..3daef52 100755
--- a/sim/d10v/configure
+++ b/sim/d10v/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -757,6 +754,9 @@ SHELL
WERROR_CFLAGS
WARN_CFLAGS
sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags
sim_endian
sim_alignment'
ac_subst_files=''
@@ -785,6 +785,7 @@ enable_sim_alignment
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1444,6 +1445,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11183,7 +11186,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11186 "configure"
+#line 11189 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11289,7 +11292,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11292 "configure"
+#line 11295 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12030,6 +12033,107 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog
index 0a7d033..a6d1cad 100644
--- a/sim/erc32/ChangeLog
+++ b/sim/erc32/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/erc32/aclocal.m4 b/sim/erc32/aclocal.m4
index db8c5cd..ed05269 100644
--- a/sim/erc32/aclocal.m4
+++ b/sim/erc32/aclocal.m4
@@ -113,6 +113,7 @@ m4_include([../../lt~obsolete.m4])
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_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])
diff --git a/sim/erc32/config.in b/sim/erc32/config.in
index 2416b7f..8d37b72 100644
--- a/sim/erc32/config.in
+++ b/sim/erc32/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/erc32/configure b/sim/erc32/configure
index eab6d86..a884ee7 100755
--- a/sim/erc32/configure
+++ b/sim/erc32/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -761,7 +758,10 @@ PATH_SEPARATOR
SHELL
WERROR_CFLAGS
WARN_CFLAGS
-sim_inline'
+sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags'
ac_subst_files=''
ac_user_opts='
enable_option_checking
@@ -786,6 +786,7 @@ with_bugurl
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1440,6 +1441,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11179,7 +11182,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11182 "configure"
+#line 11185 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11285,7 +11288,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11288 "configure"
+#line 11291 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12072,6 +12075,107 @@ fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/example-synacor/ChangeLog b/sim/example-synacor/ChangeLog
index a5c868b..8865093 100644
--- a/sim/example-synacor/ChangeLog
+++ b/sim/example-synacor/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/example-synacor/aclocal.m4 b/sim/example-synacor/aclocal.m4
index ddeb1f5..4300d0e 100644
--- a/sim/example-synacor/aclocal.m4
+++ b/sim/example-synacor/aclocal.m4
@@ -115,6 +115,7 @@ 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])
diff --git a/sim/example-synacor/config.in b/sim/example-synacor/config.in
index 2416b7f..8d37b72 100644
--- a/sim/example-synacor/config.in
+++ b/sim/example-synacor/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/example-synacor/configure b/sim/example-synacor/configure
index 7fab5fa..a5938be 100755
--- a/sim/example-synacor/configure
+++ b/sim/example-synacor/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -757,6 +754,9 @@ SHELL
WERROR_CFLAGS
WARN_CFLAGS
sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags
sim_endian
sim_alignment'
ac_subst_files=''
@@ -785,6 +785,7 @@ enable_sim_alignment
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1444,6 +1445,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11183,7 +11186,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11186 "configure"
+#line 11189 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11289,7 +11292,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11292 "configure"
+#line 11295 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12030,6 +12033,107 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog
index bc981ac..6452399 100644
--- a/sim/frv/ChangeLog
+++ b/sim/frv/ChangeLog
@@ -1,3 +1,8 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * configure.ac (SIM_AC_OPTION_HARDWARE): Delete call.
+ * configure: Regenerate.
+
2021-04-23 Mike Frysinger <vapier@gentoo.org>
* configure.ac (SIM_AC_OPTION_HARDWARE): Delete arguments.
diff --git a/sim/frv/configure b/sim/frv/configure
index 30c7c81..921f622 100755
--- a/sim/frv/configure
+++ b/sim/frv/configure
@@ -12231,7 +12231,6 @@ fi
fi
-
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/frv/configure.ac b/sim/frv/configure.ac
index 6588fe5..e5bbdbf 100644
--- a/sim/frv/configure.ac
+++ b/sim/frv/configure.ac
@@ -27,6 +27,4 @@ if test x"$silent" != x"yes" && test x"$sim_trapdump" != x""; then
fi],[sim_trapdump=""])dnl
AC_SUBST(sim_trapdump)
-SIM_AC_OPTION_HARDWARE
-
SIM_AC_OUTPUT
diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog
index 0a06ef3..6a26436 100644
--- a/sim/ft32/ChangeLog
+++ b/sim/ft32/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/ft32/aclocal.m4 b/sim/ft32/aclocal.m4
index ddeb1f5..4300d0e 100644
--- a/sim/ft32/aclocal.m4
+++ b/sim/ft32/aclocal.m4
@@ -115,6 +115,7 @@ 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])
diff --git a/sim/ft32/config.in b/sim/ft32/config.in
index 2416b7f..8d37b72 100644
--- a/sim/ft32/config.in
+++ b/sim/ft32/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/ft32/configure b/sim/ft32/configure
index 2f14e5a..d80f8f8 100755
--- a/sim/ft32/configure
+++ b/sim/ft32/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -757,6 +754,9 @@ SHELL
WERROR_CFLAGS
WARN_CFLAGS
sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags
sim_endian
sim_alignment'
ac_subst_files=''
@@ -785,6 +785,7 @@ enable_sim_alignment
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1444,6 +1445,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11183,7 +11186,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11186 "configure"
+#line 11189 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11289,7 +11292,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11292 "configure"
+#line 11295 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12030,6 +12033,107 @@ fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index 0a02c9c..c3daaf4 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/h8300/aclocal.m4 b/sim/h8300/aclocal.m4
index ddeb1f5..4300d0e 100644
--- a/sim/h8300/aclocal.m4
+++ b/sim/h8300/aclocal.m4
@@ -115,6 +115,7 @@ 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])
diff --git a/sim/h8300/config.in b/sim/h8300/config.in
index fbed42a..505aa8c 100644
--- a/sim/h8300/config.in
+++ b/sim/h8300/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/h8300/configure b/sim/h8300/configure
index 682019b..fd7bc25 100755
--- a/sim/h8300/configure
+++ b/sim/h8300/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -757,6 +754,9 @@ SHELL
WERROR_CFLAGS
WARN_CFLAGS
sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags
sim_endian
sim_alignment'
ac_subst_files=''
@@ -785,6 +785,7 @@ enable_sim_alignment
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1444,6 +1445,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11184,7 +11187,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11187 "configure"
+#line 11190 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11290,7 +11293,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11293 "configure"
+#line 11296 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12032,6 +12035,107 @@ fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog
index addf3c6..ffb7ab9 100644
--- a/sim/iq2000/ChangeLog
+++ b/sim/iq2000/ChangeLog
@@ -1,3 +1,8 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * configure.ac (SIM_AC_OPTION_HARDWARE): Delete call.
+ * configure: Regenerate.
+
2021-04-23 Mike Frysinger <vapier@gentoo.org>
* configure.ac (SIM_AC_OPTION_HARDWARE): Delete arguments.
diff --git a/sim/iq2000/configure b/sim/iq2000/configure
index 21b500c..0607bc6 100755
--- a/sim/iq2000/configure
+++ b/sim/iq2000/configure
@@ -12210,7 +12210,6 @@ fi
fi
-
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/iq2000/configure.ac b/sim/iq2000/configure.ac
index f21bc80..623fa19 100644
--- a/sim/iq2000/configure.ac
+++ b/sim/iq2000/configure.ac
@@ -11,6 +11,4 @@ SIM_AC_OPTION_DEFAULT_MODEL(iq2000)
SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_CGEN_MAINT
-SIM_AC_OPTION_HARDWARE
-
SIM_AC_OUTPUT
diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog
index 2919dc4..c2991c6 100644
--- a/sim/m32c/ChangeLog
+++ b/sim/m32c/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/m32c/aclocal.m4 b/sim/m32c/aclocal.m4
index db8c5cd..ed05269 100644
--- a/sim/m32c/aclocal.m4
+++ b/sim/m32c/aclocal.m4
@@ -113,6 +113,7 @@ m4_include([../../lt~obsolete.m4])
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_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])
diff --git a/sim/m32c/config.in b/sim/m32c/config.in
index aaa80a5..3b33610 100644
--- a/sim/m32c/config.in
+++ b/sim/m32c/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/m32c/configure b/sim/m32c/configure
index 2e2ed73..c0fa44f 100755
--- a/sim/m32c/configure
+++ b/sim/m32c/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -758,7 +755,10 @@ PATH_SEPARATOR
SHELL
WERROR_CFLAGS
WARN_CFLAGS
-sim_inline'
+sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags'
ac_subst_files=''
ac_user_opts='
enable_option_checking
@@ -783,6 +783,7 @@ with_bugurl
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1437,6 +1438,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11181,7 +11184,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11184 "configure"
+#line 11187 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11287,7 +11290,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11290 "configure"
+#line 11293 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11946,6 +11949,107 @@ fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/m4/sim_ac_output.m4 b/sim/m4/sim_ac_output.m4
index 9ec566d..b18f254 100644
--- a/sim/m4/sim_ac_output.m4
+++ b/sim/m4/sim_ac_output.m4
@@ -22,6 +22,7 @@ dnl the target's fragment at the appropriate points.
AC_DEFUN([SIM_AC_OUTPUT],
[dnl
AC_REQUIRE([SIM_AC_OPTION_WARNINGS])dnl
+AC_REQUIRE([SIM_AC_OPTION_HARDWARE])dnl
dnl Make @cgen_breaks@ non-null only if the sim uses CGEN.
cgen_breaks=""
diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog
index 9e700dc..815cd1a 100644
--- a/sim/mcore/ChangeLog
+++ b/sim/mcore/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/mcore/aclocal.m4 b/sim/mcore/aclocal.m4
index ddeb1f5..4300d0e 100644
--- a/sim/mcore/aclocal.m4
+++ b/sim/mcore/aclocal.m4
@@ -115,6 +115,7 @@ 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])
diff --git a/sim/mcore/config.in b/sim/mcore/config.in
index 2416b7f..8d37b72 100644
--- a/sim/mcore/config.in
+++ b/sim/mcore/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/mcore/configure b/sim/mcore/configure
index 25f04f5..afd78ba 100755
--- a/sim/mcore/configure
+++ b/sim/mcore/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -757,6 +754,9 @@ SHELL
WERROR_CFLAGS
WARN_CFLAGS
sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags
sim_endian
sim_alignment'
ac_subst_files=''
@@ -785,6 +785,7 @@ enable_sim_alignment
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1444,6 +1445,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11183,7 +11186,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11186 "configure"
+#line 11189 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11289,7 +11292,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11292 "configure"
+#line 11295 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12027,6 +12030,107 @@ fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog
index 089c15a..5d6957b 100644
--- a/sim/microblaze/ChangeLog
+++ b/sim/microblaze/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/microblaze/aclocal.m4 b/sim/microblaze/aclocal.m4
index ddeb1f5..4300d0e 100644
--- a/sim/microblaze/aclocal.m4
+++ b/sim/microblaze/aclocal.m4
@@ -115,6 +115,7 @@ 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])
diff --git a/sim/microblaze/config.in b/sim/microblaze/config.in
index 2416b7f..8d37b72 100644
--- a/sim/microblaze/config.in
+++ b/sim/microblaze/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/microblaze/configure b/sim/microblaze/configure
index 2a74bb7..8cabf92 100755
--- a/sim/microblaze/configure
+++ b/sim/microblaze/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -757,6 +754,9 @@ SHELL
WERROR_CFLAGS
WARN_CFLAGS
sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags
sim_endian
sim_alignment'
ac_subst_files=''
@@ -785,6 +785,7 @@ enable_sim_alignment
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1444,6 +1445,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11183,7 +11186,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11186 "configure"
+#line 11189 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11289,7 +11292,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11292 "configure"
+#line 11295 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12030,6 +12033,107 @@ fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog
index ff2b8eb..3e74d3f 100644
--- a/sim/moxie/ChangeLog
+++ b/sim/moxie/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/moxie/aclocal.m4 b/sim/moxie/aclocal.m4
index ddeb1f5..4300d0e 100644
--- a/sim/moxie/aclocal.m4
+++ b/sim/moxie/aclocal.m4
@@ -115,6 +115,7 @@ 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])
diff --git a/sim/moxie/config.in b/sim/moxie/config.in
index 2416b7f..8d37b72 100644
--- a/sim/moxie/config.in
+++ b/sim/moxie/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/moxie/configure b/sim/moxie/configure
index 23e04ba..0314c64 100755
--- a/sim/moxie/configure
+++ b/sim/moxie/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -758,6 +755,9 @@ SHELL
WERROR_CFLAGS
WARN_CFLAGS
sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags
sim_endian
sim_alignment'
ac_subst_files=''
@@ -786,6 +786,7 @@ enable_sim_alignment
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1445,6 +1446,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11184,7 +11187,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11187 "configure"
+#line 11190 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11290,7 +11293,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11293 "configure"
+#line 11296 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12124,6 +12127,107 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog
index ed87e9f..3d14ecb 100644
--- a/sim/msp430/ChangeLog
+++ b/sim/msp430/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/msp430/aclocal.m4 b/sim/msp430/aclocal.m4
index ddeb1f5..4300d0e 100644
--- a/sim/msp430/aclocal.m4
+++ b/sim/msp430/aclocal.m4
@@ -115,6 +115,7 @@ 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])
diff --git a/sim/msp430/config.in b/sim/msp430/config.in
index 2416b7f..8d37b72 100644
--- a/sim/msp430/config.in
+++ b/sim/msp430/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/msp430/configure b/sim/msp430/configure
index ae50e46..5c43b29 100755
--- a/sim/msp430/configure
+++ b/sim/msp430/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -757,6 +754,9 @@ SHELL
WERROR_CFLAGS
WARN_CFLAGS
sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags
sim_endian
sim_alignment'
ac_subst_files=''
@@ -785,6 +785,7 @@ enable_sim_alignment
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1444,6 +1445,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11183,7 +11186,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11186 "configure"
+#line 11189 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11289,7 +11292,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11292 "configure"
+#line 11295 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12030,6 +12033,107 @@ fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/or1k/ChangeLog b/sim/or1k/ChangeLog
index b4404f0..dd34d45 100644
--- a/sim/or1k/ChangeLog
+++ b/sim/or1k/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/or1k/aclocal.m4 b/sim/or1k/aclocal.m4
index 73a795c..e1659b4 100644
--- a/sim/or1k/aclocal.m4
+++ b/sim/or1k/aclocal.m4
@@ -118,6 +118,7 @@ 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])
diff --git a/sim/or1k/config.in b/sim/or1k/config.in
index 2416b7f..8d37b72 100644
--- a/sim/or1k/config.in
+++ b/sim/or1k/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/or1k/configure b/sim/or1k/configure
index 4a7f8be..9e2040e 100755
--- a/sim/or1k/configure
+++ b/sim/or1k/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_float
cgen_breaks
cgen
@@ -758,6 +755,9 @@ WERROR_CFLAGS
WARN_CFLAGS
sim_scache
sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags
sim_endian
sim_default_model
sim_bitsize
@@ -792,6 +792,7 @@ enable_werror
enable_build_warnings
enable_sim_build_warnings
enable_cgen_maint
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1457,6 +1458,8 @@ Optional Features:
enable SIM specific build-time compiler warnings if
gcc is used
--enable-cgen-maint=DIR build cgen generated files
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11196,7 +11199,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11199 "configure"
+#line 11202 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11302,7 +11305,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11305 "configure"
+#line 11308 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12189,6 +12192,107 @@ fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/pru/ChangeLog b/sim/pru/ChangeLog
index 833dcc5..926fe2d 100644
--- a/sim/pru/ChangeLog
+++ b/sim/pru/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/pru/aclocal.m4 b/sim/pru/aclocal.m4
index ddeb1f5..4300d0e 100644
--- a/sim/pru/aclocal.m4
+++ b/sim/pru/aclocal.m4
@@ -115,6 +115,7 @@ 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])
diff --git a/sim/pru/config.in b/sim/pru/config.in
index 2416b7f..8d37b72 100644
--- a/sim/pru/config.in
+++ b/sim/pru/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/pru/configure b/sim/pru/configure
index ae50e46..5c43b29 100755
--- a/sim/pru/configure
+++ b/sim/pru/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -757,6 +754,9 @@ SHELL
WERROR_CFLAGS
WARN_CFLAGS
sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags
sim_endian
sim_alignment'
ac_subst_files=''
@@ -785,6 +785,7 @@ enable_sim_alignment
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1444,6 +1445,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11183,7 +11186,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11186 "configure"
+#line 11189 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11289,7 +11292,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11292 "configure"
+#line 11295 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12030,6 +12033,107 @@ fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/riscv/ChangeLog b/sim/riscv/ChangeLog
index 90abdf9..0993913 100644
--- a/sim/riscv/ChangeLog
+++ b/sim/riscv/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/riscv/aclocal.m4 b/sim/riscv/aclocal.m4
index bc1ef46..9710f3f 100644
--- a/sim/riscv/aclocal.m4
+++ b/sim/riscv/aclocal.m4
@@ -117,6 +117,7 @@ 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_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])
diff --git a/sim/riscv/config.in b/sim/riscv/config.in
index 2416b7f..8d37b72 100644
--- a/sim/riscv/config.in
+++ b/sim/riscv/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/riscv/configure b/sim/riscv/configure
index 29f0c4ca..96f4fff 100755
--- a/sim/riscv/configure
+++ b/sim/riscv/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_scache
sim_float
cgen_breaks
@@ -755,6 +752,9 @@ SHELL
WERROR_CFLAGS
WARN_CFLAGS
sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags
sim_endian
sim_default_model
sim_bitsize
@@ -787,6 +787,7 @@ enable_build_warnings
enable_sim_build_warnings
enable_sim_default_model
enable_sim_bitsize
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1449,6 +1450,8 @@ Optional Features:
--enable-sim-default-model=model
Specify default model to simulate
--enable-sim-bitsize=N Specify target bitsize (32 or 64)
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11188,7 +11191,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11191 "configure"
+#line 11194 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11294,7 +11297,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11297 "configure"
+#line 11300 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12146,6 +12149,107 @@ fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/rl78/ChangeLog b/sim/rl78/ChangeLog
index b8d10b6..4adb625 100644
--- a/sim/rl78/ChangeLog
+++ b/sim/rl78/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/rl78/aclocal.m4 b/sim/rl78/aclocal.m4
index db8c5cd..ed05269 100644
--- a/sim/rl78/aclocal.m4
+++ b/sim/rl78/aclocal.m4
@@ -113,6 +113,7 @@ m4_include([../../lt~obsolete.m4])
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_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])
diff --git a/sim/rl78/config.in b/sim/rl78/config.in
index 2416b7f..8d37b72 100644
--- a/sim/rl78/config.in
+++ b/sim/rl78/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/rl78/configure b/sim/rl78/configure
index a53a2b4..0a61270 100755
--- a/sim/rl78/configure
+++ b/sim/rl78/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -758,7 +755,10 @@ PATH_SEPARATOR
SHELL
WERROR_CFLAGS
WARN_CFLAGS
-sim_inline'
+sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags'
ac_subst_files=''
ac_user_opts='
enable_option_checking
@@ -783,6 +783,7 @@ with_bugurl
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1437,6 +1438,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11176,7 +11179,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11179 "configure"
+#line 11182 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11282,7 +11285,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11285 "configure"
+#line 11288 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11928,6 +11931,107 @@ fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog
index bfb417d..fbc8516 100644
--- a/sim/rx/ChangeLog
+++ b/sim/rx/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/rx/aclocal.m4 b/sim/rx/aclocal.m4
index db8c5cd..ed05269 100644
--- a/sim/rx/aclocal.m4
+++ b/sim/rx/aclocal.m4
@@ -113,6 +113,7 @@ m4_include([../../lt~obsolete.m4])
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_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])
diff --git a/sim/rx/config.in b/sim/rx/config.in
index 9d69487..7cb68b3 100644
--- a/sim/rx/config.in
+++ b/sim/rx/config.in
@@ -19,6 +19,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -34,6 +37,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/rx/configure b/sim/rx/configure
index 7a2f9ea..e227982 100755
--- a/sim/rx/configure
+++ b/sim/rx/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -758,7 +755,10 @@ PATH_SEPARATOR
SHELL
WERROR_CFLAGS
WARN_CFLAGS
-sim_inline'
+sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags'
ac_subst_files=''
ac_user_opts='
enable_option_checking
@@ -785,6 +785,7 @@ enable_cycle_stats
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1442,6 +1443,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11181,7 +11184,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11184 "configure"
+#line 11187 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11287,7 +11290,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11290 "configure"
+#line 11293 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11973,6 +11976,107 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index 98d1f35..d89fe28 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* interp.c: Update includes.
diff --git a/sim/sh/aclocal.m4 b/sim/sh/aclocal.m4
index ddeb1f5..4300d0e 100644
--- a/sim/sh/aclocal.m4
+++ b/sim/sh/aclocal.m4
@@ -115,6 +115,7 @@ 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])
diff --git a/sim/sh/config.in b/sim/sh/config.in
index 2416b7f..8d37b72 100644
--- a/sim/sh/config.in
+++ b/sim/sh/config.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -28,6 +31,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/sh/configure b/sim/sh/configure
index 25f04f5..afd78ba 100755
--- a/sim/sh/configure
+++ b/sim/sh/configure
@@ -634,9 +634,6 @@ ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
sim_reserved_bits
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -757,6 +754,9 @@ SHELL
WERROR_CFLAGS
WARN_CFLAGS
sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags
sim_endian
sim_alignment'
ac_subst_files=''
@@ -785,6 +785,7 @@ enable_sim_alignment
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1444,6 +1445,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11183,7 +11186,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11186 "configure"
+#line 11189 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11289,7 +11292,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11292 "configure"
+#line 11295 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12027,6 +12030,107 @@ fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog
index 82a1d74..d46aa59 100644
--- a/sim/v850/ChangeLog
+++ b/sim/v850/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4, config.in, configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/v850/aclocal.m4 b/sim/v850/aclocal.m4
index a0d32d4..02c1113 100644
--- a/sim/v850/aclocal.m4
+++ b/sim/v850/aclocal.m4
@@ -116,6 +116,7 @@ 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])
diff --git a/sim/v850/config.in b/sim/v850/config.in
index 1eb9e29..8249d7c 100644
--- a/sim/v850/config.in
+++ b/sim/v850/config.in
@@ -19,6 +19,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if dv-sockser is usable. */
+#undef HAVE_DV_SOCKSER
+
/* Define to 1 if you have the `execv' function. */
#undef HAVE_EXECV
@@ -43,6 +46,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
diff --git a/sim/v850/configure b/sim/v850/configure
index aa74f6a..d5941de 100755
--- a/sim/v850/configure
+++ b/sim/v850/configure
@@ -633,9 +633,6 @@ ac_header_list=
ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
-sim_hw
-sim_hw_objs
-sim_hw_cflags
sim_default_model
sim_scache
sim_float
@@ -756,6 +753,9 @@ WERROR_CFLAGS
WARN_CFLAGS
sim_reserved_bits
sim_inline
+sim_hw
+sim_hw_objs
+sim_hw_cflags
sim_endian
sim_bitsize
sim_alignment'
@@ -787,6 +787,7 @@ enable_sim_bitsize
enable_werror
enable_build_warnings
enable_sim_build_warnings
+enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1450,6 +1451,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11196,7 +11199,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11199 "configure"
+#line 11202 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11302,7 +11305,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11305 "configure"
+#line 11308 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12135,6 +12138,107 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
+hardware="cfi core pal glue "
+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'`"
+
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+ enableval=$enable_sim_hardware;
+else
+ enable_sim_hardware="yes"
+fi
+
+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"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+ ;;
+ esac
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+$as_echo_n "checking for log2 in -lm... " >&6; }
+if ${ac_cv_lib_m_log2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log2 ();
+int
+main ()
+{
+return log2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_log2=yes
+else
+ ac_cv_lib_m_log2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
+$as_echo "$ac_cv_lib_m_log2" >&6; }
+if test "x$ac_cv_lib_m_log2" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+;;
+ esac
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";