Blame SOURCES/0158-setarch-Fix-ppc64le-architectures.patch

ad9577
From e10a3a201b2b4dc6ff9957600c9bf67a2f9de38e Mon Sep 17 00:00:00 2001
ad9577
From: Anton Blanchard <anton@samba.org>
ad9577
Date: Mon, 7 Apr 2014 09:18:13 +1000
ad9577
Subject: [PATCH 158/173] setarch: Fix ppc64le architectures
ad9577
ad9577
setarch currently fails on ppc64le because it tries to
ad9577
use big endian architecture names. Fix it.
ad9577
ad9577
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1562125
ad9577
Upstream: http://github.com/karelzak/util-linux/commit/95bf26fd68ec7f0b2dde1f022dc79d04d1a6e620
ad9577
Upstream: http://github.com/karelzak/util-linux/commit/e60b6df54e27cdb68a75ea8a056a70f60df8f025
ad9577
Signed-off-by: Anton Blanchard <anton@samba.org>
ad9577
Signed-off-by: Karel Zak <kzak@redhat.com>
ad9577
---
ad9577
 sys-utils/setarch.c | 8 ++++++++
ad9577
 1 file changed, 8 insertions(+)
ad9577
ad9577
diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
ad9577
index 051cbefcd..b03406dd3 100644
ad9577
--- a/sys-utils/setarch.c
ad9577
+++ b/sys-utils/setarch.c
ad9577
@@ -149,11 +149,19 @@ set_arch(const char *pers, unsigned long options, int list)
ad9577
     {PER_LINUX32, "linux32", NULL},
ad9577
     {PER_LINUX, "linux64", NULL},
ad9577
 #if defined(__powerpc__) || defined(__powerpc64__)
ad9577
+#ifdef __BIG_ENDIAN__
ad9577
     {PER_LINUX32, "ppc32", "ppc"},
ad9577
     {PER_LINUX32, "ppc", "ppc"},
ad9577
     {PER_LINUX, "ppc64", "ppc64"},
ad9577
     {PER_LINUX, "ppc64pseries", "ppc64"},
ad9577
     {PER_LINUX, "ppc64iseries", "ppc64"},
ad9577
+#else
ad9577
+    {PER_LINUX32, "ppc32",  "ppcle"},
ad9577
+    {PER_LINUX32, "ppc",    "ppcle"},
ad9577
+    {PER_LINUX32, "ppc32le", "ppcle"},
ad9577
+    {PER_LINUX32, "ppcle", "ppcle"},
ad9577
+    {PER_LINUX, "ppc64le", "ppc64le"},
ad9577
+#endif
ad9577
 #endif
ad9577
 #if defined(__x86_64__) || defined(__i386__) || defined(__ia64__)
ad9577
     {PER_LINUX32, "i386", "i386"},
ad9577
-- 
ad9577
2.14.4
ad9577