From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23217 invoked by alias); 19 Dec 2011 03:34:50 -0000 Received: (qmail 23075 invoked by uid 22791); 19 Dec 2011 03:34:50 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Dec 2011 03:34:35 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 3D49D2BAB78; Sun, 18 Dec 2011 22:34:34 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vG0nEHDwGRDc; Sun, 18 Dec 2011 22:34:34 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id C27F52BAB3D; Sun, 18 Dec 2011 22:34:33 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 10807145615; Sun, 18 Dec 2011 19:34:26 -0800 (PST) Date: Mon, 19 Dec 2011 03:48:00 -0000 From: Joel Brobecker To: Mike Frysinger Cc: gdb-patches@sourceware.org Subject: Re: [RFA/commit] Work around Solaris bourne shell limitation when building the sim Message-ID: <20111219033426.GM21915@adacore.com> References: <1324224294-22559-1-git-send-email-brobecker@adacore.com> <20111218175719.GK21915@adacore.com> <201112181344.59343.vapier@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201112181344.59343.vapier@gentoo.org> User-Agent: Mutt/1.5.20 (2009-06-14) 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 X-SW-Source: 2011-12/txt/msg00616.txt.bz2 > 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