tests: cross-compiling hello binaries for hello_se tests.
authorMahyar Samani <msamani@ucdavis.edu>
Sat, 2 May 2020 02:19:19 +0000 (02:19 +0000)
committerBobby R. Bruce <bbruce@ucdavis.edu>
Thu, 10 Sep 2020 16:55:00 +0000 (16:55 +0000)
Some of the hello_se tests fail due to different syntax of the string
for different isas. This patch adds makefiles for cross-compiling the
hello.c file located at tests/test-progs/hello/src/.

Change-Id: I8ccfc0487020df9da722a97e57310db2d2e8882c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28528
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
tests/test-progs/hello/bin/mips/linux/hello [deleted file]
tests/test-progs/hello/bin/power/linux/hello [deleted file]
tests/test-progs/hello/bin/sparc/linux/hello [deleted file]
tests/test-progs/hello/src/Makefile.mips [new file with mode: 0644]

diff --git a/tests/test-progs/hello/bin/mips/linux/hello b/tests/test-progs/hello/bin/mips/linux/hello
deleted file mode 100755 (executable)
index a3db001..0000000
Binary files a/tests/test-progs/hello/bin/mips/linux/hello and /dev/null differ
diff --git a/tests/test-progs/hello/bin/power/linux/hello b/tests/test-progs/hello/bin/power/linux/hello
deleted file mode 100755 (executable)
index 6619ae3..0000000
Binary files a/tests/test-progs/hello/bin/power/linux/hello and /dev/null differ
diff --git a/tests/test-progs/hello/bin/sparc/linux/hello b/tests/test-progs/hello/bin/sparc/linux/hello
deleted file mode 100755 (executable)
index e254ae3..0000000
Binary files a/tests/test-progs/hello/bin/sparc/linux/hello and /dev/null differ
diff --git a/tests/test-progs/hello/src/Makefile.mips b/tests/test-progs/hello/src/Makefile.mips
new file mode 100644 (file)
index 0000000..675c8d1
--- /dev/null
@@ -0,0 +1,11 @@
+all: hello
+
+hello: hello.c dockcross-mips
+       ./dockcross-mips bash -c '$$CC hello.c -o hello -static'
+
+dockcross-mips:
+       docker run --rm dockcross/linux-mips > ./dockcross-mips
+       chmod +x ./dockcross-mips
+
+clean:
+       rm -f dockcross* hello