* [PATCH] kselftest/arm64/gcs/basic-gcs: Respect parent directory CFLAGS
@ 2025-09-16 16:51 Thomas Weißschuh
2025-09-17 11:53 ` Mark Brown
2025-09-18 11:06 ` Will Deacon
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Weißschuh @ 2025-09-16 16:51 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Shuah Khan, Mark Brown
Cc: linux-arm-kernel, linux-kselftest, linux-kernel, Naresh Kamboju,
Linux Kernel Functional Testing, Thomas Weißschuh
basic-gcs has it's own make rule to handle the special compiler
invocation to build against nolibc. This rule does not respect the
$(CFLAGS) passed by the Makefile from the parent directory.
However these $(CFLAGS) set up the include path to include the UAPI
headers from the current kernel.
Due to this the asm/hwcap.h header is used from the toolchain instead of
the UAPI and the definition of HWCAP_GCS is not found.
Restructure the rule for basic-gcs to respect the $(CFLAGS).
Also drop those options which are already provided by $(CFLAGS).
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Closes: https://lore.kernel.org/lkml/CA+G9fYv77X+kKz2YT6xw7=9UrrotTbQ6fgNac7oohOg8BgGvtw@mail.gmail.com/
Fixes: a985fe638344 ("kselftest/arm64/gcs: Use nolibc's getauxval()")
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
tools/testing/selftests/arm64/gcs/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/arm64/gcs/Makefile b/tools/testing/selftests/arm64/gcs/Makefile
index d2f3497a9103fc12ebc90c7f4e33ab9b846c6c8a..1fbbf0ca1f0291d00882920eb2d1efbf99882ec1 100644
--- a/tools/testing/selftests/arm64/gcs/Makefile
+++ b/tools/testing/selftests/arm64/gcs/Makefile
@@ -14,11 +14,11 @@ LDLIBS+=-lpthread
include ../../lib.mk
$(OUTPUT)/basic-gcs: basic-gcs.c
- $(CC) -g -fno-asynchronous-unwind-tables -fno-ident -s -Os -nostdlib \
- -static -include ../../../../include/nolibc/nolibc.h \
+ $(CC) $(CFLAGS) -fno-asynchronous-unwind-tables -fno-ident -s -nostdlib -nostdinc \
+ -static -I../../../../include/nolibc -include ../../../../include/nolibc/nolibc.h \
-I../../../../../usr/include \
-std=gnu99 -I../.. -g \
- -ffreestanding -Wall $^ -o $@ -lgcc
+ -ffreestanding $^ -o $@ -lgcc
$(OUTPUT)/gcs-stress-thread: gcs-stress-thread.S
$(CC) -nostdlib $^ -o $@
---
base-commit: 14a41628c470f4aa069075cdcf6ec0138b6cf1da
change-id: 20250916-arm64-gcs-nolibc-7d1f03a2a3cf
Best regards,
--
Thomas Weißschuh <linux@weissschuh.net>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] kselftest/arm64/gcs/basic-gcs: Respect parent directory CFLAGS
2025-09-16 16:51 [PATCH] kselftest/arm64/gcs/basic-gcs: Respect parent directory CFLAGS Thomas Weißschuh
@ 2025-09-17 11:53 ` Mark Brown
2025-09-18 11:06 ` Will Deacon
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2025-09-17 11:53 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Catalin Marinas, Will Deacon, Shuah Khan, linux-arm-kernel,
linux-kselftest, linux-kernel, Naresh Kamboju,
Linux Kernel Functional Testing
[-- Attachment #1: Type: text/plain, Size: 433 bytes --]
On Tue, Sep 16, 2025 at 06:51:35PM +0200, Thomas Weißschuh wrote:
> Restructure the rule for basic-gcs to respect the $(CFLAGS).
> Also drop those options which are already provided by $(CFLAGS).
I think I was concerned about CFLAGS having things in it that weren't
appropriate for nolibc since the build setup is kind of fiddly, but I'm
not sure how real a concern that is:
Reviewed-by: Mark Brown <broonie@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kselftest/arm64/gcs/basic-gcs: Respect parent directory CFLAGS
2025-09-16 16:51 [PATCH] kselftest/arm64/gcs/basic-gcs: Respect parent directory CFLAGS Thomas Weißschuh
2025-09-17 11:53 ` Mark Brown
@ 2025-09-18 11:06 ` Will Deacon
1 sibling, 0 replies; 3+ messages in thread
From: Will Deacon @ 2025-09-18 11:06 UTC (permalink / raw)
To: Catalin Marinas, Shuah Khan, Mark Brown, Thomas Weißschuh
Cc: kernel-team, Will Deacon, linux-arm-kernel, linux-kselftest,
linux-kernel, Naresh Kamboju, Linux Kernel Functional Testing
On Tue, 16 Sep 2025 18:51:35 +0200, Thomas Weißschuh wrote:
> basic-gcs has it's own make rule to handle the special compiler
> invocation to build against nolibc. This rule does not respect the
> $(CFLAGS) passed by the Makefile from the parent directory.
> However these $(CFLAGS) set up the include path to include the UAPI
> headers from the current kernel.
> Due to this the asm/hwcap.h header is used from the toolchain instead of
> the UAPI and the definition of HWCAP_GCS is not found.
>
> [...]
Applied to arm64 (for-next/selftests), thanks!
[1/1] kselftest/arm64/gcs/basic-gcs: Respect parent directory CFLAGS
https://git.kernel.org/arm64/c/5b7bdc4402b1
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-18 11:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-16 16:51 [PATCH] kselftest/arm64/gcs/basic-gcs: Respect parent directory CFLAGS Thomas Weißschuh
2025-09-17 11:53 ` Mark Brown
2025-09-18 11:06 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®