linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Kbuild: x86: Eliminate duplicate command line options
@ 2014-08-05 16:16 Rasmus Villemoes
  2014-08-22 15:41 ` Rasmus Villemoes
  0 siblings, 1 reply; 2+ messages in thread
From: Rasmus Villemoes @ 2014-08-05 16:16 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin
  Cc: x86, linux-kernel, Rasmus Villemoes

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.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 arch/x86/Makefile | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index c65fd96..202f849 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -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)
-- 
1.9.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Kbuild: x86: Eliminate duplicate command line options
  2014-08-05 16:16 [PATCH] Kbuild: x86: Eliminate duplicate command line options Rasmus Villemoes
@ 2014-08-22 15:41 ` Rasmus Villemoes
  0 siblings, 0 replies; 2+ messages in thread
From: Rasmus Villemoes @ 2014-08-22 15:41 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: Ingo Molnar, H. Peter Anvin, x86, linux-kernel

Rasmus Villemoes <linux@rasmusvillemoes.dk> writes:

> 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.
>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>

Ping.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-22 15:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-05 16:16 [PATCH] Kbuild: x86: Eliminate duplicate command line options Rasmus Villemoes
2014-08-22 15:41 ` Rasmus Villemoes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).