From patchwork Tue Mar 24 03:02:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 5773 Received: (qmail 21644 invoked by alias); 24 Mar 2015 03:03:06 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 21379 invoked by uid 89); 24 Mar 2015 03:02:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, SPF_PASS, T_RP_MATCHES_RCVD, WEIRD_QUOTING autolearn=ham version=3.3.2 X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 24 Mar 2015 03:02:52 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 4907F340A27 for ; Tue, 24 Mar 2015 03:02:50 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH] sim: mn10300: fix duplicated hardware option Date: Mon, 23 Mar 2015 23:02:48 -0400 Message-Id: <1427166168-13444-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes This code was calling SIM_AC_OPTION_HARDWARE twice -- we only want and need to do it once. Committed. --- sim/mn10300/ChangeLog | 4 ++ sim/mn10300/configure | 117 ----------------------------------------------- sim/mn10300/configure.ac | 2 - 3 files changed, 4 insertions(+), 119 deletions(-) diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index c009b26..3750b8a 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -9,6 +9,10 @@ 2015-03-23 Mike Frysinger * configure: Regenerate. + +2015-03-23 Mike Frysinger + + * configure: Regenerate. * configure.ac: Delete SIM_DV_SOCKSER_O check. 2015-03-16 Mike Frysinger diff --git a/sim/mn10300/configure b/sim/mn10300/configure index 665075f..c9185d1 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 ec29024..037d405 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