[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 13/39] properly detect compiler in tests/Makefile
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 13/39] properly detect compiler in tests/Makefile |
Date: |
Tue, 12 Oct 2010 15:00:31 +0200 |
`make speed' only makes sense if not cross-compiling, so sha1 can
use the CC for the system that is hosting qemu. sha1-i386 is also
wrong, since there is usually no variable for the target CC; guess
some plausible values.
Signed-off-by: Paolo Bonzini <address@hidden>
---
tests/Makefile | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
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
+
sha1-i386: sha1.c
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+ $(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $<
sha1: sha1.c
- $(HOST_CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
speed: sha1 sha1-i386
time ./sha1
--
1.7.2.3
- Re: [Qemu-devel] [PATCH 08/39] provide portable sizeof(long) test, (continued)
- Re: [Qemu-devel] [PATCH 08/39] provide portable sizeof(long) test, Paolo Bonzini, 2010/10/12
- Re: [Qemu-devel] [PATCH 08/39] provide portable sizeof(long) test, malc, 2010/10/12
- Re: [Qemu-devel] [PATCH 08/39] provide portable sizeof(long) test, Paolo Bonzini, 2010/10/12
- Re: [Qemu-devel] [PATCH 08/39] provide portable sizeof(long) test, malc, 2010/10/12
- Re: [Qemu-devel] [PATCH 08/39] provide portable sizeof(long) test, Paolo Bonzini, 2010/10/12
- Re: [Qemu-devel] [PATCH 08/39] provide portable sizeof(long) test, malc, 2010/10/12
- Re: [Qemu-devel] [PATCH 08/39] provide portable sizeof(long) test, Paolo Bonzini, 2010/10/12
[Qemu-devel] [PATCH 12/39] move --srcdir detection earlier, Paolo Bonzini, 2010/10/12
[Qemu-devel] [PATCH 11/39] reorganize sdl-config tests, Paolo Bonzini, 2010/10/12
[Qemu-devel] [PATCH 14/39] remove HOST_CC mention from roms/{sea, vga}bios/config.mak, Paolo Bonzini, 2010/10/12
[Qemu-devel] [PATCH 13/39] properly detect compiler in tests/Makefile,
Paolo Bonzini <=
[Qemu-devel] [PATCH 15/39] let --host-cc slide into oblivion, Paolo Bonzini, 2010/10/12
[Qemu-devel] [PATCH 16/39] introduce CFLAGS= and LDFLAGS= configure command-line options, Paolo Bonzini, 2010/10/12
[Qemu-devel] [PATCH 18/39] add autoconfy alias CC= for --cc, Paolo Bonzini, 2010/10/12
[Qemu-devel] [PATCH 19/39] add CPP variable, Paolo Bonzini, 2010/10/12
[Qemu-devel] [PATCH 20/39] add autoconfy aliases MAKE=/INSTALL= for --make and --install, Paolo Bonzini, 2010/10/12
[Qemu-devel] [PATCH 21/39] add autoconfy aliases --with-* for audio library options, Paolo Bonzini, 2010/10/12
[Qemu-devel] [PATCH 17/39] introduce CPPFLAGS configure variable, Paolo Bonzini, 2010/10/12