From: ewt Date: Thu, 15 Jan 1998 19:52:42 +0000 (+0000) Subject: changes to differentiate mipsel from mipseb X-Git-Tag: rpm-4.4-release~3785 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f36e7608ea56cc899288f755919c7811d85e2ce9;p=platform%2Fupstream%2Frpm.git changes to differentiate mipsel from mipseb CVS patchset: 1973 CVS date: 1998/01/15 19:52:42 --- diff --git a/lib-rpmrc.in b/lib-rpmrc.in index de0d33b..618d0df 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 e33dfe2..a361ce7 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 0f74fbf..c3c90ba 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