[PATCH 2/2] rpmrc: Not all linux powerpc builds are big endian.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Without this change rpm incorrectly detects ppc64le systems as ppc64
(or ppc64p7).  Compile time check the Endianness of the build system
to elide these checks on little endian.

Signed-off-by: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>
---
 lib/rpmrc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/rpmrc.c b/lib/rpmrc.c
index 794d028..f209851 100644
--- a/lib/rpmrc.c
+++ b/lib/rpmrc.c
@@ -1125,6 +1125,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
 #	endif	/* sparc*-linux */
 
 #	if defined(__linux__) && defined(__powerpc__)
+#	if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
 	{
             int powerlvl;
             if (!rstreq(un.machine, "ppc") &&
@@ -1133,6 +1134,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
                 strcpy(un.machine, "ppc64p7");
 	    }
         }
+#	endif	/* __ORDER_BIG_ENDIAN__ */
 #	endif	/* ppc64*-linux */
 
 #	if defined(__GNUC__) && defined(__alpha__)
-- 
1.8.1.4

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list




[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux