public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: LLVMLinux: Wrap -mno-80387 with cc-option
@ 2014-04-22  5:40 behanw
  2014-04-22  6:05 ` Ingo Molnar
  2014-04-22  9:45 ` [tip:x86/urgent] " tip-bot for Behan Webster
  0 siblings, 2 replies; 5+ messages in thread
From: behanw @ 2014-04-22  5:40 UTC (permalink / raw)
  To: tglx, mingo, hpa, x86
  Cc: linux-kernel, torvalds, dwmw2, pageexec, Behan Webster

From: Behan Webster <behanw@converseincode.com>

Wrap -mno-80387 gcc options with cc-option so they don't break clang.

Signed-off-by: Behan Webster <behanw@converseincode.com>
---
 arch/x86/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index d1b7c37..ce6ad7e 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -83,7 +83,9 @@ else
         KBUILD_CFLAGS += -m64
 
         # Don't autogenerate traditional x87, MMX or SSE instructions
-        KBUILD_CFLAGS += -mno-mmx -mno-sse -mno-80387 -mno-fp-ret-in-387
+        KBUILD_CFLAGS += -mno-mmx -mno-sse
+        KBUILD_CFLAGS += $(call cc-option,-mno-80387)
+        KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387)
 
 	# Use -mpreferred-stack-boundary=3 if supported.
 	KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=3)
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86: LLVMLinux: Wrap -mno-80387 with cc-option
  2014-04-22  5:40 [PATCH] x86: LLVMLinux: Wrap -mno-80387 with cc-option behanw
@ 2014-04-22  6:05 ` Ingo Molnar
  2014-04-22  6:23   ` Behan Webster
  2014-04-22  9:45 ` [tip:x86/urgent] " tip-bot for Behan Webster
  1 sibling, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2014-04-22  6:05 UTC (permalink / raw)
  To: behanw; +Cc: tglx, mingo, hpa, x86, linux-kernel, torvalds, dwmw2, pageexec


* behanw@converseincode.com <behanw@converseincode.com> wrote:

> From: Behan Webster <behanw@converseincode.com>
> 
> Wrap -mno-80387 gcc options with cc-option so they don't break clang.
> 
> Signed-off-by: Behan Webster <behanw@converseincode.com>
> ---
>  arch/x86/Makefile | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index d1b7c37..ce6ad7e 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -83,7 +83,9 @@ else
>          KBUILD_CFLAGS += -m64
>  
>          # Don't autogenerate traditional x87, MMX or SSE instructions
> -        KBUILD_CFLAGS += -mno-mmx -mno-sse -mno-80387 -mno-fp-ret-in-387
> +        KBUILD_CFLAGS += -mno-mmx -mno-sse
> +        KBUILD_CFLAGS += $(call cc-option,-mno-80387)
> +        KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387)

Is there a clang equivalent option that inhibits all things FPU opcode 
generation by the compiler?

That's the general purpose of -no-80387.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86: LLVMLinux: Wrap -mno-80387 with cc-option
  2014-04-22  6:05 ` Ingo Molnar
@ 2014-04-22  6:23   ` Behan Webster
  2014-04-22  9:42     ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Behan Webster @ 2014-04-22  6:23 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: tglx, mingo, hpa, x86, linux-kernel, torvalds, dwmw2, pageexec

On 04/21/14 23:05, Ingo Molnar wrote:
> * behanw@converseincode.com <behanw@converseincode.com> wrote:
>
>> From: Behan Webster <behanw@converseincode.com>
>>
>> Wrap -mno-80387 gcc options with cc-option so they don't break clang.
>>
>> Signed-off-by: Behan Webster <behanw@converseincode.com>
>> ---
>>   arch/x86/Makefile | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
>> index d1b7c37..ce6ad7e 100644
>> --- a/arch/x86/Makefile
>> +++ b/arch/x86/Makefile
>> @@ -83,7 +83,9 @@ else
>>           KBUILD_CFLAGS += -m64
>>   
>>           # Don't autogenerate traditional x87, MMX or SSE instructions
>> -        KBUILD_CFLAGS += -mno-mmx -mno-sse -mno-80387 -mno-fp-ret-in-387
>> +        KBUILD_CFLAGS += -mno-mmx -mno-sse
>> +        KBUILD_CFLAGS += $(call cc-option,-mno-80387)
>> +        KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387)
> Is there a clang equivalent option that inhibits all things FPU opcode
> generation by the compiler?
Not that I've found yet. Still investigating.

> That's the general purpose of -no-80387.
Yes, I understand what this is trying to accomplish. At this point I'd 
just like this new code not to break the use of clang with v3.15.

I will submit another patch which adds similar functionality when 
compiled with clang once I have that answer.

Behan

-- 
Behan Webster
behanw@converseincode.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86: LLVMLinux: Wrap -mno-80387 with cc-option
  2014-04-22  6:23   ` Behan Webster
@ 2014-04-22  9:42     ` Ingo Molnar
  0 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2014-04-22  9:42 UTC (permalink / raw)
  To: Behan Webster
  Cc: tglx, mingo, hpa, x86, linux-kernel, torvalds, dwmw2, pageexec


* Behan Webster <behanw@converseincode.com> wrote:

> On 04/21/14 23:05, Ingo Molnar wrote:
> >* behanw@converseincode.com <behanw@converseincode.com> wrote:
> >
> >>From: Behan Webster <behanw@converseincode.com>
> >>
> >>Wrap -mno-80387 gcc options with cc-option so they don't break clang.
> >>
> >>Signed-off-by: Behan Webster <behanw@converseincode.com>
> >>---
> >>  arch/x86/Makefile | 4 +++-
> >>  1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >>diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> >>index d1b7c37..ce6ad7e 100644
> >>--- a/arch/x86/Makefile
> >>+++ b/arch/x86/Makefile
> >>@@ -83,7 +83,9 @@ else
> >>          KBUILD_CFLAGS += -m64
> >>          # Don't autogenerate traditional x87, MMX or SSE instructions
> >>-        KBUILD_CFLAGS += -mno-mmx -mno-sse -mno-80387 -mno-fp-ret-in-387
> >>+        KBUILD_CFLAGS += -mno-mmx -mno-sse
> >>+        KBUILD_CFLAGS += $(call cc-option,-mno-80387)
> >>+        KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387)
> >Is there a clang equivalent option that inhibits all things FPU opcode
> >generation by the compiler?
> Not that I've found yet. Still investigating.
> 
> >That's the general purpose of -no-80387.
> Yes, I understand what this is trying to accomplish. At this point
> I'd just like this new code not to break the use of clang with
> v3.15.

Agreed.

> I will submit another patch which adds similar functionality when
> compiled with clang once I have that answer.

Thanks!

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [tip:x86/urgent] x86: LLVMLinux: Wrap -mno-80387 with cc-option
  2014-04-22  5:40 [PATCH] x86: LLVMLinux: Wrap -mno-80387 with cc-option behanw
  2014-04-22  6:05 ` Ingo Molnar
@ 2014-04-22  9:45 ` tip-bot for Behan Webster
  1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for Behan Webster @ 2014-04-22  9:45 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, behanw, tglx

Commit-ID:  8f2dd677bec68fb55904799a82674c9e64b23be3
Gitweb:     http://git.kernel.org/tip/8f2dd677bec68fb55904799a82674c9e64b23be3
Author:     Behan Webster <behanw@converseincode.com>
AuthorDate: Mon, 21 Apr 2014 22:40:27 -0700
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 22 Apr 2014 11:41:16 +0200

x86: LLVMLinux: Wrap -mno-80387 with cc-option

Wrap -mno-80387 gcc options with cc-option so they don't break
clang.

Signed-off-by: Behan Webster <behanw@converseincode.com>
Cc: torvalds@linux-foundation.org
Cc: dwmw2@infradead.org
Cc: pageexec@freemail.hu
Link: http://lkml.kernel.org/r/1398145227-25053-1-git-send-email-behanw@converseincode.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index d1b7c37..ce6ad7e 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -83,7 +83,9 @@ else
         KBUILD_CFLAGS += -m64
 
         # Don't autogenerate traditional x87, MMX or SSE instructions
-        KBUILD_CFLAGS += -mno-mmx -mno-sse -mno-80387 -mno-fp-ret-in-387
+        KBUILD_CFLAGS += -mno-mmx -mno-sse
+        KBUILD_CFLAGS += $(call cc-option,-mno-80387)
+        KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387)
 
 	# Use -mpreferred-stack-boundary=3 if supported.
 	KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=3)

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-04-22  9:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-22  5:40 [PATCH] x86: LLVMLinux: Wrap -mno-80387 with cc-option behanw
2014-04-22  6:05 ` Ingo Molnar
2014-04-22  6:23   ` Behan Webster
2014-04-22  9:42     ` Ingo Molnar
2014-04-22  9:45 ` [tip:x86/urgent] " tip-bot for Behan Webster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox