[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/22] tests/tcg: Fix compilation of test_path
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [PULL 04/22] tests/tcg: Fix compilation of test_path |
Date: |
Mon, 5 May 2014 22:01:45 +0400 |
From: Peter Maydell <address@hidden>
The test_path binary is (unlike the other test binaries in tests/tcg)
actually intended to be compiled with the same compiler used to build
the main QEMU executables. It actually #includes a number of the
QEMU source files in an attempt to unit-test the util/path.c functions,
and so if it is not compiled with the same compiler used by configure
to set CONFIG_ settings then it is liable to fail to build.
Fix the makefile to build it with the default C compiler rules, not
CC_I386, and fix the test itself not to include a lot of unnecessary
trace related source files which cause the build to fail if the trace
backend is anything other than 'simple'.
Signed-off-by: Peter Maydell <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
tests/tcg/Makefile | 2 --
tests/tcg/test_path.c | 7 -------
2 files changed, 9 deletions(-)
diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile
index 24e3154..89e3342 100644
--- a/tests/tcg/Makefile
+++ b/tests/tcg/Makefile
@@ -81,10 +81,8 @@ run-test_path: test_path
# rules to compile tests
test_path: test_path.o
- $(CC_I386) $(LDFLAGS) -o $@ $^ $(LIBS)
test_path.o: test_path.c
- $(CC_I386) $(QEMU_INCLUDES) $(GLIB_CFLAGS) $(CFLAGS) -c -o $@ $^
hello-i386: hello-i386.c
$(CC_I386) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $<
diff --git a/tests/tcg/test_path.c b/tests/tcg/test_path.c
index f8dd36a..1c29bce 100644
--- a/tests/tcg/test_path.c
+++ b/tests/tcg/test_path.c
@@ -1,17 +1,10 @@
/* Test path override code */
-#define _GNU_SOURCE
#include "config-host.h"
#include "util/cutils.c"
#include "util/hexdump.c"
#include "util/iov.c"
#include "util/path.c"
#include "util/qemu-timer-common.c"
-#include "trace/control.c"
-#include "../trace/generated-events.c"
-#ifdef CONFIG_TRACE_SIMPLE
-#include "trace/simple.c"
-#endif
-
#include <stdarg.h>
#include <sys/stat.h>
#include <fcntl.h>
--
1.7.10.4
- [Qemu-devel] [PULL 00/22] Trivial patches for 2014-05-05, Michael Tokarev, 2014/05/05
- [Qemu-devel] [PULL 03/22] qga: Fix typo (plural) in comment, Michael Tokarev, 2014/05/05
- [Qemu-devel] [PULL 04/22] tests/tcg: Fix compilation of test_path,
Michael Tokarev <=
- [Qemu-devel] [PULL 01/22] Makefiles: convert some obj-specific CFLAGS to use new foo.o-cflags syntax, Michael Tokarev, 2014/05/05
- [Qemu-devel] [PULL 02/22] configure: remove bashism, Michael Tokarev, 2014/05/05
- [Qemu-devel] [PULL 05/22] arch_init: Be sure of only one exit entry with DPRINTF() for ram_load(), Michael Tokarev, 2014/05/05
- [Qemu-devel] [PULL 22/22] libcacard: remove unnecessary EOL from debug prints, Michael Tokarev, 2014/05/05
- [Qemu-devel] [PULL 11/22] qemu-timer: Add missing 'static' attribute, Michael Tokarev, 2014/05/05
- [Qemu-devel] [PULL 07/22] hw/mips: Add missing 'static' and 'const' attributes, Michael Tokarev, 2014/05/05
- [Qemu-devel] [PULL 06/22] hw/9pfs: Add missing 'static' attributes, Michael Tokarev, 2014/05/05
- [Qemu-devel] [PULL 18/22] qmp: report path ambiguity error, Michael Tokarev, 2014/05/05
- [Qemu-devel] [PULL 21/22] docs/memory.txt: Fix document on MMIO operations, Michael Tokarev, 2014/05/05
- [Qemu-devel] [PULL 14/22] hw/9pfs: Add include file for exported symbol, Michael Tokarev, 2014/05/05