From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21392 invoked by alias); 24 Mar 2013 02:53:49 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 21376 invoked by uid 89); 24 Mar 2013 02:53:42 -0000 X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sun, 24 Mar 2013 02:53:39 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 6694D33BE60; Sun, 24 Mar 2013 02:53:37 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: Re: Recent simulator patches broke many sims Date: Sun, 24 Mar 2013 11:33:00 -0000 User-Agent: KMail/1.13.7 (Linux/3.7.6; KDE/4.6.5; x86_64; ; ) Cc: Joel Sherrill , "Hans-Peter Nilsson" References: <201303232239.r2NMdwAN006607@ignucius.se.axis.com> <514E3CFA.4080406@oarcorp.com> In-Reply-To: <514E3CFA.4080406@oarcorp.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart22375159.ZyAXDhkLm4"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201303232257.47568.vapier@gentoo.org> X-Virus-Found: No X-SW-Source: 2013-03/txt/msg00889.txt.bz2 --nextPart22375159.ZyAXDhkLm4 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-length: 3004 On Saturday 23 March 2013 19:38:34 Joel Sherrill wrote: > I have a fix. The case for *mingw* and disabling > setting SIM_AC_OPTION_HARDWARE needed to > be outside the AC_ARG_ENABLE() for --enable-sim-hardware > to account for the "always" simulators. the way this code is written, the lack of indentation just gets in the way. also doing all this processing in the 3rd arg to AC_ARG_ENABLE() is largely pointless. this should do it i think -mike --- a/sim/common/acinclude.m4 +++ b/sim/common/acinclude.m4 @@ -609,30 +609,38 @@ dnl arg[3] is a space separated list of extra target specific devices. AC_DEFUN([SIM_AC_OPTION_HARDWARE], [ if test x"[$1]" != x"no"; then - sim_hw_p=yes + enable_sim_hardware=yes else - sim_hw_p=no + enable_sim_hardware=no fi + if test "[$2]"; then hardware="[$2]" else hardware="cfi core pal glue" fi hardware="$hardware [$3]" + 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'`" + AC_ARG_ENABLE(sim-hardware, -[ --enable-sim-hardware=LIST Specify the hardware to be included in the build.], -[ -case "${enableval}" in - yes) sim_hw_p=yes;; - no) sim_hw_p=no;; + [AS_HELP_STRING([--enable-sim-hardware=LIST], + [Specify the hardware to be included in the build.])]) +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 "[$1]" = "always"; then + AC_MSG_ERROR([Sorry, but this simulator requires that hardware support +be enabled. Please configure without --disable-hw-support.]) + fi sim_hw_objs= sim_hw_cflags="-DWITH_HW=0" sim_hw= @@ -657,26 +665,14 @@ else ;; esac AC_SUBST(SIM_DV_SOCKSER_O) -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],[ -if test "$sim_hw_p" != yes; then - if test "[$1]" = "always"; then - AC_MSG_ERROR([Sorry, but this simulator requires that hardware support -be enabled. Please configure without --disable-hw-support.]) + 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= + dnl Some devices require extra libraries. + case " $hardware " in + *" cfi "*) AC_CHECK_LIB(m, log2);; + esac fi -if test x"$silent" != x"yes"; then - echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs" -fi]) -dnl Some devices require extra libraries. -case " $hardware " in - *" cfi "*) AC_CHECK_LIB(m, log2);; -esac ]) AC_SUBST(sim_hw_cflags) AC_SUBST(sim_hw_objs) --nextPart22375159.ZyAXDhkLm4 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJRTmurAAoJEEFjO5/oN/WB0MYP/1i+A8fpw4g4bUi+0T0v4Vqr 60aLlccdo7oogj+aDv5Sra474MhiXxTelbfBWoMMyozF3/b/0bQ+swG79yf4D/88 VR7H5kv/XaVm4f92wiSFYvABLHgaWS0+UdamXa3nuAlkO3VYTY71o7BXZb8lpLKN jnohm6Hv7lfN7TnWOSAWu7gKkudvBZoiZp8F6rOredTuMdBhwfk3+my9req66cZl +E7lyQagEG6qmI73UZdOMSyGEvwrvczCIWpIe5Rsiij8hsSqrhFKlvx56kA0aPo4 ZU8ft4MjQViOHx6Ow2qf4XriU3OYMVUP03PUArCOATIWySwBW9A1AsD0Rsc/tTCM d47HOieUUJ9EILP9lu6jRvDbkp7xA73AduTi9R9lpxlEPeXobEz0+q5FvCCPqgBw DEbzOzpyZdxEe2VoOL2mixN3Nidb1DOzZuakc0z3hXA2I5YnhQnZmxwN/JjG4td2 z/HmUZsl02ZNrGnIkPw6OI3BYxEOrpOsd+9Kph5uyzo05TViot4YI1v8BwsovhMX OpIvuFIa8Qq489m5CTtlwH0LYaUBJ+X0kQc4uOx+k+sm7SBiY61ChlmlY8eHCu0R fYtaz1dRIQ9ICRA286U4vZSnzuxQW0RywOFeZtwJp6x2dh1qFpNIYXc7zi/SVzA2 H0JeQlub4r53QZ8N8BH7 =6QqP -----END PGP SIGNATURE----- --nextPart22375159.ZyAXDhkLm4--