From 61a5002ceb08577ece0a82b05e87cc715116459e Mon Sep 17 00:00:00 2001 From: Nick Hynes Date: Wed, 10 Apr 2019 23:08:47 +0000 Subject: [PATCH] Support RISC-V cross compilation --- include/dmlc/build_config.h | 3 ++- include/dmlc/endian.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/dmlc/build_config.h b/include/dmlc/build_config.h index 89aba8e319..999d478c36 100644 --- a/include/dmlc/build_config.h +++ b/include/dmlc/build_config.h @@ -21,7 +21,8 @@ #if (defined(__GNUC__) && !defined(__MINGW32__)\ && !defined(__sun) && !defined(__SVR4)\ && !(defined __MINGW64__) && !(defined __ANDROID__))\ - && !defined(__CYGWIN__) && !defined(__EMSCRIPTEN__) + && !defined(__CYGWIN__) && !defined(__EMSCRIPTEN__)\ + && !defined(__RISCV__) #define DMLC_LOG_STACK_TRACE 1 #define DMLC_LOG_STACK_TRACE_SIZE 10 #define DMLC_EXECINFO_H diff --git a/include/dmlc/endian.h b/include/dmlc/endian.h index f21d564b4f..246a5cbc8f 100644 --- a/include/dmlc/endian.h +++ b/include/dmlc/endian.h @@ -14,7 +14,7 @@ #else #if defined(__APPLE__) || defined(_WIN32) #define DMLC_LITTLE_ENDIAN 1 - #elif defined(__GLIBC__) || defined(__ANDROID__) + #elif defined(__GLIBC__) || defined(__ANDROID__) || defined(__RISCV__) #include #define DMLC_LITTLE_ENDIAN (__BYTE_ORDER == __LITTLE_ENDIAN) #elif defined(__FreeBSD__)