[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH v2 05/16] tests/tcg/mips: fix hello-mips compilation
From: |
Alex Bennée |
Subject: |
[Qemu-arm] [PATCH v2 05/16] tests/tcg/mips: fix hello-mips compilation |
Date: |
Thu, 28 Feb 2019 20:25:26 +0000 |
The compilation flags for proper building are in the source tree. We
also fix exit to 0 so the result is counted as a success.
Signed-off-by: Alex Bennée <address@hidden>
---
tests/tcg/mips/Makefile.target | 11 ++++-------
tests/tcg/mips/hello-mips.c | 2 +-
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/tests/tcg/mips/Makefile.target b/tests/tcg/mips/Makefile.target
index 086625f533..1a994d5525 100644
--- a/tests/tcg/mips/Makefile.target
+++ b/tests/tcg/mips/Makefile.target
@@ -8,15 +8,12 @@ MIPS_SRC=$(SRC_PATH)/tests/tcg/mips
# Set search path for all sources
VPATH += $(MIPS_SRC)
+# hello-mips is 32 bit only
+ifeq ($(findstring 64,$(TARGET_NAME)),)
MIPS_TESTS=hello-mips
TESTS += $(MIPS_TESTS)
-hello-mips: CFLAGS+=-ffreestanding
+hello-mips: CFLAGS+=-mno-abicalls -fno-PIC -mabi=32
hello-mips: LDFLAGS+=-nostdlib
-
-# For MIPS32 and 64 we have a bunch of extra tests in sub-directories
-# however they are intended for system tests.
-
-run-hello-mips: hello-mips
- $(call skip-test, $<, "BROKEN")
+endif
diff --git a/tests/tcg/mips/hello-mips.c b/tests/tcg/mips/hello-mips.c
index c7052fdf2e..4e1cf501af 100644
--- a/tests/tcg/mips/hello-mips.c
+++ b/tests/tcg/mips/hello-mips.c
@@ -60,5 +60,5 @@ static inline int write(int fd, const char *buf, int len)
void __start(void)
{
write (1, "Hello, World!\n", 14);
- exit1 (42);
+ exit1(0);
}
--
2.20.1
- [Qemu-arm] [PATCH v2 00/16] Enabling tcg/tests for cris and system mode xtensa & arm, Alex Bennée, 2019/02/28
- [Qemu-arm] [PATCH v2 01/16] tests/tcg: add softmmu awareness to Makefile, Alex Bennée, 2019/02/28
- [Qemu-arm] [PATCH v2 02/16] tests/tcg: enable tcg tests for softmmu, Alex Bennée, 2019/02/28
- [Qemu-arm] [PATCH v2 03/16] tests/tcg: add QEMU_OPT option for test runner, Alex Bennée, 2019/02/28
- [Qemu-arm] [PATCH v2 04/16] tests/tcg: add gdb runner variant, Alex Bennée, 2019/02/28
- [Qemu-arm] [PATCH v2 05/16] tests/tcg/mips: fix hello-mips compilation,
Alex Bennée <=
- [Qemu-arm] [PATCH v2 07/16] tests/tcg/xtensa: enable system tests, Alex Bennée, 2019/02/28
- Re: [Qemu-arm] [PATCH v2 07/16] tests/tcg/xtensa: enable system tests, Max Filippov, 2019/02/28
- [Qemu-arm] [PATCH v2 08/16] tests/tcg/arm: add ARMv6-M UNDEFINED 32-bit instruction test, Alex Bennée, 2019/02/28
- [Qemu-arm] [PATCH v2 06/16] tests/docker: add debian-xtensa-cross image, Alex Bennée, 2019/02/28
- [Qemu-arm] [PATCH v2 09/16] tests/docker: add fedora-cris-cross compilers, Alex Bennée, 2019/02/28