Add extra '-m32 -Wl,-melf_i386' flags to tell x86_64 toolchains to generate i386 executable. This allows to use the same x86_64 toolchain for i386 architecture. Signed-off-by: Zhangjin Wu <falcon@xxxxxxxxxxx> --- tools/testing/selftests/nolibc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 3300b5ab7de3..f8be0de0ce0e 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -89,6 +89,7 @@ else Q=@ endif +CFLAGS_i386 = -m32 -Wl,-melf_i386 CFLAGS_riscv32 = -march=rv32im -mabi=ilp32 CFLAGS_s390 = -m64 CFLAGS_mips = -EL -- 2.25.1