[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <969ed791-8cec-410d-91e1-a2e509f1ec8c@gaisler.com>
Date: Fri, 26 Sep 2025 16:02:30 +0200
From: Andreas Larsson <andreas@...sler.com>
To: Thomas Huth <thuth@...hat.com>, "David S. Miller" <davem@...emloft.net>,
John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>
Cc: sparclinux@...r.kernel.org, linux-kernel@...r.kernel.org,
Arnd Bergmann <arnd@...db.de>, David Laight <david.laight.linux@...il.com>
Subject: Re: [PATCH] sparc: Drop the "-ansi" from the asflags
On 2025-08-05 11:25, Thomas Huth wrote:
> From: Thomas Huth <thuth@...hat.com>
>
> In the very early kernel 1.x days, assembler files were pre-processed
> with the "-traditional" flag. With kernel 1.1.85, the sparc subsystem
> was changed to use "-ansi" instead while the other parts of the kernel
> continued to use "-traditional". That "-traditional" got removed from
> the other architectures in the course of time, but the sparc part
> kept the "-ansi" until today.
>
> This is bad since it comes with some disadvantages nowadays: You have
> to make sure to not include any header that contains a "//" C++ comment
> by accident (there are now some in the tree that use these for SPDX
> identifiers for example), and with "-ansi" we also do not get the
> pre-defined __ASSEMBLER__ macro which we'd like to use instead of the
> kernel-only __ASSEMBLY__ macro in the future.
>
> Since there does not seem to be any compelling reason anymore to use
> "-ansi" nowadays, let's simply drop the "-ansi" flag from the sparc
> subsystem now to get rid of those disadvantages.
>
> Signed-off-by: Thomas Huth <thuth@...hat.com>
> ---
> Note: I've only compile-tested this patch. No runtime testing done.
>
> arch/sparc/kernel/Makefile | 2 --
> arch/sparc/lib/Makefile | 2 +-
> arch/sparc/mm/Makefile | 2 --
> arch/sparc/prom/Makefile | 1 -
> 4 files changed, 1 insertion(+), 6 deletions(-)
Reviewed-by: Andreas Larsson <andreas@...sler.com>
Tested-by: Andreas Larsson <andreas@...sler.com>
Picking this up to my for-next.
Thanks,
Andreas
Powered by blists - more mailing lists