From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Nick Huang <sef1548@gmail.com>
Cc: macro@orcam.me.uk, linux@armlinux.org.uk, davidgow@google.com,
dongsheng.yang@linux.dev, dory85109@gmail.com,
ebiggers@kernel.org, idryomov@gmail.com, jlayton@kernel.org,
john.g.garry@oracle.com, namhyung@kernel.org, robh@kernel.org,
kusogame68@gmail.com, wdhh6@aliyun.com, wqu@suse.com,
yot4106@gmail.com, likerockman102@hotmail.com,
squid@squidspirit.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] arm: Replace ASSEMBLY with ASSEMBLER in uapi headers
Date: Sat, 28 Feb 2026 13:19:59 +0100 [thread overview]
Message-ID: <164baf81-2824-4943-bbc1-4ae8a160c0cc@t-8ch.de> (raw)
In-Reply-To: <20260228121311.3804-1-sef1548@gmail.com>
On 2026-02-28 12:13:11+0000, Nick Huang wrote:
> While the transition from __ASSEMBLY__ to __ASSEMBLER__ is not a regression,
> the use of the modern __ASSEMBLER__ macro requires a sufficiently recent
> compiler (GCC 3.0+).
>
> In some environments, userland might still be using ancient tools like
> GCC 2.95.x, which does not natively define __ASSEMBLER__. To provide a
> complete fix and prevent silent build issues or header ambiguity, add
> an #error guard to catch unsupported toolchains.
>
> Changes in v2:
> - Added explicit #error check for GCC versions earlier than 3.0.
> - Updated commit message to clarify the rationale for legacy toolchain support.
> - Link to v1: https://lore.kernel.org/all/20260218133952.5356-1-sef1548@gmail.com/
>
> Signed-off-by: Nick Huang <sef1548@gmail.com>
> ---
> arch/arm/include/uapi/asm/ptrace.h | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/include/uapi/asm/ptrace.h b/arch/arm/include/uapi/asm/ptrace.h
> index 8896c23cc..51cfefeae 100644
> --- a/arch/arm/include/uapi/asm/ptrace.h
> +++ b/arch/arm/include/uapi/asm/ptrace.h
> @@ -119,7 +119,12 @@
> #define PT_DATA_ADDR 0x10004
> #define PT_TEXT_END_ADDR 0x10008
>
> -#ifndef __ASSEMBLY__
> +#if defined(__GNUC__) && (__GNUC__ < 3)
> +# error "GCC 3.0+ is required for proper __ASSEMBLER__ support. \
> +Your compiler is too old to safely handle modern kernel assembly headers."
> +#endif
Having this check in a random, architecture-specific header does not
make much sense. It should go into a generic header if we want to have it.
Or we can have some generic postprocessing in 'headers_install'.
But as most other architecture UAPI headers already have switched to
__ASSEMBLER__, it seems nobody will be affected by this, so this check
should be unnecessary.
> +
> +#ifndef __ASSEMBLER__
>
> /*
> * This struct defines the way the registers are stored on the
> @@ -158,6 +163,6 @@ struct pt_regs {
> #define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ )
>
>
> -#endif /* __ASSEMBLY__ */
> +#endif /* __ASSEMBLER__ */
>
> #endif /* _UAPI__ASM_ARM_PTRACE_H */
> --
> 2.43.0
>
next prev parent reply other threads:[~2026-02-28 12:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-28 12:13 Nick Huang
2026-02-28 12:19 ` Thomas Weißschuh [this message]
2026-02-28 12:45 ` Nick Huang
2026-03-01 20:12 ` Maciej W. Rozycki
2026-03-01 22:06 ` Thomas Weißschuh
2026-03-03 16:10 ` Nick Huang
2026-03-09 15:24 ` [PATCH v2] arm: Replace ASSEMBLY with ASSEMBLER in uapi Nick Huang
2026-03-09 16:01 ` Thomas Weißschuh
2026-03-10 14:13 ` Maciej W. Rozycki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=164baf81-2824-4943-bbc1-4ae8a160c0cc@t-8ch.de \
--to=linux@weissschuh.net \
--cc=davidgow@google.com \
--cc=dongsheng.yang@linux.dev \
--cc=dory85109@gmail.com \
--cc=ebiggers@kernel.org \
--cc=idryomov@gmail.com \
--cc=jlayton@kernel.org \
--cc=john.g.garry@oracle.com \
--cc=kusogame68@gmail.com \
--cc=likerockman102@hotmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=macro@orcam.me.uk \
--cc=namhyung@kernel.org \
--cc=robh@kernel.org \
--cc=sef1548@gmail.com \
--cc=squid@squidspirit.com \
--cc=wdhh6@aliyun.com \
--cc=wqu@suse.com \
--cc=yot4106@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®