aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2025-08-05 11:25:40 +0200
committerAndreas Larsson <andreas@gaisler.com>2025-09-26 16:55:21 +0200
commitdc356bf3c173a69d4b6f6ee6221cd21c6500fc65 (patch)
treebe737593b0f6cb7e41132c6b32ec17dc51bddba8 /arch/sparc
parentsparc: fix error handling in scan_one_device() (diff)
downloadlinux-dc356bf3c173a69d4b6f6ee6221cd21c6500fc65.tar.gz
linux-dc356bf3c173a69d4b6f6ee6221cd21c6500fc65.zip
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>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/Makefile2
-rw-r--r--arch/sparc/lib/Makefile2
-rw-r--r--arch/sparc/mm/Makefile2
-rw-r--r--arch/sparc/prom/Makefile1
4 files changed, 1 insertions, 6 deletions
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile
index 36f2727e1445..22170d4f8e06 100644
--- a/arch/sparc/kernel/Makefile
+++ b/arch/sparc/kernel/Makefile
@@ -4,8 +4,6 @@
# Makefile for the linux kernel.
#
-asflags-y := -ansi
-
# Undefine sparc when processing vmlinux.lds - it is used
# And teach CPP we are doing $(BITS) builds (for this case)
CPPFLAGS_vmlinux.lds := -Usparc -m$(BITS)
diff --git a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile
index ee5091dd67ed..783bdec0d7be 100644
--- a/arch/sparc/lib/Makefile
+++ b/arch/sparc/lib/Makefile
@@ -2,7 +2,7 @@
# Makefile for Sparc library files..
#
-asflags-y := -ansi -DST_DIV0=0x02
+asflags-y := -DST_DIV0=0x02
lib-$(CONFIG_SPARC32) += ashrdi3.o
lib-$(CONFIG_SPARC32) += memcpy.o memset.o
diff --git a/arch/sparc/mm/Makefile b/arch/sparc/mm/Makefile
index 2d1752108d77..e9d232561c82 100644
--- a/arch/sparc/mm/Makefile
+++ b/arch/sparc/mm/Makefile
@@ -2,8 +2,6 @@
# Makefile for the linux Sparc-specific parts of the memory manager.
#
-asflags-y := -ansi
-
obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o
obj-y += fault_$(BITS).o
obj-y += init_$(BITS).o
diff --git a/arch/sparc/prom/Makefile b/arch/sparc/prom/Makefile
index a1adc75d8055..92db8bb4ad4c 100644
--- a/arch/sparc/prom/Makefile
+++ b/arch/sparc/prom/Makefile
@@ -2,7 +2,6 @@
# Makefile for the Sun Boot PROM interface library under
# Linux.
#
-asflags := -ansi
lib-y := bootstr_$(BITS).o
lib-y += init_$(BITS).o