diff --git a/compiler/build.gradle b/compiler/build.gradle index 6d832ecd56b..b7ad249b974 100644 --- a/compiler/build.gradle +++ b/compiler/build.gradle @@ -58,6 +58,10 @@ model { cppCompiler.executable = 'aarch64-linux-gnu-g++' linker.executable = 'aarch64-linux-gnu-g++' } + target("riscv64") { + cppCompiler.executable = 'riscv64-openEuler-linux-g++' + linker.executable = 'riscv64-openEuler-linux-g++' + } target("s390_64") { cppCompiler.executable = 's390x-linux-gnu-g++' linker.executable = 's390x-linux-gnu-g++' @@ -74,6 +78,7 @@ model { x86_64 { architecture "x86_64" } ppcle_64 { architecture "ppcle_64" } aarch_64 { architecture "aarch_64" } + riscv64 { architecture "riscv64" } s390_64 { architecture "s390_64" } loongarch_64 { architecture "loongarch_64" } } @@ -85,6 +90,7 @@ model { 'x86_64', 'ppcle_64', 'aarch_64', + 'riscv64', 's390_64', 'loongarch_64' ]) { diff --git a/compiler/check-artifact.sh b/compiler/check-artifact.sh index 12d7709a2a8..8fd93376832 100755 --- a/compiler/check-artifact.sh +++ b/compiler/check-artifact.sh @@ -61,6 +61,8 @@ checkArch () assertEq "$format" "elf64-x86-64" $LINENO elif [[ "$ARCH" == aarch_64 ]]; then assertEq "$format" "elf64-little" $LINENO + elif [[ "$ARCH" == riscv64 ]]; then + assertEq "$format" "elf64-littleriscv" $LINENO elif [[ "$ARCH" == loongarch_64 ]]; then echo $format assertEq "$format" "elf64-loongarch" $LINENO @@ -121,6 +123,9 @@ checkDependencies () white_list="${white_list}\|libm\.so\.6" elif [[ "$ARCH" == aarch_64 ]]; then white_list="${white_list}\|ld-linux-aarch64\.so\.1" + elif [[ "$ARCH" == riscv64 ]]; then + dump_cmd='riscv64-linux-gnu-objdump -x '"$1"' |grep "NEEDED"' + white_list="libatomic\.so\.1\|libm\.so\.6\|libc\.so\.6\|ld-linux-riscv64-lp64d\.so\.1" fi elif [[ "$OS" == osx ]]; then dump_cmd='otool -L '"$1"' | fgrep dylib'