[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250402-nolibc-nolibc-test-native-v1-2-62f2f8585220@weissschuh.net>
Date: Wed, 02 Apr 2025 23:39:00 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Willy Tarreau <w@....eu>, Shuah Khan <shuah@...nel.org>
Cc: linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
Sebastian Andrzej Siewior <sebastian@...akpoint.cc>,
Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH 2/2] selftests/nolibc: only consider XARCH for CFLAGS when
requested
If no explicit XARCH is specified, use the toolchains default.
Suggested-by: Sebastian Andrzej Siewior <sebastian@...akpoint.cc>
Link: https://lore.kernel.org/lkml/20250326205434.bPx_kVUx@breakpoint.cc/
Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
---
tools/testing/selftests/nolibc/Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
index 34d01e473c013a1400bf6023132017a5f663f75c..89ee265f7467e2e5e32edf3eb51b4ec758e8004f 100644
--- a/tools/testing/selftests/nolibc/Makefile
+++ b/tools/testing/selftests/nolibc/Makefile
@@ -174,10 +174,13 @@ CFLAGS_s390x = -m64
CFLAGS_s390 = -m31
CFLAGS_mips32le = -EL -mabi=32 -fPIC
CFLAGS_mips32be = -EB -mabi=32
+ifeq ($(origin XARCH),command line)
+CFLAGS_XARCH = $(CFLAGS_$(XARCH))
+endif
CFLAGS_STACKPROTECTOR ?= $(call cc-option,-mstack-protector-guard=global $(call cc-option,-fstack-protector-all))
CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 -W -Wall -Wextra \
$(call cc-option,-fno-stack-protector) $(call cc-option,-Wmissing-prototypes) \
- $(CFLAGS_$(XARCH)) $(CFLAGS_STACKPROTECTOR) $(CFLAGS_EXTRA)
+ $(CFLAGS_XARCH) $(CFLAGS_STACKPROTECTOR) $(CFLAGS_EXTRA)
LDFLAGS :=
LIBGCC := -lgcc
--
2.49.0
Powered by blists - more mailing lists