Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- target-mips.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/target-mips.c b/target-mips.c index 3d73236feffd..1ff0760c2446 100644 --- a/target-mips.c +++ b/target-mips.c @@ -10,6 +10,16 @@ static void predefine_mips(const struct target *self) predefine("_MIPS_SZINT", 1, "%d", int_ctype.bit_size); predefine("_MIPS_SZLONG", 1, "%d", long_ctype.bit_size); predefine("_MIPS_SZPTR", 1, "%d", ptr_ctype.bit_size); + + if (arch_big_endian) { + predefine("_MIPSEB", 1, "1"); + predefine("__MIPSEB", 1, "1"); + predefine("__MIPSEB__", 1, "1"); + } else { + predefine("_MIPSEL", 1, "1"); + predefine("__MIPSEL", 1, "1"); + predefine("__MIPSEL__", 1, "1"); + } } -- 2.27.0