[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNATVysAEkcq86AD75njoXis67M4i+QVEfg5LawWzfC1h9g@mail.gmail.com>
Date: Wed, 14 Jul 2021 13:54:59 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Alexey Dobriyan <adobriyan@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-arch <linux-arch@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>,
clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH] Decouple build from userspace headers
On Wed, Jul 14, 2021 at 4:47 AM Alexey Dobriyan <adobriyan@...il.com> wrote:
>
> In theory, userspace headers can be under incompatible license.
>
> Linux by virtue of being OS kernel is fully independent piece of code
> and should not require anything from userspace.
As far as I know,
<stdarg.h> was the only exception,
which was borrowed from the compiler.
I like this as long as:
- license is clear (please add SPDX tag to the new header)
- it works for both gcc and clang (I guess the answer is yes)
I think removing <stdbool.h> and <stddef.h> are non-controversial.
Mayby, you can split it into 1/2.
>
> For this:
>
> * ship minimal <stdarg.h>
> 2 types, 4 macros
>
> * delete "-isystem"
> This is what enables leakage.
>
> * fixup compilation where necessary.
>
> Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
> ---
>
> Makefile | 2 +-
> arch/um/include/shared/irq_user.h | 1 -
> arch/um/os-Linux/signal.c | 2 +-
> crypto/aegis128-neon-inner.c | 2 --
> drivers/net/wwan/iosm/iosm_ipc_imem.h | 1 -
> drivers/pinctrl/aspeed/pinmux-aspeed.h | 1 -
> drivers/staging/media/atomisp/pci/hive_isp_css_common/host/isp_local.h | 2 --
> include/stdarg.h | 9 +++++++++
> sound/aoa/codecs/onyx.h | 1 -
> sound/aoa/codecs/tas.c | 1 -
> 10 files changed, 11 insertions(+), 11 deletions(-)
>
> new file mode 100644
> --- /dev/null
> +++ b/include/stdarg.h
> @@ -0,0 +1,9 @@
This is a new file, so please add the SPDX tag.
What project did you copy the code from?
If gcc, is it GPL v3 (but not compatible for GPL v2) ?
If clang, is it
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Or, can we license this small portion of code
as GPL v2?
> +#ifndef _LINUX_STDARG_H
> +#define _LINUX_STDARG_H
> +typedef __builtin_va_list __gnuc_va_list;
Where is __gnuc_va_list needed?
BTW, once this is accepted, I'd like to
change all <stdarg.h> to <linux/stdarg.h>.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists