mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dragos Tatulea <dragos.tatulea@intel.com>
To: hpa@linux.intel.com
Cc: linux-kernel@vger.kernel.org, Dragos Tatulea <dragos.tatulea@intel.com>
Subject: [PATCH] x86: set fpmath to 387 to avoid gcc warnings
Date: Wed,  8 Aug 2012 09:27:41 +0300	[thread overview]
Message-ID: <1344407261-1339-1-git-send-email-dragos.tatulea@intel.com> (raw)
In-Reply-To: <y>

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


             reply	other threads:[~2012-08-08  6:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-08  6:27 Dragos Tatulea [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-08-08  6:27 Dragos Tatulea
2012-08-08  6:27 ` Tatulea, Dragos
2012-08-06 11:36 dragos.tatulea
2012-08-06 18:30 ` H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1344407261-1339-1-git-send-email-dragos.tatulea@intel.com \
    --to=dragos.tatulea@intel.com \
    --cc=hpa@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®