aboutsummaryrefslogtreecommitdiff
path: root/sim/mn10300
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-03-26 18:00:04 +0000
committerMike Frysinger <vapier@gentoo.org>2013-03-26 18:00:04 +0000
commit1517bd274290e06af498ef7e496519e4bbc4d5e6 (patch)
treed946b54ed6d438ea64f47b15e44c56f0a8bd55fe /sim/mn10300
parent1fb2e2b56901690331720448836755a4eee944c7 (diff)
downloadbinutils-1517bd274290e06af498ef7e496519e4bbc4d5e6.zip
binutils-1517bd274290e06af498ef7e496519e4bbc4d5e6.tar.gz
binutils-1517bd274290e06af498ef7e496519e4bbc4d5e6.tar.bz2
sim: rewrite SIM_AC_OPTION_HARDWARE a bit to simplify things
There's no need to put the majority of the logic into the 3rd arg of the AC_ARG_ENABLE. Coupled with the lack of indentation, it makes it hard to follow, error prone to update, and duplicates code (with the 4th arg). So pull the logic out of the 3rd arg and outside of the AC_ARG_ENABLE macro. This allows us to gut the 4th arg entirely, merge with the code that followed the macro, and fix bugs related to the new dv-sockser in the process. Hopefully building the various sims with the default sim-hardware settings, as well as with explicit --{dis,en}able-sim-hardware flags, should all just work now.
Diffstat (limited to 'sim/mn10300')
-rw-r--r--sim/mn10300/ChangeLog4
-rwxr-xr-xsim/mn10300/configure107
2 files changed, 52 insertions, 59 deletions
diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog
index 0ee66b9..e2d0245 100644
--- a/sim/mn10300/ChangeLog
+++ b/sim/mn10300/ChangeLog
@@ -1,3 +1,7 @@
+2013-03-26 Mike Frysinger <vapier@gentoo.org>
+
+ * configure: Regenerate.
+
2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac: Fail if dv-sockser.o not available.
diff --git a/sim/mn10300/configure b/sim/mn10300/configure
index 31ee925..9cef805 100755
--- a/sim/mn10300/configure
+++ b/sim/mn10300/configure
@@ -1420,7 +1420,8 @@ Optional Features:
--enable-sim-reserved-bits Specify whether to check reserved bits in instruction.
--enable-sim-bitsize=N Specify target bitsize (32 or 64).
--enable-sim-inline=inlines Specify which functions should be inlined.
- --enable-sim-hardware=LIST Specify the hardware to be included in the build.
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -12277,7 +12278,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12280 "configure"
+#line 12281 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12383,7 +12384,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12386 "configure"
+#line 12387 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13438,30 +13439,40 @@ fi
if test x"yes" != x"no"; then
- sim_hw_p=yes
+ enable_sim_hardware=yes
else
- sim_hw_p=no
+ enable_sim_hardware=no
fi
+
if test ""; then
hardware=""
else
hardware="cfi core pal glue"
fi
hardware="$hardware mn103cpu mn103int mn103tim mn103ser mn103iop"
+
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;;
+fi
+
+case ${enable_sim_hardware} 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/,/ /'`"'';;
+ *) sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'`"'';;
esac
+
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=
@@ -13489,28 +13500,11 @@ _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 "yes" = "always"; then
- as_fn_error "Sorry, but this simulator requires that hardware support
-be enabled. Please configure without --disable-hw-support." "$LINENO" 5
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
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
+ 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
@@ -13555,7 +13549,8 @@ _ACEOF
fi
;;
-esac
+ esac
+fi
for ac_func in time chmod utime fork execve execv chown
@@ -13588,30 +13583,40 @@ done
if test x"always" != x"no"; then
- sim_hw_p=yes
+ enable_sim_hardware=yes
else
- sim_hw_p=no
+ enable_sim_hardware=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;;
+fi
+
+case ${enable_sim_hardware} 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/,/ /'`"'';;
+ *) sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'`"'';;
esac
+
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=
@@ -13639,28 +13644,11 @@ _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
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
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
+ 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
@@ -13705,7 +13693,8 @@ _ACEOF
fi
;;
-esac
+ esac
+fi
if test -z "$SIM_DV_SOCKSER_O"; then