[PATCH 1/2] Set __IEEE_BIG_ENDIAN for big endian RISC-V

"Marcus Comstedt" <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
---
 newlib/libc/include/machine/ieeefp.h | 4 ++++
 1 file changed, 4 insertions(+)

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
-- 
2.26.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.