Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA:] sim/common/aclocal.m4: correct duplicate arg test for --enable-sim-hardware=...
@ 2006-03-26  8:15 Hans-Peter Nilsson
  2006-03-28 22:40 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Hans-Peter Nilsson @ 2006-03-26  8:15 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-03-29  0:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-26  8:15 [RFA:] sim/common/aclocal.m4: correct duplicate arg test for --enable-sim-hardware= Hans-Peter Nilsson
2006-03-28 22:40 ` Daniel Jacobowitz
2006-03-29 15:43   ` Hans-Peter Nilsson
2006-03-29 15:49     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox