Skip to content

Commit 5b7bdc4

Browse files
t-8chwilldeacon
authored andcommitted
kselftest/arm64/gcs/basic-gcs: Respect parent directory CFLAGS
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: a985fe6 ("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> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Will Deacon <will@kernel.org>
1 parent 14a4162 commit 5b7bdc4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • tools/testing/selftests/arm64/gcs

tools/testing/selftests/arm64/gcs/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ LDLIBS+=-lpthread
1414
include ../../lib.mk
1515

1616
$(OUTPUT)/basic-gcs: basic-gcs.c
17-
$(CC) -g -fno-asynchronous-unwind-tables -fno-ident -s -Os -nostdlib \
18-
-static -include ../../../../include/nolibc/nolibc.h \
17+
$(CC) $(CFLAGS) -fno-asynchronous-unwind-tables -fno-ident -s -nostdlib -nostdinc \
18+
-static -I../../../../include/nolibc -include ../../../../include/nolibc/nolibc.h \
1919
-I../../../../../usr/include \
2020
-std=gnu99 -I../.. -g \
21-
-ffreestanding -Wall $^ -o $@ -lgcc
21+
-ffreestanding $^ -o $@ -lgcc
2222

2323
$(OUTPUT)/gcs-stress-thread: gcs-stress-thread.S
2424
$(CC) -nostdlib $^ -o $@

0 commit comments

Comments
 (0)