summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-09-17 18:36:16 +0300
committerThomas Weißschuh <linux@weissschuh.net>2023-10-12 22:14:09 +0300
commit9531548675300e313b4e852d90095449c2368fbe (patch)
tree6b65c5aad72c474514cd0e32d42245c6126a7717 /tools
parent45839d09910e94254e35b08d1a71cc1206767217 (diff)
downloadlinux-9531548675300e313b4e852d90095449c2368fbe.tar.xz
selftests/nolibc: allow building i386 with multiarch compiler
When building with a multiarch-capable compiler, like those provided by common distributions the -m32 argument is required to build 32bit code. Wrap it in cc-option in case the compiler is not multiarch-capable. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20230917-nolibc-syscall-nr-v2-1-03863d509b9a@weissschuh.net
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/nolibc/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
index ee6a9ad28cfd..891aa396163d 100644
--- a/tools/testing/selftests/nolibc/Makefile
+++ b/tools/testing/selftests/nolibc/Makefile
@@ -113,6 +113,7 @@ else
Q=@
endif
+CFLAGS_i386 = $(call cc-option,-m32)
CFLAGS_ppc = -m32 -mbig-endian -mno-vsx $(call cc-option,-mmultiple)
CFLAGS_ppc64 = -m64 -mbig-endian -mno-vsx $(call cc-option,-mmultiple)
CFLAGS_ppc64le = -m64 -mlittle-endian -mno-vsx $(call cc-option,-mabi=elfv2)