From 4878e2db5505af04e3b20761a7a5f8e1d8667d26 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Tue, 12 May 2015 19:09:50 +0200 Subject: [PATCH] Properly detect mipsel as little endian architecture. * Properly detect mipsel as little endian architecture. (Closes: #785126) - Add fix-mips-endian.patch --- debian/changelog | 2 ++ debian/patches/fix-mips-endian.patch | 40 ++++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 43 insertions(+) create mode 100644 debian/patches/fix-mips-endian.patch diff --git a/debian/changelog b/debian/changelog index f14efdbcd..4872e46a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -30,6 +30,8 @@ cmake (3.2.2-1) UNRELEASED; urgency=low - Pass the date from d/changelog to sphinx. * Add libcurl-ssl-dev as an alternative build-dependency to libcurl4-openssl-dev. (Closes: #785128) + * Properly detect mipsel as little endian architecture. (Closes: #785126) + - Add fix-mips-endian.patch -- Mario Lang Mon, 27 Apr 2015 22:31:13 +0200 diff --git a/debian/patches/fix-mips-endian.patch b/debian/patches/fix-mips-endian.patch new file mode 100644 index 000000000..0830b6639 --- /dev/null +++ b/debian/patches/fix-mips-endian.patch @@ -0,0 +1,40 @@ +From b1d560a0b9e6c545f65c170bdbbcf5da35123b58 Mon Sep 17 00:00:00 2001 +From: Brad King +Date: Tue, 12 May 2015 11:38:02 -0400 +Subject: [PATCH] CPU: MIPS is biendian + +MIPS machines are biendian hence they can run both big endian kernels +e.g. Debian mips architecture, and little endian kernels e.g. Debian +mipsel architecture. Use predefined macros to distinguish them. + +Change-Id: I75fccd3cb1ef7915c8754ebbb64cb52a948b4ad8 +Reported-by: Mathieu Malaterre +Inspired-by: Modestas Vainius +--- + CPU.h.in | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/Source/kwsys/CPU.h.in b/Source/kwsys/CPU.h.in +index 626914b..884d71a 100644 +--- a/Source/kwsys/CPU.h.in ++++ b/Source/kwsys/CPU.h.in +@@ -76,7 +76,15 @@ + #elif defined(__m68k__) || defined(M68000) + # define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG + +-/* MIPS */ ++/* MIPSel (MIPS little endian) */ ++#elif defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) ++# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_LITTLE ++ ++/* MIPSeb (MIPS big endian) */ ++#elif defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) ++# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG ++ ++/* MIPS (fallback, big endian) */ + #elif defined(__mips) || defined(__mips__) || defined(__MIPS__) + # define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG + +-- +1.9.1 + diff --git a/debian/patches/series b/debian/patches/series index 80ae51782..f44a6dd08 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -6,3 +6,4 @@ fix-hdf5-hl.patch cpack-doc-typo.patch protect-tests-from-makeflags.patch custom-sphinx-flags.patch +fix-mips-endian.patch