public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 32bit builds on x86-64 host.
@ 2007-10-29 23:32 Dave Jones
  2007-10-30  0:06 ` Al Viro
  2007-10-30  0:07 ` H. Peter Anvin
  0 siblings, 2 replies; 9+ messages in thread
From: Dave Jones @ 2007-10-29 23:32 UTC (permalink / raw)
  To: Linux Kernel; +Cc: Sam Ravnborg

Before the arch merge, I frequently would test 32bit compiles
by doing make ARCH=i386 {bzImage/modules/file.o}

Since commit 47572387d58a9584c60ebbbdee56fc92c627f16f
how does one do this?

	Dave

-- 
http://www.codemonkey.org.uk

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

* Re: 32bit builds on x86-64 host.
  2007-10-29 23:32 32bit builds on x86-64 host Dave Jones
@ 2007-10-30  0:06 ` Al Viro
  2007-10-30  0:07 ` H. Peter Anvin
  1 sibling, 0 replies; 9+ messages in thread
From: Al Viro @ 2007-10-30  0:06 UTC (permalink / raw)
  To: Dave Jones, Linux Kernel, Sam Ravnborg

On Mon, Oct 29, 2007 at 07:32:31PM -0400, Dave Jones wrote:
> Before the arch merge, I frequently would test 32bit compiles
> by doing make ARCH=i386 {bzImage/modules/file.o}
> 
> Since commit 47572387d58a9584c60ebbbdee56fc92c627f16f
> how does one do this?

Same.  Top-level makefile kludges around that:

SRCARCH         := $(ARCH)

# for i386 and x86_64 we use SRCARCH equal to x86
SRCARCH := $(if $(filter x86_64 i386,$(SRCARCH)),x86,$(SRCARCH))

and then plays with both ARCH and SRCARCH.  Note
# If a arch/$(SRCARCH)/Kconfig.$(ARCH) file exist use it
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/Kconfig.$(ARCH)),)
        Kconfig := arch/$(SRCARCH)/Kconfig.$(ARCH)
else
        Kconfig := arch/$(SRCARCH)/Kconfig
endif

in scripts/kconfig/Makefile, BTW - now we use arch/x86/Kconfig.i386 and
arch/x86/Kconfig.x86_64 as starting points for ARCH=i386 and ARCH=x86_64
resp.

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

* Re: 32bit builds on x86-64 host.
  2007-10-29 23:32 32bit builds on x86-64 host Dave Jones
  2007-10-30  0:06 ` Al Viro
@ 2007-10-30  0:07 ` H. Peter Anvin
  2007-10-30  0:39   ` Dave Jones
  2007-10-30 13:10   ` Christoph Hellwig
  1 sibling, 2 replies; 9+ messages in thread
From: H. Peter Anvin @ 2007-10-30  0:07 UTC (permalink / raw)
  To: Dave Jones, Linux Kernel, Sam Ravnborg

Dave Jones wrote:
> Before the arch merge, I frequently would test 32bit compiles
> by doing make ARCH=i386 {bzImage/modules/file.o}
> 
> Since commit 47572387d58a9584c60ebbbdee56fc92c627f16f
> how does one do this?
> 

make ARCH=i386 {bzImage/modules/file.o}

Amazing, isn't it?

	-hpa

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

* Re: 32bit builds on x86-64 host.
  2007-10-30  0:07 ` H. Peter Anvin
@ 2007-10-30  0:39   ` Dave Jones
  2007-10-30 13:10   ` Christoph Hellwig
  1 sibling, 0 replies; 9+ messages in thread
From: Dave Jones @ 2007-10-30  0:39 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Linux Kernel, Sam Ravnborg

On Mon, Oct 29, 2007 at 05:07:08PM -0700, H. Peter Anvin wrote:
 > Dave Jones wrote:
 > > Before the arch merge, I frequently would test 32bit compiles
 > > by doing make ARCH=i386 {bzImage/modules/file.o}
 > > 
 > > Since commit 47572387d58a9584c60ebbbdee56fc92c627f16f
 > > how does one do this?
 > > 
 > 
 > make ARCH=i386 {bzImage/modules/file.o}
 > 
 > Amazing, isn't it?

It's like the future.   I'm not sure why that didn't work for me.
Must be something in my dirty tree.

	Dave
-- 
http://www.codemonkey.org.uk

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

* Re: 32bit builds on x86-64 host.
  2007-10-30  0:07 ` H. Peter Anvin
  2007-10-30  0:39   ` Dave Jones
@ 2007-10-30 13:10   ` Christoph Hellwig
  2007-10-31  1:00     ` Jeremy Fitzhardinge
  1 sibling, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2007-10-30 13:10 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Dave Jones, Linux Kernel, Sam Ravnborg

On Mon, Oct 29, 2007 at 05:07:08PM -0700, H. Peter Anvin wrote:
> Dave Jones wrote:
> >Before the arch merge, I frequently would test 32bit compiles
> >by doing make ARCH=i386 {bzImage/modules/file.o}
> >
> >Since commit 47572387d58a9584c60ebbbdee56fc92c627f16f
> >how does one do this?
> >
> 
> make ARCH=i386 {bzImage/modules/file.o}

Which seems rather unnatural to me.  All other merge architectures have
ARCH=<archdir> where archdir is the name under arch, e.g. mips, powerpc,
s390.  They then have a CONFIG_FOO_64 and set the utsname and -m32/-m64
respectively.  It would be nice if x86 could behave like all other
architectures in this respect.  Especially as the behaviour of the other
architectures is a lot more intuitive.

> 
> Amazing, isn't it?
> 
> 	-hpa
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
---end quoted text---

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

* Re: 32bit builds on x86-64 host.
  2007-10-30 13:10   ` Christoph Hellwig
@ 2007-10-31  1:00     ` Jeremy Fitzhardinge
  2007-10-31  1:11       ` H. Peter Anvin
  2007-10-31  8:57       ` Christoph Hellwig
  0 siblings, 2 replies; 9+ messages in thread
From: Jeremy Fitzhardinge @ 2007-10-31  1:00 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: H. Peter Anvin, Dave Jones, Linux Kernel, Sam Ravnborg

Christoph Hellwig wrote:
> Which seems rather unnatural to me.  All other merge architectures have
> ARCH=<archdir> where archdir is the name under arch, e.g. mips, powerpc,
> s390.  They then have a CONFIG_FOO_64 and set the utsname and -m32/-m64
> respectively.  It would be nice if x86 could behave like all other
> architectures in this respect.  Especially as the behaviour of the other
> architectures is a lot more intuitive.
>   

Yes, that would be nice.  I keep forgetting the ARCH= in my crossbuild
trees, and end up with strange mismashes.

    J

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

* Re: 32bit builds on x86-64 host.
  2007-10-31  1:00     ` Jeremy Fitzhardinge
@ 2007-10-31  1:11       ` H. Peter Anvin
  2007-10-31  8:57       ` Christoph Hellwig
  1 sibling, 0 replies; 9+ messages in thread
From: H. Peter Anvin @ 2007-10-31  1:11 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Christoph Hellwig, Dave Jones, Linux Kernel, Sam Ravnborg

Jeremy Fitzhardinge wrote:
> Christoph Hellwig wrote:
>> Which seems rather unnatural to me.  All other merge architectures have
>> ARCH=<archdir> where archdir is the name under arch, e.g. mips, powerpc,
>> s390.  They then have a CONFIG_FOO_64 and set the utsname and -m32/-m64
>> respectively.  It would be nice if x86 could behave like all other
>> architectures in this respect.  Especially as the behaviour of the other
>> architectures is a lot more intuitive.
>>   
> 
> Yes, that would be nice.  I keep forgetting the ARCH= in my crossbuild
> trees, and end up with strange mismashes.
> 

That, however, is a bigger problem that also affects, for example, 
compiling for MIPS on an x86 host.  I believe Sam is working on a 
solution for that.

(That doesn't mean that is not the right thing to do.)

	-hpa

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

* Re: 32bit builds on x86-64 host.
  2007-10-31  1:00     ` Jeremy Fitzhardinge
  2007-10-31  1:11       ` H. Peter Anvin
@ 2007-10-31  8:57       ` Christoph Hellwig
  2007-10-31  9:41         ` Sam Ravnborg
  1 sibling, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2007-10-31  8:57 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Christoph Hellwig, H. Peter Anvin, Dave Jones, Linux Kernel,
	Sam Ravnborg

On Tue, Oct 30, 2007 at 06:00:01PM -0700, Jeremy Fitzhardinge wrote:
> Christoph Hellwig wrote:
> > Which seems rather unnatural to me.  All other merge architectures have
> > ARCH=<archdir> where archdir is the name under arch, e.g. mips, powerpc,
> > s390.  They then have a CONFIG_FOO_64 and set the utsname and -m32/-m64
> > respectively.  It would be nice if x86 could behave like all other
> > architectures in this respect.  Especially as the behaviour of the other
> > architectures is a lot more intuitive.
> >   
> 
> Yes, that would be nice.  I keep forgetting the ARCH= in my crossbuild
> trees, and end up with strange mismashes.

That's a problem with all architectures currently.  But I think Sam has
a patch that at least stores ARCH when using objdir != srcdir builds.


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

* Re: 32bit builds on x86-64 host.
  2007-10-31  8:57       ` Christoph Hellwig
@ 2007-10-31  9:41         ` Sam Ravnborg
  0 siblings, 0 replies; 9+ messages in thread
From: Sam Ravnborg @ 2007-10-31  9:41 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Jeremy Fitzhardinge, H. Peter Anvin, Dave Jones, Linux Kernel

On Wed, Oct 31, 2007 at 08:57:39AM +0000, Christoph Hellwig wrote:
> On Tue, Oct 30, 2007 at 06:00:01PM -0700, Jeremy Fitzhardinge wrote:
> > Christoph Hellwig wrote:
> > > Which seems rather unnatural to me.  All other merge architectures have
> > > ARCH=<archdir> where archdir is the name under arch, e.g. mips, powerpc,
> > > s390.  They then have a CONFIG_FOO_64 and set the utsname and -m32/-m64
> > > respectively.  It would be nice if x86 could behave like all other
> > > architectures in this respect.  Especially as the behaviour of the other
> > > architectures is a lot more intuitive.
> > >   
> > 
> > Yes, that would be nice.  I keep forgetting the ARCH= in my crossbuild
> > trees, and end up with strange mismashes.
> 
> That's a problem with all architectures currently.  But I think Sam has
> a patch that at least stores ARCH when using objdir != srcdir builds.
kbuild check's the asm symlink and error out if it is wrong.
So forgetting ARCH should be captured. But the check does not
store ARCH which is what I hope to have fixed for next merge window.

So for now if you forget ARCH you should be warned.
And in the future kbuild will remember what ARCH (and CROSS_COMPILE)
you used when configuring the kernel.

For x86 the current check does not help use because the asm symlink
is the same for i386 and x86_64 - so for now we are out of luck.

	Sam

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

end of thread, other threads:[~2007-10-31  9:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-29 23:32 32bit builds on x86-64 host Dave Jones
2007-10-30  0:06 ` Al Viro
2007-10-30  0:07 ` H. Peter Anvin
2007-10-30  0:39   ` Dave Jones
2007-10-30 13:10   ` Christoph Hellwig
2007-10-31  1:00     ` Jeremy Fitzhardinge
2007-10-31  1:11       ` H. Peter Anvin
2007-10-31  8:57       ` Christoph Hellwig
2007-10-31  9:41         ` Sam Ravnborg

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