public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@linux.intel.com>
To: dragos.tatulea@intel.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: set fpmath to 387 to avoid gcc warnings
Date: Mon, 06 Aug 2012 11:30:47 -0700	[thread overview]
Message-ID: <50200D57.7090003@linux.intel.com> (raw)
In-Reply-To: <1344253011-5026-1-git-send-email-dragos.tatulea@intel.com>

On 08/06/2012 04:36 AM, dragos.tatulea@intel.com wrote:
> 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)
> 

I guess we should do -msoft-float as well to try to get an error if FP
instructions are generated at all...

	-hpa

  reply	other threads:[~2012-08-06 18:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-06 11:36 [PATCH] x86: set fpmath to 387 to avoid gcc warnings dragos.tatulea
2012-08-06 18:30 ` H. Peter Anvin [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-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=50200D57.7090003@linux.intel.com \
    --to=hpa@linux.intel.com \
    --cc=dragos.tatulea@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