Depending on the endianness, predefine '__ARMEL__' or '__ARMEB__'. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- target-arm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target-arm.c b/target-arm.c index 0d7c6134795f..382bd3decfe1 100644 --- a/target-arm.c +++ b/target-arm.c @@ -19,6 +19,11 @@ static void predefine_arm(const struct target *self) predefine("__ARM_PCS", 1, "1"); break; } + + if (arch_big_endian) + predefine("__ARMEB__", 0, "1"); + else + predefine("__ARMEL__", 0, "1"); } const struct target target_arm = { -- 2.27.0