mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: dragos.tatulea@intel.com
To: linux-kernel@vger.kernel.org
Cc: hpa@linux.intel.com, Dragos Tatulea <dragos.tatulea@intel.com>
Subject: [PATCH] x86: set fpmath to 387 to avoid gcc warnings
Date: Mon,  6 Aug 2012 14:36:51 +0300	[thread overview]
Message-ID: <1344253011-5026-1-git-send-email-dragos.tatulea@intel.com> (raw)

From: Dragos Tatulea <dragos.tatulea@intel.com>

If gcc has a different default fpmath set (e.g. sse),
many unuseful warnings will be spewed when compiling on an
architecture that doesn't support it.

An example would be Google's Android 4.1 x86 toochain which
is compiled with -mfpmath=sse.

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

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..f4fefb8 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,)
 
 KBUILD_CFLAGS += $(mflags-y)
 KBUILD_AFLAGS += $(mflags-y)
-- 
1.7.9.5


             reply	other threads:[~2012-08-06 11:35 UTC|newest]

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

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=1344253011-5026-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®