Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/commit] Work around Solaris bourne shell limitation when building the sim
Date: Mon, 19 Dec 2011 03:48:00 -0000	[thread overview]
Message-ID: <20111219033426.GM21915@adacore.com> (raw)
In-Reply-To: <201112181344.59343.vapier@gentoo.org>

> that seems weird ... i just tried it locally and it seems to work for me ...

Weird indeed. I thought it was related to the Solaris shell
misunderstanding the variable assignment as a command, or something
like that.  Your diff looks almost identical to mine, and yet mine
doesn't work, and I can't figure out why.

No matter, if you prefer this solution, here is a new complete diff.

sim/common/ChangeLog:

        * Make-common.in (hw-config.h): Work around bug in Solaris 2.8
        system bourne shell.

Tested on sparc-solaris with both /bin/sh and /bin/bash.

Thanks,
-- 
Joel

diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index c12d155..606e595 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -462,11 +462,13 @@ sim-inline.c: $(srccom)/sim-inline.c
 hw-config.h: Makefile.in $(srccom)/Make-common.in config.status Makefile
 	rm -f tmp-hw.h
 	echo "/* generated by Makefile */" > tmp-hw.h
-	for hw in $(SIM_HW) ; do \
+	sim_hw="$(SIM_HW)"; \
+	for hw in $$sim_hw ; do \
 	  echo "extern const struct hw_descriptor dv_$${hw}_descriptor[];" ; \
 	done >> tmp-hw.h
 	echo "const struct hw_descriptor *hw_descriptors[] = {" >> tmp-hw.h
-	for hw in $(SIM_HW) ; do \
+	sim_hw="$(SIM_HW)"; \
+	for hw in $$sim_hw ; do \
 	  echo "  dv_$${hw}_descriptor," ; \
 	done >> tmp-hw.h
 	echo "  NULL," >> tmp-hw.h


  reply	other threads:[~2011-12-19  3:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-18 16:35 Joel Brobecker
2011-12-18 16:53 ` Andreas Schwab
2011-12-18 18:02   ` Joel Brobecker
2011-12-18 19:09     ` Mike Frysinger
2011-12-19  3:48       ` Joel Brobecker [this message]
2011-12-19  4:43         ` Mike Frysinger
2011-12-19  6:04           ` Joel Brobecker
2011-12-18 19:13     ` Andreas Schwab

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=20111219033426.GM21915@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=vapier@gentoo.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