add support for riscv64 arch

--- a/configure
+++ b/configure
@@ -13066,6 +13066,16 @@
         WIN_HOST_BITS=64
         with_ucrt_dir=no
         ;;
+    riscv64)
+        CPUNAME=RISCV64
+        RTL_ARCH=RISCV64
+        PLATFORMID=windows_riscv64
+        WINDOWS_X64=1
+        SCPDEFS="$SCPDEFS -DWINDOWS_RISCV64"
+        WIN_HOST_ARCH="riscv64"
+        WIN_HOST_BITS=64
+        with_ucrt_dir=no
+        ;;
     *)
         as_fn_error $? "Unsupported host_cpu $host_cpu for host_os $host_os" "$LINENO" 5
         ;;
@@ -14648,6 +14658,12 @@
         RTL_ARCH=PowerPC_64_LE
         PLATFORMID=linux_powerpc64_le
         ;;
+    riscv64)
+        CPUNAME=riscv64
+        PLATFORMID=linux_riscv64
+        RTL_ARCH=RISCV64
+        EPM_FLAGS="-a riscv64"
+        ;;
     sparc)
         CPUNAME=SPARC
         RTL_ARCH=SPARC
--- a/configure.ac
+++ b/configure.ac
@@ -5112,6 +5112,12 @@
         RTL_ARCH=PowerPC_64_LE
         PLATFORMID=linux_powerpc64_le
         ;;
+    riscv64)
+        CPUNAME=RISCV64
+        PLATFORMID=linux_riscv64
+        RTL_ARCH=RISCV64
+        EPM_FLAGS="-a riscv64"
+        ;;
     sparc)
         CPUNAME=SPARC
         RTL_ARCH=SPARC
@@ -8413,7 +8419,7 @@
         JAVAINTERPRETER=`win_short_path_for_make "$JAVAINTERPRETER"`
     elif test "$cross_compiling" != "yes"; then
         case $CPUNAME in
-            AARCH64|AXP|X86_64|IA64|POWERPC64|S390X|SPARC64|GODSON64)
+            AARCH64|AXP|X86_64|IA64|POWERPC64|S390X|SPARC64|GODSON64|RISCV64)
                 if test -f "$JAVAINTERPRETER" -a "`$JAVAINTERPRETER -version 2>&1 | $GREP -i 64-bit`" = "" >/dev/null; then
                     AC_MSG_WARN([You are building 64-bit binaries but the JDK $JAVAINTERPRETER is 32-bit])
                     AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK])
@@ -12845,7 +12851,7 @@
 # platforms there.
 supports_multilib=
 case "$host_cpu" in
-x86_64 | powerpc64 | powerpc64le | s390x | aarch64 | mips64 | mips64el)
+x86_64 | powerpc64 | powerpc64le | s390x | aarch64 | mips64 | mips64el | riscv64)
     if test "$SAL_TYPES_SIZEOFLONG" = "8"; then
         supports_multilib="yes"
     fi
