diff options
author | Anssi Hannula <anssi@mandriva.org> | 2010-01-24 11:44:35 +0000 |
---|---|---|
committer | Anssi Hannula <anssi@mandriva.org> | 2010-01-24 11:44:35 +0000 |
commit | 5d1702d2f54b3e60e095555eb978e4de8572b2be (patch) | |
tree | a81f47a3bf6b77fcd1d1db6fcf2026c1207e7bb7 | |
parent | bb99de6b1bba3192ab81db6a65bdb8e8e568c6b7 (diff) | |
download | multiarch-utils-5d1702d2f54b3e60e095555eb978e4de8572b2be.tar multiarch-utils-5d1702d2f54b3e60e095555eb978e4de8572b2be.tar.gz multiarch-utils-5d1702d2f54b3e60e095555eb978e4de8572b2be.tar.bz2 multiarch-utils-5d1702d2f54b3e60e095555eb978e4de8572b2be.tar.xz multiarch-utils-5d1702d2f54b3e60e095555eb978e4de8572b2be.zip |
add mips support (from Arnaud Patard)
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | multiarch-dispatch.h | 14 | ||||
-rwxr-xr-x | multiarch-platform | 4 |
3 files changed, 19 insertions, 0 deletions
@@ -1,3 +1,4 @@ - remove dispatch file for host.def, it is no longer used - fix broken sparc64 check (from Per Øyvind Karlsen, #27277) - fix broken check for rpm/macros.d directory (from Per Øyvind Karlsen) +- add mips support (from Arnaud Patard) diff --git a/multiarch-dispatch.h b/multiarch-dispatch.h index 8d9ac5d..e253410 100644 --- a/multiarch-dispatch.h +++ b/multiarch-dispatch.h @@ -11,6 +11,10 @@ #undef sparc #define _multiarch_defined_sparc #endif +#ifdef mips +#undef mips +#define _multiarch_defined_mips +#endif /* Dispatch arch dependent header */ #if defined(__linux__) @@ -37,6 +41,12 @@ #include _MULTIARCH_MAKE_HEADER(ia64,_MULTIARCH_HEADER) #elif defined(__alpha__) #include _MULTIARCH_MAKE_HEADER(alpha,_MULTIARCH_HEADER) +#elif defined(__mips__) +#if defined(__BIG_ENDIAN__) +#include _MULTIARCH_MAKE_HEADER(mips,_MULTIARCH_HEADER) +#else +#include _MULTIARCH_MAKE_HEADER(mipsel,_MULTIARCH_HEADER) +#endif #else #error "Unknown architecture, please submit bug report" #endif @@ -57,3 +67,7 @@ #undef _multiarch_defined_sparc #define sparc 1 #endif +#ifdef _multiarch_defined_mips +#undef _multiarch_defined_mips +#define mips 1 +#endif diff --git a/multiarch-platform b/multiarch-platform index e9e2da5..00df2fa 100755 --- a/multiarch-platform +++ b/multiarch-platform @@ -1,7 +1,11 @@ #!/bin/sh arch=`uname -m` +`perl -e '$le = unpack("h*", pack("s", 1)) =~ /^1/; exit $le;'` +le=$? case $arch in i?86) arch=i386;; +mips*) [ $le -eq 1 ] && arch="$arch"el ;; +arm) [ $le -eq 0 ] && arch="$arch"eb ;; esac os=`uname -s` case $os in |