Kbuild: x86: Eliminate duplicate command line options
PATCH RESEND 1/1 Kbuild: x86: Eliminate duplicate command line options
The options -mno-mmx and -mno-sse are unconditionally added to KBUILD_CFLAGS in both branches of an ifeq and through a $(cc-option) further down. We can safely remove the first instances.
In fact, since the -mno-mmx and -mno-sse options were introduced simultaneous with the other two options in the $(cc-option) [according to http://www.gnu.org/software/gcc/gcc-3.1/changes.html], and since the former were unconditionally used, one can deduce that only gcc versions knowing about all four are supported. So also eliminate the $(cc-option) wrap.
---
I know it's not the most important patch ever written, but I'd appreciate an explicit NAK if it is not going to be applied.
arch/x86/Makefile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
arch/x86/Makefile +2 -6
@@ -50,9 +50,6 @@ ifeq ($(CONFIG_X86_32),y) KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return - # Don't autogenerate MMX or SSE instructions - KBUILD_CFLAGS += -mno-mmx -mno-sse - # Never want PIC in a 32-bit kernel, prevent breakage with GCC built # with nonstandard options KBUILD_CFLAGS += -fno-pic
@@ -80,8 +77,7 @@ else KBUILD_AFLAGS += -m64 KBUILD_CFLAGS += -m64 - # Don't autogenerate traditional x87, MMX or SSE instructions - KBUILD_CFLAGS += -mno-mmx -mno-sse + # Don't autogenerate traditional x87 instructions KBUILD_CFLAGS += $(call cc-option,-mno-80387) KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387)
@@ -168,7 +164,7 @@ KBUILD_CFLAGS += -Wno-sign-compare # KBUILD_CFLAGS += -fno-asynchronous-unwind-tables # prevent gcc from generating any FP code by mistake -KBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) +KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow KBUILD_CFLAGS += $(call cc-option,-mno-avx,) KBUILD_CFLAGS += $(mflags-y)
Signature · 1 line
2.0.4
Quoted 4 lines · Rasmus Villemoes
The options -mno-mmx and -mno-sse are unconditionally added to
KBUILD_CFLAGSin both branches of an ifeq and through a $(cc-option) further down. We can safely remove the first instances.
Quoted 8 lines
In fact, since the -mno-mmx and -mno-sse options were introduced simultaneous with the other two options in the $(cc-option) [according to http://www.gnu.org/software/gcc/gcc-3.1/changes.html], and since the former were unconditionally used, one can deduce that only gcc versions knowing about all four are supported. So also eliminate the $(cc-option) wrap.
Signed-off-by Rasmus Villemoes <[email protected]>
tip-bot for Rasmus Villemoes
merge bot[tip:x86/build] x86/kbuild: Eliminate duplicate command line options
In reply to Rasmus Villemoesx86/kbuild: Eliminate duplicate command line options
Commit-ID: 5c630089442c2e3482855c0849fea53abded81e2 Gitweb: http://git.kernel.org/tip/5c630089442c2e3482855c0849fea53abded81e2 Author: Rasmus Villemoes <[email protected]> AuthorDate: Wed, 10 Sep 2014 18:05:39 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Tue, 16 Sep 2014 10:33:02 +0200
x86/kbuild: Eliminate duplicate command line options
The options -mno-mmx and -mno-sse are unconditionally added to KBUILD_CFLAGS in both branches of an ifeq and through a $(cc-option) further down. We can safely remove the first instances.
In fact, since the -mno-mmx and -mno-sse options were introduced simultaneous with the other two options in the $(cc-option) [according to http://www.gnu.org/software/gcc/gcc-3.1/changes.html],
and since the former were unconditionally used, one can deduce that only gcc versions knowing about all four are supported. So also eliminate the $(cc-option) wrap.
--- arch/x86/Makefile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
arch/x86/Makefile +2 -6
@@ -50,9 +50,6 @@ ifeq ($(CONFIG_X86_32),y) KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return - # Don't autogenerate MMX or SSE instructions - KBUILD_CFLAGS += -mno-mmx -mno-sse - # Never want PIC in a 32-bit kernel, prevent breakage with GCC built # with nonstandard options KBUILD_CFLAGS += -fno-pic
@@ -80,8 +77,7 @@ else KBUILD_AFLAGS += -m64 KBUILD_CFLAGS += -m64 - # Don't autogenerate traditional x87, MMX or SSE instructions - KBUILD_CFLAGS += -mno-mmx -mno-sse + # Don't autogenerate traditional x87 instructions KBUILD_CFLAGS += $(call cc-option,-mno-80387) KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387)
@@ -168,7 +164,7 @@ KBUILD_CFLAGS += -Wno-sign-compare # KBUILD_CFLAGS += -fno-asynchronous-unwind-tables # prevent gcc from generating any FP code by mistake -KBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) +KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow KBUILD_CFLAGS += $(call cc-option,-mno-avx,) KBUILD_CFLAGS += $(mflags-y)