Skip to content

Commit dc356bf

Browse files
huthandreas-gaisler
authored andcommitted
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>
1 parent 302c041 commit dc356bf

4 files changed

Lines changed: 1 addition & 6 deletions

File tree

arch/sparc/kernel/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
# Makefile for the linux kernel.
55
#
66

7-
asflags-y := -ansi
8-
97
# Undefine sparc when processing vmlinux.lds - it is used
108
# And teach CPP we are doing $(BITS) builds (for this case)
119
CPPFLAGS_vmlinux.lds := -Usparc -m$(BITS)

arch/sparc/lib/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Makefile for Sparc library files..
33
#
44

5-
asflags-y := -ansi -DST_DIV0=0x02
5+
asflags-y := -DST_DIV0=0x02
66

77
lib-$(CONFIG_SPARC32) += ashrdi3.o
88
lib-$(CONFIG_SPARC32) += memcpy.o memset.o

arch/sparc/mm/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# Makefile for the linux Sparc-specific parts of the memory manager.
33
#
44

5-
asflags-y := -ansi
6-
75
obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o
86
obj-y += fault_$(BITS).o
97
obj-y += init_$(BITS).o

arch/sparc/prom/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Makefile for the Sun Boot PROM interface library under
33
# Linux.
44
#
5-
asflags := -ansi
65

76
lib-y := bootstr_$(BITS).o
87
lib-y += init_$(BITS).o

0 commit comments

Comments
 (0)