teknoraver / rpms / rpm

Forked from rpms/rpm 3 months ago
Clone

Blame SOURCES/rpm-4.11.1-ppc64le.patch

78383f
diff --git a/installplatform b/installplatform
78383f
index 9a11bc3..6908f02 100755
78383f
--- a/installplatform
78383f
+++ b/installplatform
78383f
@@ -54,12 +54,18 @@ for ARCH in noarch `grep ^arch_canon $RPMRC | cut -d: -f2`; do
78383f
 	CANONARCH=s390x
78383f
 	CANONCOLOR=3
78383f
 	;;
78383f
-    ppc64*)
78383f
+    ppc64|ppc64p7)
78383f
 	ISANAME=ppc
78383f
 	ISABITS=64
78383f
 	CANONARCH=ppc64
78383f
 	CANONCOLOR=3
78383f
 	;;
78383f
+    ppc64le)
78383f
+	ISANAME=ppc
78383f
+        ISABITS=64
78383f
+        CANONARCH=ppc64le
78383f
+        CANONCOLOR=3
78383f
+	;;
78383f
     ppc*)
78383f
 	ISANAME=ppc
78383f
 	ISABITS=32
78383f
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
78383f
index 794d028..f209851 100644
78383f
--- a/lib/rpmrc.c
78383f
+++ b/lib/rpmrc.c
78383f
@@ -1125,6 +1125,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
78383f
 #	endif	/* sparc*-linux */
78383f
 
78383f
 #	if defined(__linux__) && defined(__powerpc__)
78383f
+#	if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
78383f
 	{
78383f
             int powerlvl;
78383f
             if (!rstreq(un.machine, "ppc") &&
78383f
@@ -1133,6 +1134,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
78383f
                 strcpy(un.machine, "ppc64p7");
78383f
 	    }
78383f
         }
78383f
+#	endif	/* __ORDER_BIG_ENDIAN__ */
78383f
 #	endif	/* ppc64*-linux */
78383f
 
78383f
 #	if defined(__GNUC__) && defined(__alpha__)
78383f
diff --git a/rpmrc.in b/rpmrc.in
78383f
index 55ff25f..affb736 100644
78383f
--- a/rpmrc.in
78383f
+++ b/rpmrc.in
78383f
@@ -48,6 +48,7 @@ optflags: ppc32dy4 -O2 -g -fsigned-char
78383f
 optflags: ppciseries -O2 -g -fsigned-char
78383f
 optflags: ppcpseries -O2 -g -fsigned-char
78383f
 optflags: ppc64 -O2 -g -fsigned-char
78383f
+optflags: ppc64le -O2 -g -fsigned-char
78383f
 optflags: ppc64p7 -O3 -mtune=power7 -mcpu=power7 -g -fsigned-char
78383f
 
78383f
 optflags: parisc -O2 -g -mpa-risc-1-0
78383f
@@ -96,6 +97,7 @@ archcolor: sparc64 2
78383f
 archcolor: sparcv9 2
78383f
 archcolor: ppc 1
78383f
 archcolor: ppc64 2
78383f
+archcolor: ppc64le 2
78383f
 
78383f
 archcolor: armv3l 1
78383f
 archcolor: armv4b 1
78383f
@@ -194,6 +196,7 @@ arch_canon:	i370: i370	14
78383f
 arch_canon:	s390x: s390x	15
78383f
 
78383f
 arch_canon:	ppc64:	ppc64	16
78383f
+arch_canon:	ppc64le:	ppc64le	16
78383f
 arch_canon:    ppc64pseries: ppc64pseries  16
78383f
 arch_canon:    ppc64iseries: ppc64iseries  16
78383f
 arch_canon:    ppc64p7: ppc64p7  16
78383f
@@ -281,6 +284,7 @@ buildarchtranslate: ppcpseries: ppc
78383f
 buildarchtranslate: ppc64iseries: ppc64
78383f
 buildarchtranslate: ppc64pseries: ppc64
78383f
 buildarchtranslate: ppc64p7: ppc64
78383f
+buildarchtranslate: ppc64le: ppc64le
78383f
 
78383f
 buildarchtranslate: armv3l: armv3l
78383f
 buildarchtranslate: armv4b: armv4b
78383f
@@ -352,6 +356,7 @@ arch_compat: rs6000: noarch fat
78383f
 arch_compat: ppc64pseries: ppc64
78383f
 arch_compat: ppc64iseries: ppc64
78383f
 arch_compat: ppc64p7: ppc64
78383f
+arch_compat: ppc64le: noarch fat
78383f
 
78383f
 arch_compat: sun4c: sparc
78383f
 arch_compat: sun4d: sparc
78383f
@@ -475,6 +480,7 @@ buildarch_compat: ppciseries: noarch
78383f
 buildarch_compat: ppcpseries: noarch
78383f
 buildarch_compat: ppc: noarch fat
78383f
 buildarch_compat: ppc64: noarch fat
78383f
+buildarch_compat: ppc64le: noarch fat
78383f
 buildarch_compat: ppc64pseries: ppc64
78383f
 buildarch_compat: ppc64iseries: ppc64
78383f
 buildarch_compat: ppc64p7: ppc64
78383f
diff --git a/macros.in b/macros.in
78383f
index 2e693e1..5a075a3 100644
78383f
--- a/macros.in
78383f
+++ b/macros.in
78383f
@@ -1002,7 +1002,7 @@ done \
78383f
 
78383f
 #------------------------------------------------------------------------------
78383f
 # arch macro for all supported PowerPC 64 processors
78383f
-%power64	ppc64 ppc64p7
78383f
+%power64	ppc64 ppc64p7 ppc64le
78383f
 
78383f
 #------------------------------------------------------------------------
78383f
 # Use in %install to generate locale specific file lists. For example,