If the flag -m32 or -m64 is given in argument, we must insure that the corresponding architecture is changed as well. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- target.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/target.c b/target.c index 7829e8f9a..90097818f 100644 --- a/target.c +++ b/target.c @@ -57,6 +57,27 @@ int enum_alignment = 4; void init_target(void) { + switch (arch_mach) { + case MACH_I386: + case MACH_MIPS32: + case MACH_PPC32: + case MACH_RISCV32: + case MACH_SPARC32: + case MACH_S390: + if (arch_m64 == ARCH_LP64) + arch_mach++; + break; + case MACH_X86_64: + case MACH_MIPS64: + case MACH_PPC64: + case MACH_RISCV64: + case MACH_SPARC64: + case MACH_S390X: + if (arch_m64 == ARCH_LP32) + arch_mach--; + break; + } + switch (arch_mach) { case MACH_X86_64: if (arch_m64 == ARCH_LP64) -- 2.23.0