diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2013-11-20 13:31:49 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-11 22:36:27 -0800 |
commit | 5e43e33a63d72c6bd30f9fa14a9e82ffb58be422 (patch) | |
tree | cd31170231bb9dc54bd6e257e939319f02773cd1 | |
parent | eb050d976ccdff8c5499a826c19a818868824393 (diff) | |
download | linux-3.10-5e43e33a63d72c6bd30f9fa14a9e82ffb58be422.tar.gz linux-3.10-5e43e33a63d72c6bd30f9fa14a9e82ffb58be422.tar.bz2 linux-3.10-5e43e33a63d72c6bd30f9fa14a9e82ffb58be422.zip |
x86-64, build: Always pass in -mno-sse
commit 5551a34e5aeab868f8d37f70d8754868921b4ee5 upstream.
Always pass in the -mno-sse argument, regardless if
-preferred-stack-boundary is supported. We never want to generate SSE
instructions in the kernel unless we *really* know what we're doing.
According to H. J. Lu, any version of gcc new enough that we support
it at all should handle the -mno-sse option, so just add it
unconditionally.
Reported-by: Kevin B. Smith <kevin.b.smith@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: H. J. Lu <hjl.tools@gmail.com>
Link: http://lkml.kernel.org/n/tip-j21wzqv790q834n7yc6g80j1@git.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | arch/x86/Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 5c477260294..d5cf85057d6 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -31,6 +31,9 @@ ifeq ($(CONFIG_X86_32),y) KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return + # Don't autogenerate SSE instructions + KBUILD_CFLAGS += -mno-sse + # Never want PIC in a 32-bit kernel, prevent breakage with GCC built # with nonstandard options KBUILD_CFLAGS += -fno-pic @@ -57,8 +60,11 @@ else KBUILD_AFLAGS += -m64 KBUILD_CFLAGS += -m64 + # Don't autogenerate SSE instructions + KBUILD_CFLAGS += -mno-sse + # Use -mpreferred-stack-boundary=3 if supported. - KBUILD_CFLAGS += $(call cc-option,-mno-sse -mpreferred-stack-boundary=3) + KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=3) # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu) cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) |