diff --git a/newlib/libc/include/machine/ieeefp.h b/newlib/libc/include/machine/ieeefp.h index 4dc13828c..3c1f41e03 100644 --- a/newlib/libc/include/machine/ieeefp.h +++ b/newlib/libc/include/machine/ieeefp.h @@ -199,7 +199,11 @@ #endif #ifdef __riscv +#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +#define __IEEE_BIG_ENDIAN +#else #define __IEEE_LITTLE_ENDIAN +#endif #ifdef __riscv_flen # define _SUPPORTS_ERREXCEPT #endif