From: Anton Blanchard Date: Sun, 6 Apr 2014 23:18:13 +0000 (+1000) Subject: setarch: Fix ppc64le architectures X-Git-Tag: v2.25-rc1~301 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95bf26fd68ec7f0b2dde1f022dc79d04d1a6e620;p=thirdparty%2Futil-linux.git setarch: Fix ppc64le architectures setarch currently fails on ppc64le because it tries to use big endian architecture names. Fix it. Signed-off-by: Anton Blanchard --- diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c index 99724c6dac..957bb2b030 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"},