aboutsummaryrefslogtreecommitdiff
path: root/libgcc/config/riscv
diff options
context:
space:
mode:
Diffstat (limited to 'libgcc/config/riscv')
-rw-r--r--libgcc/config/riscv/sfp-machine.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgcc/config/riscv/sfp-machine.h b/libgcc/config/riscv/sfp-machine.h
index db26971..8adbf4b 100644
--- a/libgcc/config/riscv/sfp-machine.h
+++ b/libgcc/config/riscv/sfp-machine.h
@@ -128,7 +128,11 @@ do { \
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
+#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+#define __BYTE_ORDER __BIG_ENDIAN
+#else
#define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
/* Define ALIASNAME as a strong alias for NAME. */