diff options
-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 |