From fdaa1be8635944d88ff128da13bf0464f7ce2eb6 Mon Sep 17 00:00:00 2001 From: Harry Chen Date: Tue, 9 Apr 2019 12:21:46 +0800 Subject: [PATCH] Fix syscall and add mipsel to travis CI Signed-off-by: Harry Chen --- .travis.yml | 16 +++++++++++++--- rust/src/syscall.rs | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index dad0dc3..8e59c0f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ env: - ARCH="aarch64" SRC="all" - ARCH="riscv32" SRC="all" - ARCH="riscv64" SRC="all" + - ARCH="mipsel" SRC="all" matrix: allow_failures: @@ -42,7 +43,7 @@ install: if [ $TRAVIS_OS_NAME = linux ]; then export FILE="gcc-arm-8.2-2018.11-x86_64-aarch64-elf"; wget https://developer.arm.com/-/media/Files/downloads/gnu-a/8.2-2018.11/$FILE.tar.xz; - tar -xvf $FILE.tar.xz; + tar -xf $FILE.tar.xz; export PATH=$PATH:$PWD/$FILE/bin; sudo apt update; sudo apt install linux-headers-$(uname -r); @@ -73,7 +74,7 @@ install: sudo apt update; sudo apt install linux-headers-$(uname -r); wget https://musl.cc/riscv32-linux-musl-cross.tgz; - tar -xvf riscv32-linux-musl-cross.tgz; + tar -xf riscv32-linux-musl-cross.tgz; export PATH=$PATH:$PWD/riscv32-linux-musl-cross/bin; fi; fi @@ -82,10 +83,19 @@ install: sudo apt update; sudo apt install linux-headers-$(uname -r); wget https://musl.cc/riscv64-linux-musl-cross.tgz; - tar -xvf riscv64-linux-musl-cross.tgz; + tar -xf riscv64-linux-musl-cross.tgz; export PATH=$PATH:$PWD/riscv64-linux-musl-cross/bin; fi; fi + - if [ $ARCH = mipsel ]; then + if [ $TRAVIS_OS_NAME = linux ]; then + sudo apt update; + sudo apt install linux-headers-$(uname -r); + wget https://musl.cc/mipsel-linux-musln32-cross.tgz; + tar -xvf mipsel-linux-musln32-cross.tgz; + export PATH=$PATH:$PWD/mipsel-linux-musln32-cross/bin; + fi; + fi before_script: diff --git a/rust/src/syscall.rs b/rust/src/syscall.rs index 80a82f1..18dc2bd 100644 --- a/rust/src/syscall.rs +++ b/rust/src/syscall.rs @@ -364,7 +364,7 @@ enum SyscallId { GetPaddr = 998, } -#[cfg(any(all(target_arch = "x86_64", target_arch = "mips")))] +#[cfg(not(any(target_arch = "x86_64", target_arch = "mips")))] #[allow(dead_code)] enum SyscallId { Read = 63,