From: Mike Frysinger Date: Mon, 23 Mar 2015 02:41:36 +0000 (-0400) Subject: sim: mn10300: fix duplicated hardware option X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4af3e7e0d3f7f419b718a5417080c20e4bcaa8c7;p=binutils-gdb.git sim: mn10300: fix duplicated hardware option This code was calling SIM_AC_OPTION_HARDWARE twice -- we only want and need to do it once. --- diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index c009b2603fe..3750b8a330f 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -6,6 +6,10 @@ * configure: Regenerate. +2015-03-23 Mike Frysinger + + * configure: Regenerate. + 2015-03-23 Mike Frysinger * configure: Regenerate. diff --git a/sim/mn10300/configure b/sim/mn10300/configure index 665075fbbf8..c9185d12735 100755 --- a/sim/mn10300/configure +++ b/sim/mn10300/configure @@ -13678,123 +13678,6 @@ done -if test x"always" != x"no"; then - enable_sim_hardware=yes -else - 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; -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/,/ /'`"'';; -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= -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 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 -fi - - - ac_sources="$sim_link_files" ac_dests="$sim_link_links" while test -n "$ac_sources"; do diff --git a/sim/mn10300/configure.ac b/sim/mn10300/configure.ac index ec2902460e7..037d405e261 100644 --- a/sim/mn10300/configure.ac +++ b/sim/mn10300/configure.ac @@ -17,6 +17,4 @@ SIM_AC_OPTION_HARDWARE(yes,,mn103cpu mn103int mn103tim mn103ser mn103iop) AC_CHECK_FUNCS(time chmod utime fork execve execv chown) AC_CHECK_HEADERS(utime.h) -SIM_AC_OPTION_HARDWARE(always,"","") - SIM_AC_OUTPUT