2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
authorJoel Sherrill <joel.sherrill@oarcorp.com>
Sat, 23 Mar 2013 15:06:59 +0000 (15:06 +0000)
committerJoel Sherrill <joel.sherrill@oarcorp.com>
Sat, 23 Mar 2013 15:06:59 +0000 (15:06 +0000)
* configure.ac: Fail if dv-sockser.o not available.
Error when --disable-sim-hardware is specified.
* tconfig.in: Conditionalize use of dv_sockser_install.
* configure: Regenerated.
* config.in: Regenerated.

sim/mn10300/ChangeLog
sim/mn10300/config.in
sim/mn10300/configure
sim/mn10300/configure.ac
sim/mn10300/tconfig.in

index 3649622e2eac0abb192d83b19321a8103a54b708..0ee66b94c7415f0142e62f3f31c18d58e074c635 100644 (file)
@@ -1,3 +1,11 @@
+2013-03-23  Joel Sherrill  <joel.sherrill@oarcorp.com>
+
+       * configure.ac: Fail if dv-sockser.o not available.
+       Error when --disable-sim-hardware is specified.
+       * tconfig.in: Conditionalize use of dv_sockser_install.
+       * configure: Regenerated.
+       * config.in: Regenerated.
+
 2012-06-17  Hans-Peter Nilsson  <hp@axis.com>
 
        * interp.c: Include config.h first.  Do not include sysdep.h.
index 94d04031b916fdca9e19731ea424bc070c18e65d..30c32c32782eca67ed9ab57de43cddf4ab8a5d45 100644 (file)
@@ -16,6 +16,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 <errno.h> header file. */
 #undef HAVE_ERRNO_H
 
 /* Define to 1 if you have the `__setfpucw' function. */
 #undef HAVE___SETFPUCW
 
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#undef LT_OBJDIR
+
 /* Name of this package. */
 #undef PACKAGE
 
index 2db2ee8a408eafd245f67830104c8791ba8c245e..31ee92553843cc306cf53366882031d8285fd302 100755 (executable)
@@ -601,6 +601,7 @@ ac_includes_default="\
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
 cgen_breaks
+SIM_DV_SOCKSER_O
 REPORT_BUGS_TEXI
 REPORT_BUGS_TO
 PKGVERSION
@@ -12276,7 +12277,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12279 "configure"
+#line 12280 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12382,7 +12383,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12385 "configure"
+#line 12386 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13436,7 +13437,7 @@ fi
 fi
 
 
-if test x"yes" = x"yes"; then
+if test x"yes" != x"no"; then
   sim_hw_p=yes
 else
   sim_hw_p=no
@@ -13475,6 +13476,19 @@ else
       *) sim_hw="$sim_hw $i" ; sim_hw_objs="$sim_hw_objs dv-$i.o";;
     esac
   done
+  # mingw does not support sockser
+  SIM_DV_SOCKSER_O=""
+  case ${host} in
+    *mingw*) ;;
+    *) SIM_DV_SOCKSER_O="dv-sockser.o"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+       ;;
+  esac
+
 fi
 if test x"$silent" != x"yes" && test "$sim_hw_p" = "yes"; then
   echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
 else
 
 if test "$sim_hw_p" != yes; then
+  if test "yes" = "always"; then
+    as_fn_error "Sorry, but this simulator requires that hardware support
+be enabled. Please configure without --disable-hw-support." "$LINENO" 5
+  fi
   sim_hw_objs=
   sim_hw_cflags="-DWITH_HW=0"
   sim_hw=
@@ -13569,6 +13587,134 @@ done
 
 
 
+if test x"always" != x"no"; then
+  sim_hw_p=yes
+else
+  sim_hw_p=no
+fi
+if test """"; then
+  hardware=""""
+else
+  hardware="cfi core pal glue"
+fi
+hardware="$hardware """
+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;
+case "${enableval}" in
+  yes) sim_hw_p=yes;;
+  no)  sim_hw_p=no;;
+  ,*)   sim_hw_p=yes; hardware="${hardware} `echo ${enableval} | sed -e 's/,/ /'`";;
+  *,)   sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'` ${hardware}";;
+  *)   sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'`"'';;
+esac
+if test "$sim_hw_p" != yes; then
+  sim_hw_objs=
+  sim_hw_cflags="-DWITH_HW=0"
+  sim_hw=
+else
+  sim_hw_cflags="-DWITH_HW=1"
+  # remove duplicates
+  sim_hw=""
+  sim_hw_objs="\$(SIM_COMMON_HW_OBJS)"
+  for i in $hardware ; do
+    case " $sim_hw " in
+      *" $i "*) ;;
+      *) sim_hw="$sim_hw $i" ; sim_hw_objs="$sim_hw_objs dv-$i.o";;
+    esac
+  done
+  # mingw does not support sockser
+  SIM_DV_SOCKSER_O=""
+  case ${host} in
+    *mingw*) ;;
+    *) SIM_DV_SOCKSER_O="dv-sockser.o"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
+
+       ;;
+  esac
+
+fi
+if test x"$silent" != x"yes" && test "$sim_hw_p" = "yes"; then
+  echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+fi
+else
+
+if test "$sim_hw_p" != yes; then
+  if test "always" = "always"; then
+    as_fn_error "Sorry, but this simulator requires that hardware support
+be enabled. Please configure without --disable-hw-support." "$LINENO" 5
+  fi
+  sim_hw_objs=
+  sim_hw_cflags="-DWITH_HW=0"
+  sim_hw=
+fi
+if test x"$silent" != x"yes"; then
+  echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+fi
+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 test "${ac_cv_lib_m_log2+set}" = set; 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" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+  LIBS="-lm $LIBS"
+
+fi
+;;
+esac
+
+
+if test -z "$SIM_DV_SOCKSER_O"; then
+       as_fn_error "Sorry, but hardware support in this simulator
+unconditionally relies on dv-sockser.o which is unavailable for your host.
+Please fix this simulator." "$LINENO" 5
+fi
+
+
 ac_sources="$sim_link_files"
 ac_dests="$sim_link_links"
 while test -n "$ac_sources"; do
index 8916c85f7cc73845e1c952fcafa7e38acb9cced8..d4449beaaa61285759b68060c53b2ae1a98d9c29 100644 (file)
@@ -17,4 +17,12 @@ SIM_AC_OPTION_HARDWARE(yes,,mn103cpu mn103int mn103tim mn103ser mn103iop)
 AC_CHECK_FUNCS(time chmod utime fork execve execv chown)
 AC_CHECK_HEADERS(unistd.h stdlib.h string.h strings.h utime.h time.h)
 
+SIM_AC_OPTION_HARDWARE(always,"","")
+
+if test -z "$SIM_DV_SOCKSER_O"; then
+       AC_MSG_ERROR([Sorry, but hardware support in this simulator
+unconditionally relies on dv-sockser.o which is unavailable for your host.
+Please fix this simulator.])
+fi
+
 SIM_AC_OUTPUT
index 14ca8e77645b64c0da8183de734603dc716d0e96..1d1237bd18cb611c4ec2741468a5883c9d5b48a2 100644 (file)
@@ -6,8 +6,11 @@
 #include "gdb/remote-sim.h"
 #include "sim-module.h"
 
+/* FIXME: Revisit.  */
+#ifdef HAVE_DV_SOCKSER
 MODULE_INSTALL_FN dv_sockser_install;
 #define MODULE_LIST dv_sockser_install,
+#endif
 
 /* Define this if the simulator supports profiling.
    See the mips simulator for an example.
This page took 0.036418 seconds and 4 git commands to generate.