From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=45436 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5vd0-0001HU-Ni for qemu-devel@nongnu.org; Wed, 13 Oct 2010 03:19:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P5vcz-0007v7-Py for qemu-devel@nongnu.org; Wed, 13 Oct 2010 03:19:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45111) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P5vcz-0007v0-JR for qemu-devel@nongnu.org; Wed, 13 Oct 2010 03:19:57 -0400 Message-ID: <4CB55D99.7070304@redhat.com> Date: Wed, 13 Oct 2010 09:19:53 +0200 From: Paolo Bonzini MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 13/39] properly detect compiler in tests/Makefile References: <1286888457-5033-1-git-send-email-pbonzini@redhat.com> <1286888457-5033-14-git-send-email-pbonzini@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org On 10/12/2010 09:04 PM, Blue Swirl wrote: >> diff --git a/tests/Makefile b/tests/Makefile >> index ff7f787..a789e2d 100644 >> --- a/tests/Makefile >> +++ b/tests/Makefile >> @@ -64,11 +64,21 @@ linux-test: linux-test.c >> $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lm >> >> # speed test >> +ifeq ($(shell uname -m), x86_64) >> +CC_I386 = $(CC) -m32 >> +else >> +ifeq ($(shell uname -m), i386) >> +CC_I386 = $(CC) >> +else >> +CC_I386 = i386-pc-linux-gnu-$(CC) >> +endif >> +endif > > I'd move this logic to configure. I can do that, but it seemed overengineered for a variable that's only needed only in one makefile rule, and furthermore a rule that will be invoked manually by the user. In fact I was tempted to hardcode "CC_I386=$(CC) -m32" which would work on x86_64 and i386 (and leave the task of overriding it to the user). Paolo