OSDN Git Service

tests/tcg/mips: fix hello-mips compilation
authorAlex Bennée <alex.bennee@linaro.org>
Fri, 21 Dec 2018 11:52:05 +0000 (11:52 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Tue, 12 Mar 2019 17:05:21 +0000 (17:05 +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 <alex.bennee@linaro.org>
tests/tcg/mips/Makefile.target
tests/tcg/mips/hello-mips.c

index 086625f..1a994d5 100644 (file)
@@ -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
index c7052fd..4e1cf50 100644 (file)
@@ -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);
 }