qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 13/39] properly detect compiler in tests/Makefil


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 13/39] properly detect compiler in tests/Makefile
Date: Wed, 13 Oct 2010 09:19:53 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.3

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]