* how to cross compile kexec for 64b x86_64 on a 32b x86
@ 2008-06-24 18:11 Srinivas Murthy
2008-06-24 18:14 ` Bernhard Walle
2008-06-24 18:52 ` Neil Horman
0 siblings, 2 replies; 10+ messages in thread
From: Srinivas Murthy @ 2008-06-24 18:11 UTC (permalink / raw)
To: kexec
Hi,
I need to cross-compile kexec-tools-1.101 for a x86_64 architecture
platform on a 32b x86.
I didn't see any instructions in the configure, etc. scripts for doing this.
Can you please let me know how to do this?
Thanks.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to cross compile kexec for 64b x86_64 on a 32b x86
2008-06-24 18:11 Srinivas Murthy
@ 2008-06-24 18:14 ` Bernhard Walle
2008-06-24 18:46 ` Srinivas Dharmasanam
2008-06-24 18:52 ` Neil Horman
1 sibling, 1 reply; 10+ messages in thread
From: Bernhard Walle @ 2008-06-24 18:14 UTC (permalink / raw)
To: Srinivas Murthy; +Cc: kexec
* "Srinivas Murthy" <codevana@gmail.com> [2008-06-24 11:11]:
>
> Hi,
> I need to cross-compile kexec-tools-1.101 for a x86_64 architecture
> platform on a 32b x86.
>
> I didn't see any instructions in the configure, etc. scripts for doing this.
gcc does not support that (like the -m32 flag when you build i386 on
x86-64). You need to build a cross compiler, and then you would pass
that via
CC=your-cross-compiler ./configure
Bernhard
--
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to cross compile kexec for 64b x86_64 on a 32b x86
2008-06-24 18:14 ` Bernhard Walle
@ 2008-06-24 18:46 ` Srinivas Dharmasanam
2008-06-24 18:50 ` Bernhard Walle
0 siblings, 1 reply; 10+ messages in thread
From: Srinivas Dharmasanam @ 2008-06-24 18:46 UTC (permalink / raw)
To: Bernhard Walle; +Cc: kexec
Tried that; it fails saying:
checking for gcc...
/gcc-3.4.5-glibc-2.3.6/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run
C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
configure:1803:
/gcc-3.4.5-glibc-2.3.6/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-gcc
conftest.c >&5
configure:1806: $? = 0
configure:1852: result: a.out
configure:1857: checking whether the C compiler works
configure:1863: ./a.out
./configure: ./a.out: No such file or directory
configure:1866: $? = 127
configure:1875: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
I dont see a conftest.c file anywhere.
On Tue, Jun 24, 2008 at 11:14 AM, Bernhard Walle <bwalle@suse.de> wrote:
> * "Srinivas Murthy" <codevana@gmail.com> [2008-06-24 11:11]:
>>
>> Hi,
>> I need to cross-compile kexec-tools-1.101 for a x86_64 architecture
>> platform on a 32b x86.
>>
>> I didn't see any instructions in the configure, etc. scripts for doing this.
>
> gcc does not support that (like the -m32 flag when you build i386 on
> x86-64). You need to build a cross compiler, and then you would pass
> that via
>
> CC=your-cross-compiler ./configure
>
>
>
> Bernhard
> --
> Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to cross compile kexec for 64b x86_64 on a 32b x86
2008-06-24 18:46 ` Srinivas Dharmasanam
@ 2008-06-24 18:50 ` Bernhard Walle
2008-06-24 23:48 ` Srinivas Murthy
0 siblings, 1 reply; 10+ messages in thread
From: Bernhard Walle @ 2008-06-24 18:50 UTC (permalink / raw)
To: Srinivas Dharmasanam; +Cc: kexec
* "Srinivas Dharmasanam" <the.srinivas@gmail.com> [2008-06-24 11:46]:
>
> Tried that; it fails saying:
>
> checking for gcc...
> /gcc-3.4.5-glibc-2.3.6/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... configure: error: cannot run
> C compiled programs.
> If you meant to cross compile, use `--host'.
> See `config.log' for more details.
Ah, right, try
./configure \
--host=x86_64-unknown-linux-gnu
--build=x86_64-unknown-linux-gnu
> I dont see a conftest.c file anywhere.
Read config.log. It's "inline", the conftest.c gets deleted on very
check.
Bernhard
--
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to cross compile kexec for 64b x86_64 on a 32b x86
2008-06-24 18:11 Srinivas Murthy
2008-06-24 18:14 ` Bernhard Walle
@ 2008-06-24 18:52 ` Neil Horman
2008-06-24 18:55 ` Bernhard Walle
1 sibling, 1 reply; 10+ messages in thread
From: Neil Horman @ 2008-06-24 18:52 UTC (permalink / raw)
To: Srinivas Murthy; +Cc: kexec
On Tue, Jun 24, 2008 at 11:11:36AM -0700, Srinivas Murthy wrote:
> Hi,
> I need to cross-compile kexec-tools-1.101 for a x86_64 architecture
> platform on a 32b x86.
>
> I didn't see any instructions in the configure, etc. scripts for doing this.
>
> Can you please let me know how to do this?
>
Mostly, you can get away with adding -m32 to the top level CFLAGS in the
makefile and running setarch i386 in the shell where you run make
Neil
> Thanks.
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
--
/***************************************************
*Neil Horman
*Software Engineer
*Red Hat, Inc.
*nhorman@redhat.com
*gpg keyid: 1024D / 0x92A74FA1
*http://pgp.mit.edu
***************************************************/
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to cross compile kexec for 64b x86_64 on a 32b x86
2008-06-24 18:52 ` Neil Horman
@ 2008-06-24 18:55 ` Bernhard Walle
2008-06-24 20:32 ` Neil Horman
0 siblings, 1 reply; 10+ messages in thread
From: Bernhard Walle @ 2008-06-24 18:55 UTC (permalink / raw)
To: Neil Horman; +Cc: kexec, Srinivas Murthy
* Neil Horman <nhorman@redhat.com> [2008-06-24 14:52]:
> On Tue, Jun 24, 2008 at 11:11:36AM -0700, Srinivas Murthy wrote:
> > Hi,
> > I need to cross-compile kexec-tools-1.101 for a x86_64 architecture
> > platform on a 32b x86.
> >
> > I didn't see any instructions in the configure, etc. scripts for doing this.
> >
> > Can you please let me know how to do this?
> >
> Mostly, you can get away with adding -m32 to the top level CFLAGS in the
> makefile and running setarch i386 in the shell where you run make
It's the other way round. Not i386 on x86-64, but x86-64 on i386.
(BTW: 'setarch' does not exist on SUSE, we use 'linux32'. I don't have
an overview about other Linux distributions. Unfortunately, that seems
to be not standardised via LSB.)
Bernhard
--
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to cross compile kexec for 64b x86_64 on a 32b x86
2008-06-24 18:55 ` Bernhard Walle
@ 2008-06-24 20:32 ` Neil Horman
0 siblings, 0 replies; 10+ messages in thread
From: Neil Horman @ 2008-06-24 20:32 UTC (permalink / raw)
To: Bernhard Walle; +Cc: Neil Horman, kexec, Srinivas Murthy
On Tue, Jun 24, 2008 at 08:55:08PM +0200, Bernhard Walle wrote:
> * Neil Horman <nhorman@redhat.com> [2008-06-24 14:52]:
> > On Tue, Jun 24, 2008 at 11:11:36AM -0700, Srinivas Murthy wrote:
> > > Hi,
> > > I need to cross-compile kexec-tools-1.101 for a x86_64 architecture
> > > platform on a 32b x86.
> > >
> > > I didn't see any instructions in the configure, etc. scripts for doing this.
> > >
> > > Can you please let me know how to do this?
> > >
> > Mostly, you can get away with adding -m32 to the top level CFLAGS in the
> > makefile and running setarch i386 in the shell where you run make
>
> It's the other way round. Not i386 on x86-64, but x86-64 on i386.
>
ah, my bad. yes, for 64 bit on a 32 bit arch, you'll certainly need a cross-cc.
Neil
--
/***************************************************
*Neil Horman
*Software Engineer
*Red Hat, Inc.
*nhorman@redhat.com
*gpg keyid: 1024D / 0x92A74FA1
*http://pgp.mit.edu
***************************************************/
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to cross compile kexec for 64b x86_64 on a 32b x86
2008-06-24 18:50 ` Bernhard Walle
@ 2008-06-24 23:48 ` Srinivas Murthy
2008-06-25 6:57 ` Bernhard Walle
0 siblings, 1 reply; 10+ messages in thread
From: Srinivas Murthy @ 2008-06-24 23:48 UTC (permalink / raw)
To: Bernhard Walle; +Cc: kexec
./configure \
--host=x86_64-unknown-linux-gnu
seems to work. The --build is if we're building on the x86_64.
It seems that I now need the crash utility also to be cross compiled.
I dont see any cross-compile support in the crash-4.0-6.3 pkg.
Any suggestions for how to cross compile the crash-4.0-6.3 for x86_64
on an x86 system.
Thanks.
On Tue, Jun 24, 2008 at 11:50 AM, Bernhard Walle <bwalle@suse.de> wrote:
> * "Srinivas Dharmasanam" <the.srinivas@gmail.com> [2008-06-24 11:46]:
>>
>> Tried that; it fails saying:
>>
>> checking for gcc...
>> /gcc-3.4.5-glibc-2.3.6/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-gcc
>> checking for C compiler default output file name... a.out
>> checking whether the C compiler works... configure: error: cannot run
>> C compiled programs.
>> If you meant to cross compile, use `--host'.
>> See `config.log' for more details.
>
> Ah, right, try
>
> ./configure \
> --host=x86_64-unknown-linux-gnu
> --build=x86_64-unknown-linux-gnu
>
>> I dont see a conftest.c file anywhere.
>
> Read config.log. It's "inline", the conftest.c gets deleted on very
> check.
>
>
> Bernhard
> --
> Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to cross compile kexec for 64b x86_64 on a 32b x86
2008-06-24 23:48 ` Srinivas Murthy
@ 2008-06-25 6:57 ` Bernhard Walle
0 siblings, 0 replies; 10+ messages in thread
From: Bernhard Walle @ 2008-06-25 6:57 UTC (permalink / raw)
To: Srinivas Murthy; +Cc: kexec
* "Srinivas Murthy" <codevana@gmail.com> [2008-06-24 16:48]:
>
> Any suggestions for how to cross compile the crash-4.0-6.3 for x86_64
> on an x86 system.
Tweak the Makefile. Or ask Dave on the crash list
(https://www.redhat.com/mailman/listinfo/crash-utility).
Bernhard
--
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to cross compile kexec for 64b x86_64 on a 32b x86
[not found] <mailman.1873.1214398996.2802.kexec@lists.infradead.org>
@ 2008-06-25 13:52 ` Dave Anderson
0 siblings, 0 replies; 10+ messages in thread
From: Dave Anderson @ 2008-06-25 13:52 UTC (permalink / raw)
To: kexec
> It seems that I now need the crash utility also to be cross compiled.
> I dont see any cross-compile support in the crash-4.0-6.3 pkg.
You got that right...
> Any suggestions for how to cross compile the crash-4.0-6.3 for x86_64
> on an x86 system.
Like Bernhard suggested, try tinkering with the compilations in the
top-level Makefile, as well as passing --host and --target arguments
to the embedded gdb's configure command when it gets built.
I'm unaware of anybody who's ever attempted it...
Dave
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-06-25 13:53 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.1873.1214398996.2802.kexec@lists.infradead.org>
2008-06-25 13:52 ` how to cross compile kexec for 64b x86_64 on a 32b x86 Dave Anderson
2008-06-24 18:11 Srinivas Murthy
2008-06-24 18:14 ` Bernhard Walle
2008-06-24 18:46 ` Srinivas Dharmasanam
2008-06-24 18:50 ` Bernhard Walle
2008-06-24 23:48 ` Srinivas Murthy
2008-06-25 6:57 ` Bernhard Walle
2008-06-24 18:52 ` Neil Horman
2008-06-24 18:55 ` Bernhard Walle
2008-06-24 20:32 ` Neil Horman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.