From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrD7M-00084f-Ge for qemu-devel@nongnu.org; Tue, 17 Jul 2012 15:07:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrD7L-0007EM-Db for qemu-devel@nongnu.org; Tue, 17 Jul 2012 15:07:32 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:47629) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrD7L-0007EA-72 for qemu-devel@nongnu.org; Tue, 17 Jul 2012 15:07:31 -0400 Message-ID: <5005B7F0.6070305@weilnetz.de> Date: Tue, 17 Jul 2012 21:07:28 +0200 From: Stefan Weil MIME-Version: 1.0 References: <1342377272-32511-1-git-send-email-sw@weilnetz.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] configure: Replace bash code by standard shell code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Blue Swirl , qemu-devel@nongnu.org Am 17.07.2012 20:43, schrieb Peter Maydell: > On 15 July 2012 19:34, Stefan Weil wrote: >> "+=" does not work with dash and other simple /bin/sh implementations. >> >> The new code prepends the flag while the old code either did not work >> (it continued after an error message which typically was not read) or >> appended the flag. That difference should not matter here. >> >> Signed-off-by: Stefan Weil >> --- >> configure | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/configure b/configure >> index 12351f5..0269ba0 100755 >> --- a/configure >> +++ b/configure >> @@ -2822,7 +2822,7 @@ int main(int argc, char **argv) >> } >> EOF >> if ! compile_prog "" "" ; then >> - CFLAGS+="-march=i486" >> + CFLAGS="-march=i486 $CFLAGS" >> fi >> fi > > This is not quite the right fix for this. This flag should be in > QEMU_CFLAGS, because it is a flag without which QEMU > would be unable to compile. See previous discussion in this > thread: > > http://lists.xen.org/archives/html/xen-devel/2012-04/msg00330.html > > (Unfortunately Olaf never submitted an updated patch.) > > -- PMM > If the user overrides CFLAGS, I expect that he/she will notice that compilation fails and hopefully find the cause (only expert users should override CFLAGS). Overriding -march=i486 might be useful to set -march=i686. Therefore it was not so obvious to me whether CFLAGS or QEMU_CFLAGS was the better choice. I don't mind if we decide to use QEMU_CFLAGS here, but suggest putting that change in a separate patch. This one fixes a shell syntax error without changing the macro name. Regards, Stefan W.