From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Cc: Joel Sherrill <joel.sherrill@oarcorp.com>,
"Hans-Peter Nilsson" <hans-peter.nilsson@axis.com>
Subject: Re: Recent simulator patches broke many sims
Date: Sun, 24 Mar 2013 11:33:00 -0000 [thread overview]
Message-ID: <201303232257.47568.vapier@gentoo.org> (raw)
In-Reply-To: <514E3CFA.4080406@oarcorp.com>
[-- Attachment #1: Type: Text/Plain, Size: 3004 bytes --]
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)
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-03-24 2:53 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-24 0:22 Hans-Peter Nilsson
2013-03-24 0:38 ` Joel Sherrill
2013-03-24 5:39 ` Hans-Peter Nilsson
2013-03-24 5:39 ` Joel Sherrill
2013-03-24 11:04 ` Hans-Peter Nilsson
2013-03-24 2:12 ` Joel Sherrill
2013-03-24 2:35 ` Joel Sherrill
2013-03-24 2:53 ` Hans-Peter Nilsson
2013-03-24 5:22 ` Hans-Peter Nilsson
2013-03-24 5:36 ` Hans-Peter Nilsson
2013-03-24 4:51 ` Hans-Peter Nilsson
2013-03-24 11:33 ` Mike Frysinger [this message]
2013-03-25 3:30 ` Joel Sherrill
2013-03-25 3:50 ` Hans-Peter Nilsson
2013-03-25 7:39 ` Joel Sherrill
2013-03-26 17:49 ` Mike Frysinger
2013-03-26 18:41 ` Hans-Peter Nilsson
2013-03-26 18:43 ` Joel Sherrill
2013-03-26 19:49 ` Mike Frysinger
2013-03-26 20:50 ` Hans-Peter Nilsson
2013-03-26 21:24 ` Mike Frysinger
2013-03-27 1:39 ` Hans-Peter Nilsson
2013-03-27 9:13 ` Mike Frysinger
2013-03-26 18:56 ` Mike Frysinger
2013-03-27 8:47 ` Joel Brobecker
2013-03-27 8:50 ` Hans-Peter Nilsson
2013-03-27 18:38 ` Joel Sherrill
2013-03-27 19:01 ` Joel Brobecker
2013-03-27 19:43 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201303232257.47568.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.org \
--cc=hans-peter.nilsson@axis.com \
--cc=joel.sherrill@oarcorp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox