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.ben...@linaro.org> --- tests/tcg/multiarch/Makefile.target | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 + -- 2.17.0