From 3081d856c6e0c58b7a66e77214e2456b544eac77 Mon Sep 17 00:00:00 2001 From: Gleb Fotengauer-Malinovskiy Date: Sat, 1 Dec 2018 16:10:26 +0300 Subject: [PATCH] Add ppc64le support --- installplatform | 4 ++++ lib/rpmrc.c | 2 ++ rpmrc.in | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/installplatform b/installplatform index d546726..4696f91 100755 --- a/installplatform +++ b/installplatform @@ -72,6 +72,9 @@ case "$arch" in sparc*) SUBSTS='s,sparc\(64\|v9\),sparc, s,sparc64,sparcv9,;s,sparc\([^v]\|$\),sparcv9\1, s,sparcv9,sparc64,;s,sparc\([^6]\|$\),sparc64\1,' ;; + ppc64le) + SUBSTS='s,ppc64le,ppc64le, s,ppc64le,noarch,' + ;; powerpc*|ppc*) SUBSTS='s,ppc64,ppc, s,ppc\([^6]\|$\),ppc64\1,' ;; @@ -107,6 +110,7 @@ for SUBST in $SUBSTS ; do mipsn32el-linux*) LIBSUFF=32 ;; mips64-linux*) LIBSUFF=64 ;; mips64el-linux*) LIBSUFF=64 ;; + ppc64le-linux*) LIBSUFF=64 ;; riscv64-linux) LIBSUFF=64 ;; s390x-linux) LIBSUFF=64 ;; sparc64-linux) LIBSUFF=64 ;; diff --git a/lib/rpmrc.c b/lib/rpmrc.c index 2cd2cb8..5fc2d7c 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c @@ -1345,6 +1345,7 @@ static void defaultMachine(/*@out@*/ const char ** arch, # endif # if defined(__linux__) && defined(__powerpc__) +# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ { unsigned pvr = 0; __sighandler_t oldh = signal(SIGILL, mfspr_ill); @@ -1376,6 +1377,7 @@ static void defaultMachine(/*@out@*/ const char ** arch, } } } +# endif # endif /* the uname() result goes through the arch_canon table */ diff --git a/rpmrc.in b/rpmrc.in index f09ba45..94f312a 100644 --- a/rpmrc.in +++ b/rpmrc.in @@ -62,6 +62,7 @@ optflags: ppc %optflags_default -fsigned-char optflags: ppciseries %optflags_default -fsigned-char optflags: ppcpseries %optflags_default -fsigned-char optflags: ppc64 %optflags_default -fsigned-char +optflags: ppc64le %optflags_default optflags: parisc %optflags_default -mpa-risc-1-0 optflags: hppa1.0 %optflags_default -mpa-risc-1-0 @@ -174,6 +175,7 @@ arch_canon: i370: i370 14 arch_canon: s390x: s390x 15 arch_canon: ppc64: ppc64 16 +arch_canon: ppc64le: ppc64le 16 arch_canon: sh: sh 17 arch_canon: xtensa: xtensa 18 @@ -325,6 +327,7 @@ arch_compat: ppcpseries: ppc arch_compat: ppc64: ppc arch_compat: ppc: rs6000 arch_compat: rs6000: noarch +arch_compat: ppc64le: noarch arch_compat: sun4c: sparc arch_compat: sun4d: sparc @@ -461,6 +464,7 @@ buildarch_compat: ppciseries: noarch buildarch_compat: ppcpseries: noarch buildarch_compat: ppc: noarch buildarch_compat: ppc64: noarch +buildarch_compat: ppc64le: noarch buildarch_compat: mips: noarch buildarch_compat: mipsel: noarch