On Mon, 15 Sept 2025 at 14:53, Thomas Weißschuh <li...@weissschuh.net> wrote:
>
> On 2025-09-12 12:14:00+0100, Mark Brown wrote:
> > On Fri, Sep 12, 2025 at 01:07:58PM +0200, Thomas Weißschuh wrote:
> >
> > > The Makefile does *not* use -nostdinc, so the nolibc program probably 
> > > finds the toolchain's glibc asm/hwcap.h.
> > > There also doesn't seem to be a static arm64 hwcap header in 
> > > tools/include in the first place.
> > > I am still wondering how this works for the other tests.
> >
> > make headers_install puts a copy in usr/include, probably we just need
> > to include that in the include path.
>
> Naresh, could you test the patch below?
> The other custom $(CC) rules in the gcs directory are also not
> respecting $(CFLAGS), but I'll leave these for now.

I have applied this patch on top of Linux next-20250912 tag and
tested and reported build regressions got fixed.

Tested-by: Linux Kernel Functional Testing <l...@linaro.org>

> diff --git a/tools/testing/selftests/arm64/gcs/Makefile 
> b/tools/testing/selftests/arm64/gcs/Makefile
> index d2f3497a9..1fbbf0ca1 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 $@
>

- Naresh

Reply via email to