]> granicus.if.org Git - musl/commitdiff
fix endian subarchs for sh arch
authorRich Felker <dalias@aerifal.cx>
Fri, 28 Feb 2014 03:20:44 +0000 (22:20 -0500)
committerRich Felker <dalias@aerifal.cx>
Fri, 28 Feb 2014 03:20:44 +0000 (22:20 -0500)
default endianness for sh on linux is little, and while conventions
vary, "eb" seems to be the most widely used suffix for big endian.

arch/sh/bits/endian.h
arch/sh/reloc.h
configure

index 4744b97d35333897bf40c4e5fc0ac93f20d8c87f..2016cb2074191be20ad57193416a9d5118d53fb6 100644 (file)
@@ -1,5 +1,5 @@
-#if __LITTLE_ENDIAN__
-#define __BYTE_ORDER __LITTLE_ENDIAN
-#else
+#if __BIG_ENDIAN__
 #define __BYTE_ORDER __BIG_ENDIAN
+#else
+#define __BYTE_ORDER __LITTLE_ENDIAN
 #endif
index 97bee6ae4b3b18f33c170fa1ddc9df5d865a26c4..db3de081ffd460fbee5974d2179ad25cf6daa067 100644 (file)
@@ -1,5 +1,5 @@
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define ENDIAN_SUFFIX "l"
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define ENDIAN_SUFFIX "eb"
 #else
 #define ENDIAN_SUFFIX ""
 #endif
index 38b36d8266ad2e3e17bf21d29819c4a1bc15702d..1a092f523b1b31138622b2d1c42761fa6575a871 100755 (executable)
--- a/configure
+++ b/configure
@@ -421,8 +421,8 @@ fi
 test "$ARCH" = "microblaze" && trycppif __MICROBLAZEEL__ "$t" \
 && SUBARCH=${SUBARCH}el
 
-test "$ARCH" = "sh" && trycppif __LITTLE_ENDIAN__ "$t" \
-&& SUBARCH=${SUBARCH}el
+test "$ARCH" = "sh" && trycppif __BIG_ENDIAN__ "$t" \
+&& SUBARCH=${SUBARCH}eb
 
 test "$SUBARCH" \
 && printf "configured for %s variant: %s\n" "$ARCH" "$ARCH$SUBARCH"