[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issues w/ cross-compiling
From: |
mpsuzuki |
Subject: |
Re: Issues w/ cross-compiling |
Date: |
Fri, 11 Jul 2008 17:43:59 +0900 |
On Thu, 10 Jul 2008 20:23:54 +0200
Ralf Wildenhues <address@hidden> wrote:
>* address@hidden wrote on Wed, Jul 09, 2008 at 09:24:46AM CEST:
>> On Tue, 8 Jul 2008 22:57:24 +0200 Ralf Wildenhues wrote:
>> >
>> >If you have a way to actually execute code on the compile
>> >system (get binfmt to execute 'elksemu $binary' should be
>> >possible), then you can avoid compile-only tests and make
>> >AC_COMPUTE_INT use the cheaper execution test.
> However, you can tell your system admin
>to enable binfmt_misc support for 8086 binaries. On my system
>it works like this (as root):
>
> modprobe binfmt_misc
> echo ':i86-elks:M::\x01\x03\x20\x00:\xff\xff\xff\x83:/lib/elksemu:' \
> > /proc/sys/fs/binfmt_misc/register
>
>and causes the kernel to just start elksemu when an 8086
>binary is exec'ed. That means to you, and to configure scripts,
>it looks like those binaries can be executed natively, thus
>the cross-compile sections of the configure script won't be used,
>thus the AC_COMPILE_INT computations will be correct for this case.
>
>Hope that helps.
Again, thank you very much. In my case, on Debian GNU/Linux,
the setup to execute ELKS binary via binfmt_misc was following:
modprobe binfmt_misc
mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
echo ':i86-elks:M::\x01\x03\x20\x00:\xff\xff\xff\x83:/usr/bin/elksemu:'\
> /proc/sys/fs/binfmt_misc/register
After this registration, I could execute ELKS binary as if
on native environment. AC_CHECK_SIZEOF() worked correctly
for int and long, they are detected as 16-bit and 32-bit.
That's what I wanted to do!
>FWIW, I've started working on a patch against Autoconf to support
>bcc better, but it will be a bit before it's finished, because
>essentially, this compiler is *really* unpredictable when compared
>to, say, GCC. bcc definitely needs some work, too.
Fully I agree. After the successful execution of configure script,
I found many cpp techniques in FreeType2 didn't work correctly in
bcc's cpp. Oops. Although my interest was not ELKS + bcc itself,
I will have to search the current maintainer of bcc.
Regards,
mpsuzuki
- Issues w/ cross-compiling, Philip A. Prindeville, 2008/07/08
- Re: Issues w/ cross-compiling, Andreas Schwab, 2008/07/08
- Re: Issues w/ cross-compiling, mpsuzuki, 2008/07/08
- Re: Issues w/ cross-compiling, Ralf Wildenhues, 2008/07/08
- Re: Issues w/ cross-compiling, Philip A. Prindeville, 2008/07/08
- Re: Issues w/ cross-compiling, Ralf Wildenhues, 2008/07/08
- Re: Issues w/ cross-compiling, Philip A. Prindeville, 2008/07/08
- Re: Issues w/ cross-compiling, Ralf Wildenhues, 2008/07/09
- Re: Issues w/ cross-compiling, mpsuzuki, 2008/07/09
- Re: Issues w/ cross-compiling, Ralf Wildenhues, 2008/07/10
- Re: Issues w/ cross-compiling,
mpsuzuki <=