[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <89bb5a3e-dd6c-475d-9c5d-0bd1595be735@t-8ch.de>
Date: Wed, 21 May 2025 15:08:05 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Mark Brown <broonie@...nel.org>
Cc: Willy Tarreau <w@....eu>, Shuah Khan <shuah@...nel.org>,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH 1/9] tools/nolibc: move ioctl() to sys/ioctl.h
On 2025-05-21 14:03:37+0100, Mark Brown wrote:
> On Thu, May 15, 2025 at 09:57:47PM +0200, Thomas Weißschuh wrote:
> > This is the location regular userspace expects this definition.
> >
> > Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
>
> This is in -next as b8c436bbef0f2a and breaks the build of all the arm64
> selftests using nolibc:
>
> clang --target=aarch64-linux-gnu -fintegrated-as -fno-asynchronous-unwind-tables -fno-ident -s -Os -nostdlib \
> -static -include ../../../../include/nolibc/nolibc.h \
> -ffreestanding -Wall tpidr2.c -o /home/broonie/git/bisect/tools/testing/selftests/arm64/abi/tpidr2 -lgcc
> In file included from <built-in>:1:
> In file included from ./../../../../include/nolibc/nolibc.h:100:
> ./../../../../include/nolibc/sys/ioctl.h:8:10: fatal error: 'nolibc.h' file not found
> 8 | #include "nolibc.h"
> | ^~~~~~~~~~
> 1 error generated.
>
> This happens because:
>
> > +++ b/tools/include/nolibc/sys/ioctl.h
> > @@ -0,0 +1,29 @@
> > +/* SPDX-License-Identifier: LGPL-2.1 OR MIT */
> > +/*
> > + * Ioctl definitions for NOLIBC
> > + * Copyright (C) 2017-2021 Willy Tarreau <w@....eu>
> > + */
> > +
> > +/* make sure to include all global symbols */
> > +#include "nolibc.h"
>
> assumes that the nolibc include directory is in the include path, or
> otherwise set up with a -I path, previously you just had to include
> nolibc.h with the includes that are there working due to being relative
> to nolibc.h. I'll send a patch for the arm64 tests.
Thanks for the report.
Inside sys/ this should actually be #include "../nolibc.h".
I'll doublecheck all of sys/ and see why our new header checks didn't
catch this.
> It looks like the RISC-V selftests are also impacted, I didn't spot any
> other users that didn't already have an -I.
No changes to the selftests should be necessary.
Powered by blists - more mailing lists