]> Gentwo Git Trees - linux/.git/commit
sparc: Drop the "-ansi" from the asflags
authorThomas Huth <thuth@redhat.com>
Tue, 5 Aug 2025 09:25:40 +0000 (11:25 +0200)
committerAndreas Larsson <andreas@gaisler.com>
Fri, 26 Sep 2025 14:55:21 +0000 (16:55 +0200)
commitdc356bf3c173a69d4b6f6ee6221cd21c6500fc65
treebe737593b0f6cb7e41132c6b32ec17dc51bddba8
parent302c04110f0ce70d25add2496b521132548cd408
sparc: Drop the "-ansi" from the asflags

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@redhat.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Tested-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
arch/sparc/kernel/Makefile
arch/sparc/lib/Makefile
arch/sparc/mm/Makefile
arch/sparc/prom/Makefile