summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib-rpmrc.in12
-rw-r--r--lib/rpmrc.c8
-rw-r--r--rpm.magic3
3 files changed, 19 insertions, 4 deletions
diff --git a/lib-rpmrc.in b/lib-rpmrc.in
index de0d33b8f..618d0dfa5 100644
--- a/lib-rpmrc.in
+++ b/lib-rpmrc.in
@@ -41,7 +41,7 @@ arch_canon: sun4m: sparc 3
arch_canon: sun4c: sparc 3
arch_canon: sun4d: sparc 3
# This is really a place holder for MIPS.
-arch_canon: mips: mips 4
+arch_canon: mipseb: mipseb 4
arch_canon: ppc: ppc 5
arch_canon: m68k: m68k 6
arch_canon: IP: sgi 7
@@ -50,6 +50,7 @@ arch_canon: rs6000: rs6000 8
arch_canon: 9000/712: hppa1.1 9
arch_canon: sun4u: usparc 10
+arch_canon: mipsel: mipsel 11
#############################################################
# Canonical OS names and numbers
@@ -118,10 +119,13 @@ arch_compat: usparc: sparc
arch_compat: sparc: noarch
arch_compat: ppc: noarch
-arch_compat: mips: noarch
+arch_compat: mipseb: noarch
+arch_compat: mipsel: noarch
arch_compat: hppa1.1: hppa1.0
arch_compat: hppa1.0: noarch
+# we used to call mipseb just mips -- let those packages still work
+arch_compat: mipseb: mips
os_compat: IRIX64: IRIX
@@ -137,4 +141,6 @@ buildarch_compat: sparc: noarch
buildarch_compat: alpha: noarch
buildarch_compat: m68k: noarch
buildarch_compat: ppc: noarch
-buildarch_compat: mips: noarch
+buildarch_compat: mipsel: noarch
+buildarch_compat: mipseb: noarch
+
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
index e33dfe266..a361ce79e 100644
--- a/lib/rpmrc.c
+++ b/lib/rpmrc.c
@@ -682,6 +682,14 @@ static void defaultMachine(char ** arch, char ** os) {
while (*chptr++)
if (*chptr == '/') *chptr = '-';
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL)
+ /* little endian */
+ strcpy(un.machine, "mipsel");
+ #elif defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB)
+ /* big endian */
+ strcpy(un.machine, "mipseb");
+ #endif
+
#if defined(__hpux) && defined(_SC_CPU_VERSION)
{
int cpu_version = sysconf(_SC_CPU_VERSION);
diff --git a/rpm.magic b/rpm.magic
index 0f74fbf7f..c3c90ba6b 100644
--- a/rpm.magic
+++ b/rpm.magic
@@ -10,8 +10,9 @@
>>8 beshort 1 i386
>>8 beshort 2 Alpha
>>8 beshort 3 Sparc
->>8 beshort 4 MIPS
+>>8 beshort 4 MIPS big endian
>>8 beshort 5 PowerPC
>>8 beshort 6 68000
>>8 beshort 7 SGI
+>>8 beshort 11 MIPS little endian
>>10 string x %s