Build arch detection for RISC-V (#13560)

Make sure that `asm.arch` and `anal.arch` is set correctly when starting
radare on RISC-V.
This commit is contained in:
Wladimir J. van der Laan 2019-03-30 15:41:15 +01:00 committed by radare
parent 726e15054c
commit 8aa8782aa2

View File

@ -491,6 +491,14 @@ static inline void *r_new_copy(int size, void *data) {
/* we should default to wasm when ready */
#define R_SYS_ARCH "x86"
#define R_SYS_BITS R_SYS_BITS_32
#elif __riscv__ || __riscv
# define R_SYS_ARCH "riscv"
# define R_SYS_ENDIAN 0
# if __riscv_xlen == 32
# define R_SYS_BITS R_SYS_BITS_32
# else
# define R_SYS_BITS (R_SYS_BITS_32 | R_SYS_BITS_64)
# endif
#else
#ifdef _MSC_VER
#ifdef _WIN64