From: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
To: gdb-patches@sourceware.org
Subject: [RFA:] sim/common/aclocal.m4: correct duplicate arg test for --enable-sim-hardware=...
Date: Sun, 26 Mar 2006 08:15:00 -0000 [thread overview]
Message-ID: <200603251622.k2PGMwcQ002238@ignucius.se.axis.com> (raw)
The existing test was bogus: there was no variable f, and
no " $f " could match a "x" anyway (missing spaces). The result
was that you'd always get duplicates and always a build error
for the bogus dv-x.o that was added if you use the
--enable-sim-hardware=... option. I think the below is what was
intended. Comma is an appropriate delimeter to use for
combining the "x" exclusion duplication test as it has been
filtered out from $hardware. For those in doubt, the "or" is
supposedly portable; see other uses in configure, for example the
general --enable-* parse bits at the top.
Tested with patches for cris/configure.ac (adding a dv-rv.c and
"SIM_AC_OPTION_HARDWARE(no,,rv)") and
--enable-sim-hardware
(enables all base hardware and rv)
--enable-sim-hardware=rv
(enables rv)
--enable-sim-hardware=,
(as --enable-sim-hardware)
--enable-sim-hardware=rv,x,rv,rv,x,x
(as --enable-sim-hardware=rv)
and observing expected behavior on the "Setting hardware to"
line at configure time and that the expected dv-*.o file(s) were
compiled.
Ok to commit? With obvious rebuild of configure for all users?
sim/common:
* aclocal.m4 (SIM_AC_OPTION_HARDWARE): Correct duplicate-
option-contents test.
Index: aclocal.m4
===================================================================
RCS file: /cvs/src/src/sim/common/aclocal.m4,v
retrieving revision 1.11
diff -p -u -r1.11 aclocal.m4
--- aclocal.m4 23 Mar 2005 18:55:14 -0000 1.11
+++ aclocal.m4 25 Mar 2006 15:56:54 -0000
@@ -594,9 +594,8 @@ else
sim_hw=""
sim_hw_objs="\$(SIM_COMMON_HW_OBJS)"
for i in x $hardware ; do
- case " $f " in
- x) ;;
- *" $i "*) ;;
+ case " $sim_hw,$i " in
+ *",x "* | *" $i,"*) ;;
*) sim_hw="$sim_hw $i" ; sim_hw_objs="$sim_hw_objs dv-$i.o";;
esac
done
brgds, H-P
next reply other threads:[~2006-03-25 16:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-26 8:15 Hans-Peter Nilsson [this message]
2006-03-28 22:40 ` Daniel Jacobowitz
2006-03-29 15:43 ` Hans-Peter Nilsson
2006-03-29 15:49 ` Daniel Jacobowitz
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=200603251622.k2PGMwcQ002238@ignucius.se.axis.com \
--to=hans-peter.nilsson@axis.com \
--cc=gdb-patches@sourceware.org \
/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