* [PATCH] setarch: Fix ppc64le architectures
@ 2014-04-06 23:18 Anton Blanchard
2014-04-07 10:44 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Anton Blanchard @ 2014-04-06 23:18 UTC (permalink / raw)
To: util-linux
setarch currently fails on ppc64le because it tries to
use big endian architecture names. Fix it.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
index 99724c6..957bb2b 100644
--- a/sys-utils/setarch.c
+++ b/sys-utils/setarch.c
@@ -149,11 +149,17 @@ set_arch(const char *pers, unsigned long options, int list)
{PER_LINUX32, "linux32", NULL},
{PER_LINUX, "linux64", NULL},
#if defined(__powerpc__) || defined(__powerpc64__)
+#ifdef __BIG_ENDIAN__
{PER_LINUX32, "ppc32", "ppc"},
{PER_LINUX32, "ppc", "ppc"},
{PER_LINUX, "ppc64", "ppc64"},
{PER_LINUX, "ppc64pseries", "ppc64"},
{PER_LINUX, "ppc64iseries", "ppc64"},
+#else
+ {PER_LINUX32, "ppc32le", "ppcle"},
+ {PER_LINUX32, "ppcle", "ppcle"},
+ {PER_LINUX, "ppc64le", "ppc64le"},
+#endif
#endif
#if defined(__x86_64__) || defined(__i386__) || defined(__ia64__)
{PER_LINUX32, "i386", "i386"},
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-07 10:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-06 23:18 [PATCH] setarch: Fix ppc64le architectures Anton Blanchard
2014-04-07 10:44 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox