Signed-off-by: John Levon <levon@xxxxxxxxxxxxxxxxx> --- lib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib.c b/lib.c index be71e5b3..f20e0885 100644 --- a/lib.c +++ b/lib.c @@ -440,6 +440,10 @@ static void handle_arch_m64_finalize(void) switch (arch_m64) { case ARCH_LP32: /* default values */ +#if defined(__x86_64__) || defined (__i386) + add_pre_buffer("#weak_define __i386__ 1\n"); + add_pre_buffer("#weak_define __i386 1\n"); +#endif return; case ARCH_LP64: bits_in_long = 64; @@ -459,7 +463,7 @@ static void handle_arch_m64_finalize(void) case_64bit_common: bits_in_pointer = 64; pointer_alignment = 8; -#ifdef __x86_64__ +#if defined(__x86_64__) || defined (__i386) add_pre_buffer("#weak_define __x86_64__ 1\n"); add_pre_buffer("#weak_define __x86_64 1\n"); #endif -- 2.14.1