summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Toman <mtoman@fedoraproject.org>2015-07-15 10:05:55 +0200
committerFlorian Festi <ffesti@redhat.com>2015-07-15 10:05:55 +0200
commita450ffc4ab7068b400b028d171256df90309ce90 (patch)
tree5e3798a079a784c6be2056df0273b21085176395
parent1cf58b30c88351cd6ff86cb2c15895cb85f54377 (diff)
downloadrpm-a450ffc4ab7068b400b028d171256df90309ce90.tar.gz
Add support for MIPS platform
-rwxr-xr-xinstallplatform24
-rw-r--r--lib/rpmrc.c16
-rw-r--r--macros.in4
-rw-r--r--rpmrc.in20
4 files changed, 61 insertions, 3 deletions
diff --git a/installplatform b/installplatform
index 98b87f37a..119ae4cf2 100755
--- a/installplatform
+++ b/installplatform
@@ -114,6 +114,30 @@ for ARCH in noarch `grep ^arch_canon $RPMRC | cut -d: -f2`; do
CANONARCH=aarch64
CANONCOLOR=3
;;
+ mips)
+ ISANAME=mips
+ ISABITS=32
+ CANONARCH=mips
+ CANONCOLOR=0
+ ;;
+ mipsel)
+ ISANAME=mips
+ ISABITS=32
+ CANONARCH=mipsel
+ CANONCOLOR=0
+ ;;
+ mips64)
+ ISANAME=mips
+ ISABITS=64
+ CANONARCH=mips64
+ CANONCOLOR=3
+ ;;
+ mips64el)
+ ISANAME=mips
+ ISABITS=64
+ CANONARCH=mips64el
+ CANONCOLOR=3
+ ;;
m68k)
ISANAME=m68k
ISABITS=32
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
index a996fe3b9..5ae651cfa 100644
--- a/lib/rpmrc.c
+++ b/lib/rpmrc.c
@@ -1052,10 +1052,22 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
# if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL)
/* little endian */
- strcpy(un.machine, "mipsel");
+# if defined(__LP64__) || defined(_LP64)
+ /* 64-bit */
+ strcpy(un.machine, "mips64el");
+# else
+ /* 32-bit */
+ strcpy(un.machine, "mipsel");
+# endif
# elif defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB)
/* big endian */
- strcpy(un.machine, "mips");
+# if defined(__LP64__) || defined(_LP64)
+ /* 64-bit */
+ strcpy(un.machine, "mips64");
+# else
+ /* 32-bit */
+ strcpy(un.machine, "mips");
+# endif
# endif
# if defined(__hpux) && defined(_SC_CPU_VERSION)
diff --git a/macros.in b/macros.in
index de894201a..e3cf5fa6c 100644
--- a/macros.in
+++ b/macros.in
@@ -1013,6 +1013,10 @@ done \
%arm armv3l armv4b armv4l armv4tl armv5tel armv5tejl armv6l armv6hl armv7l armv7hl armv7hnl
#------------------------------------------------------------------------------
+# arch macro for all supported MIPS processors
+%mips mips mipsel mips64 mips64el
+
+#------------------------------------------------------------------------------
# arch macro for all supported Sparc processors
%sparc sparc sparcv8 sparcv9 sparcv9v sparc64 sparc64v
diff --git a/rpmrc.in b/rpmrc.in
index 20b531a86..25526ebb0 100644
--- a/rpmrc.in
+++ b/rpmrc.in
@@ -59,6 +59,8 @@ optflags: hppa2.0 -O2 -g -mpa-risc-1-0
optflags: mips -O2 -g
optflags: mipsel -O2 -g
+optflags: mips64 -O2 -g
+optflags: mips64el -O2 -g
optflags: armv3l -O2 -g -march=armv3
optflags: armv4b -O2 -g -march=armv4
@@ -114,6 +116,11 @@ archcolor: armv5tejl 1
archcolor: armv6l 1
archcolor: armv7l 1
+archcolor: mips 1
+archcolor: mipsel 1
+archcolor: mips64 2
+archcolor: mips64el 2
+
archcolor: m68k 1
archcolor: m68kmint 1
@@ -167,6 +174,7 @@ arch_canon: sparcv9: sparcv9 3
arch_canon: sparcv9v: sparcv9v 3
# This is really a place holder for MIPS.
arch_canon: mips: mips 4
+arch_canon: mipsel: mipsel 4
arch_canon: ppc: ppc 5
arch_canon: ppc8260: ppc8260 5
@@ -180,7 +188,8 @@ arch_canon: IP: sgi 7
arch_canon: rs6000: rs6000 8
arch_canon: ia64: ia64 9
-arch_canon: mipsel: mipsel 11
+arch_canon: mips64: mips64 11
+arch_canon: mips64el: mips64el 11
arch_canon: armv3l: armv3l 12
arch_canon: armv4b: armv4b 12
@@ -309,6 +318,11 @@ buildarchtranslate: armv7l: armv7l
buildarchtranslate: armv7hl: armv7hl
buildarchtranslate: armv7hnl: armv7hnl
+buildarchtranslate: mips: mips
+buildarchtranslate: mipsel: mipsel
+buildarchtranslate: mips64: mips64
+buildarchtranslate: mips64el: mips64el
+
buildarchtranslate: m68k: m68k
buildarchtranslate: atarist: m68kmint
@@ -387,6 +401,8 @@ arch_compat: sparc: noarch
arch_compat: mips: noarch
arch_compat: mipsel: noarch
+arch_compat: mips64: mips
+arch_compat: mips64el: mipsel
arch_compat: hppa2.0: hppa1.2
arch_compat: hppa1.2: hppa1.1
@@ -508,6 +524,8 @@ buildarch_compat: ppc64p7: ppc64
buildarch_compat: mips: noarch
buildarch_compat: mipsel: noarch
+buildarch_compat: mips64: noarch
+buildarch_compat: mips64el: noarch
buildarch_compat: armv4b: noarch
buildarch_compat: armv7l: armv6l