Commit 5551a34e authored by H. Peter Anvin's avatar H. Peter Anvin

x86-64, build: Always pass in -mno-sse

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: default avatarKevin B. Smith <kevin.b.smith@intel.com>
Signed-off-by: default avatarH. 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
Cc: <stable@vger.kernel.org> # build fix only
parent fdeadb43
...@@ -31,6 +31,9 @@ ifeq ($(CONFIG_X86_32),y) ...@@ -31,6 +31,9 @@ ifeq ($(CONFIG_X86_32),y)
KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return 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 # Never want PIC in a 32-bit kernel, prevent breakage with GCC built
# with nonstandard options # with nonstandard options
KBUILD_CFLAGS += -fno-pic KBUILD_CFLAGS += -fno-pic
...@@ -57,8 +60,11 @@ else ...@@ -57,8 +60,11 @@ else
KBUILD_AFLAGS += -m64 KBUILD_AFLAGS += -m64
KBUILD_CFLAGS += -m64 KBUILD_CFLAGS += -m64
# Don't autogenerate SSE instructions
KBUILD_CFLAGS += -mno-sse
# Use -mpreferred-stack-boundary=3 if supported. # 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) # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu)
cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment