lkml.org 
[lkml]   [2012]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] x86: set fpmath to 387 to avoid gcc warnings
Date
If gcc has a different default fpmath set (ex: sse),
many unuseful warnings will be spewed.

This can affect out of tree modules that compile with
-Werror (ex: systemtap stp scripts).

Be paranoid and add -msoft-float as well to try to
get an error if FP instructions are generated at all.

Signed-off-by: Dragos Tatulea <dragos.tatulea@intel.com>
---
arch/x86/Makefile | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index b1c611e..b771d0b 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -130,6 +130,7 @@ 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 += $(call cc-option,-mno-avx,)
+KBUILD_CFLAGS += $(call cc-option,-mfpmath=387 -msoft-float,)

KBUILD_CFLAGS += $(mflags-y)
KBUILD_AFLAGS += $(mflags-y)
--
1.7.9.5


\
 
 \ /
  Last update: 2012-08-08 09:03    [W:0.030 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site