about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--arch/sh/bits/endian.h6
-rw-r--r--arch/sh/reloc.h4
-rwxr-xr-xconfigure4
3 files changed, 7 insertions, 7 deletions
diff --git a/arch/sh/bits/endian.h b/arch/sh/bits/endian.h
index 4744b97d..2016cb20 100644
--- a/arch/sh/bits/endian.h
+++ b/arch/sh/bits/endian.h
@@ -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
diff --git a/arch/sh/reloc.h b/arch/sh/reloc.h
index 97bee6ae..db3de081 100644
--- a/arch/sh/reloc.h
+++ b/arch/sh/reloc.h
@@ -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
diff --git a/configure b/configure
index 38b36d82..1a092f52 100755
--- 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"