diff mbox series

[v2,41/43] tests/tcg/multiarch: add fp-test into multiarch set

Message ID 20180419135901.30035-42-alex.bennee@linaro.org
State New
Headers show
Series fix building of tests/tcg | expand

Commit Message

Alex Bennée April 19, 2018, 1:58 p.m. UTC
The compile for fp-test is a little funky as we need to include a
build of QEMU's softfloat as well. There is still a problem caused by
the inclusion of config-host.h by osdep.h as it will trigger problems
like:

  In file included from /home/alex/lsrc/qemu/qemu.git/include/qemu/bitops.h:16:0,
                   from /home/alex/lsrc/qemu/qemu.git/fpu/softfloat.c:87:
  /home/alex/lsrc/qemu/qemu.git/include/qemu/host-utils.h: In function ‘mulu64’:
  /home/alex/lsrc/qemu/qemu.git/include/qemu/host-utils.h:35:5: error: unknown type name ‘__uint128_t’
       __uint128_t r = (__uint128_t)a * b;
     ^

When trying to cross build i386 on an x86_64 host.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 tests/tcg/multiarch/Makefile.target | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

-- 
2.17.0
diff mbox series

Patch

diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Makefile.target
index a691fd59d3..52adc18625 100644
--- a/tests/tcg/multiarch/Makefile.target
+++ b/tests/tcg/multiarch/Makefile.target
@@ -28,3 +28,21 @@  run-test-mmap: test-mmap
 	-$(QEMU) -p 16384 ./test-mmap 16384
 	-$(QEMU) -p 32768 ./test-mmap 32768
 
+#
+# Include the fp-test from the main test suite
+#
+
+VPATH+=$(SRC_PATH)/tests/fp
+VPATH+=$(SRC_PATH)/fpu
+TESTS+=fp-test
+
+FP_CFLAGS := $(CFLAGS) -Wall -O0 -g -fno-strict-aliasing
+FP_CFLAGS += $(QEMU_INCLUDES)
+FP_CFLAGS += -D_GNU_SOURCE -DHW_POISON_H
+
+fp-test.o softfloat.o: %.o: %.c
+	$(CC) $(FP_CFLAGS) -c $< -o $@
+
+fp-test: fp-test.o softfloat.o
+	$(CC) $^ -o $@ -lm -static
+