Message ID | 20200708215329.56404-4-luc.vanoostenryck@gmail.com (mailing list archive) |
---|---|
State | Mainlined, archived |
Headers | show |
Series | add the predefines for endianness | expand |
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 = {
Depending on the endianness, predefine '__ARMEL__' or '__ARMEB__'. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> --- target-arm.c | 5 +++++ 1 file changed, 5 insertions(+)