diff mbox series

[v1,03/22] selftests/nolibc: allow use x86_64 toolchain for i386

Message ID 57f6d5abddf5b126589faedefbf25556939b093a.1687706332.git.falcon@tinylab.org
State New
Headers show
Series selftests/nolibc: add minimal kernel config support | expand

Commit Message

Zhangjin Wu June 25, 2023, 4:14 p.m. UTC
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@tinylab.org>
---
 tools/testing/selftests/nolibc/Makefile | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

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