[git commit] microblaze can be either big or little endian

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Thu Oct 6 20:22:25 UTC 2011


commit: http://git.uclibc.org/uClibc/commit/?id=c13e46c982133482f32352c5a845978a5f076116
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

Signed-off-by: Steve Bennett <steveb at workware.net.au>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 extra/Configs/Config.microblaze             |    1 -
 libc/sysdeps/linux/microblaze/bits/endian.h |    9 ++++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/extra/Configs/Config.microblaze b/extra/Configs/Config.microblaze
index a426ab5..dbcf1d5 100644
--- a/extra/Configs/Config.microblaze
+++ b/extra/Configs/Config.microblaze
@@ -10,5 +10,4 @@ config TARGET_ARCH
 config FORCE_OPTIONS_FOR_ARCH
 	bool
 	default y
-	select ARCH_BIG_ENDIAN
 	select ARCH_HAS_NO_MMU
diff --git a/libc/sysdeps/linux/microblaze/bits/endian.h b/libc/sysdeps/linux/microblaze/bits/endian.h
index 8a4f6ef..56fcd5d 100644
--- a/libc/sysdeps/linux/microblaze/bits/endian.h
+++ b/libc/sysdeps/linux/microblaze/bits/endian.h
@@ -17,4 +17,11 @@
 # error "Never use <bits/endian.h> directly; include <endian.h> instead."
 #endif
 
-#define __BYTE_ORDER __BIG_ENDIAN
+/* Note: Toolchain supplies _BIG_ENDIAN or _LITTLE_ENDIAN */
+#if defined(_BIG_ENDIAN)
+# define __BYTE_ORDER __BIG_ENDIAN
+#elif defined(_LITTLE_ENDIAN)
+# define __BYTE_ORDER __LITTLE_ENDIAN
+#else
+# error "Endianness is unknown"
+#endif


More information about the uClibc-cvs mailing list