public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] [-next] Makefile: Do not call cc-option before including the arch's Makefile
@ 2012-05-12 20:39 Geert Uytterhoeven
  2012-05-13  1:01 ` Andi Kleen
  2012-05-20  9:27 ` Sam Ravnborg
  0 siblings, 2 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2012-05-12 20:39 UTC (permalink / raw)
  To: linux-kernel, linux-arch
  Cc: Geert Uytterhoeven, Andi Kleen, H. Peter Anvin, Michal Marek,
	linux-kbuild

On architectures that setup CROSS_COMPILE in their arch/*/Makefile
(blackfin, h8300, m68k, mips, parisc, score, sh, tile, unicore32, xtensa),
cc-option may check against the wrong compiler, causing errors like

cc1: error: unrecognized command line option "-fno-ipa-cp-clone"

if the host gcc supports -fno-ipa-cp-clone, while the cross compiler
doesn't support that option.

Move the CONFIG_READABLE_ASM section below the inclusion of the arch's
Makefile to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org
---
 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index d17a616..77355ba 100644
--- a/Makefile
+++ b/Makefile
@@ -561,6 +561,8 @@ else
 KBUILD_CFLAGS	+= -O2
 endif
 
+include $(srctree)/arch/$(SRCARCH)/Makefile
+
 ifdef CONFIG_READABLE_ASM
 # Disable optimizations that make assembler listings hard to read.
 # reorder blocks reorders the control in the function
@@ -571,8 +573,6 @@ KBUILD_CFLAGS += $(call cc-option,-fno-reorder-blocks,) \
                  $(call cc-option,-fno-partial-inlining)
 endif
 
-include $(srctree)/arch/$(SRCARCH)/Makefile
-
 ifneq ($(CONFIG_FRAME_WARN),0)
 KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
 endif
-- 
1.7.0.4


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

* Re: [PATCH 1/4] [-next] Makefile: Do not call cc-option before including the arch's Makefile
  2012-05-12 20:39 [PATCH 1/4] [-next] Makefile: Do not call cc-option before including the arch's Makefile Geert Uytterhoeven
@ 2012-05-13  1:01 ` Andi Kleen
  2012-05-20  9:27 ` Sam Ravnborg
  1 sibling, 0 replies; 9+ messages in thread
From: Andi Kleen @ 2012-05-13  1:01 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-kernel, linux-arch, H. Peter Anvin, Michal Marek,
	linux-kbuild

On Sat, May 12, 2012 at 10:39:05PM +0200, Geert Uytterhoeven wrote:
> On architectures that setup CROSS_COMPILE in their arch/*/Makefile
> (blackfin, h8300, m68k, mips, parisc, score, sh, tile, unicore32, xtensa),
> cc-option may check against the wrong compiler, causing errors like
> 
> cc1: error: unrecognized command line option "-fno-ipa-cp-clone"
> 
> if the host gcc supports -fno-ipa-cp-clone, while the cross compiler
> doesn't support that option.
> 
> Move the CONFIG_READABLE_ASM section below the inclusion of the arch's
> Makefile to fix this.

Thanks Geert for tracking that down.

Michael, are the patches already in the queue or should I resubmit them?

-Andi

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

* Re: [PATCH 1/4] [-next] Makefile: Do not call cc-option before including the arch's Makefile
  2012-05-12 20:39 [PATCH 1/4] [-next] Makefile: Do not call cc-option before including the arch's Makefile Geert Uytterhoeven
  2012-05-13  1:01 ` Andi Kleen
@ 2012-05-20  9:27 ` Sam Ravnborg
  2012-05-25 12:29   ` Michal Marek
  1 sibling, 1 reply; 9+ messages in thread
From: Sam Ravnborg @ 2012-05-20  9:27 UTC (permalink / raw)
  To: Geert Uytterhoeven, Michal Marek
  Cc: linux-kernel, linux-arch, Andi Kleen, H. Peter Anvin,
	linux-kbuild

On Sat, May 12, 2012 at 10:39:05PM +0200, Geert Uytterhoeven wrote:
> On architectures that setup CROSS_COMPILE in their arch/*/Makefile
> (blackfin, h8300, m68k, mips, parisc, score, sh, tile, unicore32, xtensa),
> cc-option may check against the wrong compiler, causing errors like
> 
> cc1: error: unrecognized command line option "-fno-ipa-cp-clone"
> 
> if the host gcc supports -fno-ipa-cp-clone, while the cross compiler
> doesn't support that option.
> 
> Move the CONFIG_READABLE_ASM section below the inclusion of the arch's
> Makefile to fix this.
> 
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Andi Kleen <ak@linux.intel.com>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Michal Marek <mmarek@suse.cz>
> Cc: linux-kbuild@vger.kernel.org

Michal - was this serie ever applied to kbuild?

Acked-by: Sam Ravnborg <sam@ravnborg.org>

	Sam

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

* Re: [PATCH 1/4] [-next] Makefile: Do not call cc-option before including the arch's Makefile
  2012-05-20  9:27 ` Sam Ravnborg
@ 2012-05-25 12:29   ` Michal Marek
  2012-05-25 20:29     ` Sam Ravnborg
  2012-05-25 20:32     ` H. Peter Anvin
  0 siblings, 2 replies; 9+ messages in thread
From: Michal Marek @ 2012-05-25 12:29 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Geert Uytterhoeven, linux-kernel, linux-arch, Andi Kleen,
	H. Peter Anvin, linux-kbuild

Dne 20.5.2012 11:27, Sam Ravnborg napsal(a):
> On Sat, May 12, 2012 at 10:39:05PM +0200, Geert Uytterhoeven wrote:
>> On architectures that setup CROSS_COMPILE in their arch/*/Makefile
>> (blackfin, h8300, m68k, mips, parisc, score, sh, tile, unicore32, xtensa),
>> cc-option may check against the wrong compiler, causing errors like
>>
>> cc1: error: unrecognized command line option "-fno-ipa-cp-clone"
>>
>> if the host gcc supports -fno-ipa-cp-clone, while the cross compiler
>> doesn't support that option.
>>
>> Move the CONFIG_READABLE_ASM section below the inclusion of the arch's
>> Makefile to fix this.
>>
>> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
>> Cc: Andi Kleen <ak@linux.intel.com>
>> Cc: H. Peter Anvin <hpa@zytor.com>
>> Cc: Michal Marek <mmarek@suse.cz>
>> Cc: linux-kbuild@vger.kernel.org
> 
> Michal - was this serie ever applied to kbuild?

The first patch has to go to the tip tree, where the CONFIG_READABLE_ASM
option is introduced. The remaining patches can go to the individual
arch trees, I see Geert already pushed the m68k one.

Michal

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

* Re: [PATCH 1/4] [-next] Makefile: Do not call cc-option before including the arch's Makefile
  2012-05-25 12:29   ` Michal Marek
@ 2012-05-25 20:29     ` Sam Ravnborg
  2012-06-06  9:49       ` Ingo Molnar
  2012-05-25 20:32     ` H. Peter Anvin
  1 sibling, 1 reply; 9+ messages in thread
From: Sam Ravnborg @ 2012-05-25 20:29 UTC (permalink / raw)
  To: Michal Marek, Ingo Molnar, H. Peter Anvin, Thomas Gleixner
  Cc: Geert Uytterhoeven, linux-kernel, linux-arch, Andi Kleen,
	linux-kbuild

On Fri, May 25, 2012 at 02:29:40PM +0200, Michal Marek wrote:
> Dne 20.5.2012 11:27, Sam Ravnborg napsal(a):
> > On Sat, May 12, 2012 at 10:39:05PM +0200, Geert Uytterhoeven wrote:
> >> On architectures that setup CROSS_COMPILE in their arch/*/Makefile
> >> (blackfin, h8300, m68k, mips, parisc, score, sh, tile, unicore32, xtensa),
> >> cc-option may check against the wrong compiler, causing errors like
> >>
> >> cc1: error: unrecognized command line option "-fno-ipa-cp-clone"
> >>
> >> if the host gcc supports -fno-ipa-cp-clone, while the cross compiler
> >> doesn't support that option.
> >>
> >> Move the CONFIG_READABLE_ASM section below the inclusion of the arch's
> >> Makefile to fix this.
> >>
> >> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> >> Cc: Andi Kleen <ak@linux.intel.com>
> >> Cc: H. Peter Anvin <hpa@zytor.com>
> >> Cc: Michal Marek <mmarek@suse.cz>
> >> Cc: linux-kbuild@vger.kernel.org
> > 
> > Michal - was this serie ever applied to kbuild?
> 
> The first patch has to go to the tip tree, where the CONFIG_READABLE_ASM
> option is introduced.
OK - I had not seen this.

So tip-folks - please apply this.

	Sam

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

* Re: [PATCH 1/4] [-next] Makefile: Do not call cc-option before including the arch's Makefile
  2012-05-25 12:29   ` Michal Marek
  2012-05-25 20:29     ` Sam Ravnborg
@ 2012-05-25 20:32     ` H. Peter Anvin
  2012-05-26 10:41       ` Michal Marek
  1 sibling, 1 reply; 9+ messages in thread
From: H. Peter Anvin @ 2012-05-25 20:32 UTC (permalink / raw)
  To: Michal Marek
  Cc: Sam Ravnborg, Geert Uytterhoeven, linux-kernel, linux-arch,
	Andi Kleen, linux-kbuild

On 05/25/2012 05:29 AM, Michal Marek wrote:
>>
>> Michal - was this serie ever applied to kbuild?
> 
> The first patch has to go to the tip tree, where the CONFIG_READABLE_ASM
> option is introduced. The remaining patches can go to the individual
> arch trees, I see Geert already pushed the m68k one.
> 

OK, can you ack it, please?

	-hpa


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

* Re: [PATCH 1/4] [-next] Makefile: Do not call cc-option before including the arch's Makefile
  2012-05-25 20:32     ` H. Peter Anvin
@ 2012-05-26 10:41       ` Michal Marek
  0 siblings, 0 replies; 9+ messages in thread
From: Michal Marek @ 2012-05-26 10:41 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Sam Ravnborg, Geert Uytterhoeven, linux-kernel, linux-arch,
	Andi Kleen, linux-kbuild

"H. Peter Anvin" <hpa@zytor.com> wrote:

>On 05/25/2012 05:29 AM, Michal Marek wrote:
>>>
>>> Michal - was this serie ever applied to kbuild?
>> 
>> The first patch has to go to the tip tree, where the
>CONFIG_READABLE_ASM
>> option is introduced. The remaining patches can go to the individual
>> arch trees, I see Geert already pushed the m68k one.
>> 
>
>OK, can you ack it, please?
>
>	-hpa

Acked-by: Michal Marek <mmarek@suse.cz>
-- 
Sent from my phone. Please excuse my brevity.

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

* Re: [PATCH 1/4] [-next] Makefile: Do not call cc-option before including the arch's Makefile
  2012-05-25 20:29     ` Sam Ravnborg
@ 2012-06-06  9:49       ` Ingo Molnar
  2012-06-15 15:10         ` Michal Marek
  0 siblings, 1 reply; 9+ messages in thread
From: Ingo Molnar @ 2012-06-06  9:49 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Michal Marek, Ingo Molnar, H. Peter Anvin, Thomas Gleixner,
	Geert Uytterhoeven, linux-kernel, linux-arch, Andi Kleen,
	linux-kbuild


* Sam Ravnborg <sam@ravnborg.org> wrote:

> On Fri, May 25, 2012 at 02:29:40PM +0200, Michal Marek wrote:
> > Dne 20.5.2012 11:27, Sam Ravnborg napsal(a):
> > > On Sat, May 12, 2012 at 10:39:05PM +0200, Geert Uytterhoeven wrote:
> > >> On architectures that setup CROSS_COMPILE in their arch/*/Makefile
> > >> (blackfin, h8300, m68k, mips, parisc, score, sh, tile, unicore32, xtensa),
> > >> cc-option may check against the wrong compiler, causing errors like
> > >>
> > >> cc1: error: unrecognized command line option "-fno-ipa-cp-clone"
> > >>
> > >> if the host gcc supports -fno-ipa-cp-clone, while the cross compiler
> > >> doesn't support that option.
> > >>
> > >> Move the CONFIG_READABLE_ASM section below the inclusion of the arch's
> > >> Makefile to fix this.
> > >>
> > >> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > >> Cc: Andi Kleen <ak@linux.intel.com>
> > >> Cc: H. Peter Anvin <hpa@zytor.com>
> > >> Cc: Michal Marek <mmarek@suse.cz>
> > >> Cc: linux-kbuild@vger.kernel.org
> > > 
> > > Michal - was this serie ever applied to kbuild?
> > 
> > The first patch has to go to the tip tree, where the CONFIG_READABLE_ASM
> > option is introduced.
> OK - I had not seen this.
> 
> So tip-folks - please apply this.

it's now all upstream so you can route it via the kbuild tree I 
guess?

Thanks,

	Ingo

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

* Re: [PATCH 1/4] [-next] Makefile: Do not call cc-option before including the arch's Makefile
  2012-06-06  9:49       ` Ingo Molnar
@ 2012-06-15 15:10         ` Michal Marek
  0 siblings, 0 replies; 9+ messages in thread
From: Michal Marek @ 2012-06-15 15:10 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Sam Ravnborg, Ingo Molnar, H. Peter Anvin, Thomas Gleixner,
	Geert Uytterhoeven, linux-kernel, linux-arch, Andi Kleen,
	linux-kbuild

On 6.6.2012 11:49, Ingo Molnar wrote:
> 
> * Sam Ravnborg <sam@ravnborg.org> wrote:
> 
>> On Fri, May 25, 2012 at 02:29:40PM +0200, Michal Marek wrote:
>>> Dne 20.5.2012 11:27, Sam Ravnborg napsal(a):
>>>> On Sat, May 12, 2012 at 10:39:05PM +0200, Geert Uytterhoeven wrote:
>>>>> On architectures that setup CROSS_COMPILE in their arch/*/Makefile
>>>>> (blackfin, h8300, m68k, mips, parisc, score, sh, tile, unicore32, xtensa),
>>>>> cc-option may check against the wrong compiler, causing errors like
>>>>>
>>>>> cc1: error: unrecognized command line option "-fno-ipa-cp-clone"
>>>>>
>>>>> if the host gcc supports -fno-ipa-cp-clone, while the cross compiler
>>>>> doesn't support that option.
>>>>>
>>>>> Move the CONFIG_READABLE_ASM section below the inclusion of the arch's
>>>>> Makefile to fix this.
>>>>>
>>>>> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
>>>>> Cc: Andi Kleen <ak@linux.intel.com>
>>>>> Cc: H. Peter Anvin <hpa@zytor.com>
>>>>> Cc: Michal Marek <mmarek@suse.cz>
>>>>> Cc: linux-kbuild@vger.kernel.org
>>>>
>>>> Michal - was this serie ever applied to kbuild?
>>>
>>> The first patch has to go to the tip tree, where the CONFIG_READABLE_ASM
>>> option is introduced.
>> OK - I had not seen this.
>>
>> So tip-folks - please apply this.
> 
> it's now all upstream so you can route it via the kbuild tree I 
> guess?

I applied it to kbuild.git#rc-fixes now.

Michal

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

end of thread, other threads:[~2012-06-15 15:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-12 20:39 [PATCH 1/4] [-next] Makefile: Do not call cc-option before including the arch's Makefile Geert Uytterhoeven
2012-05-13  1:01 ` Andi Kleen
2012-05-20  9:27 ` Sam Ravnborg
2012-05-25 12:29   ` Michal Marek
2012-05-25 20:29     ` Sam Ravnborg
2012-06-06  9:49       ` Ingo Molnar
2012-06-15 15:10         ` Michal Marek
2012-05-25 20:32     ` H. Peter Anvin
2012-05-26 10:41       ` Michal Marek

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