Unable to get crosstool-0.43 worked on Mac OS X

Kirill Kuvaldin kirill.kuvaldin@auriga.ru
Mon Mar 12 12:12:00 GMT 2007

On Fri, Mar 09, 2007 at 08:14:24PM +0300, Kirill Kuvaldin wrote:
> Hi there,	(please CC me on replies since I'm not subscribed yet)
> I've been trying to set up the cross compiler tool chain for Mac OS X to
> be able to compile the Linux 2.6 kernel for i386 targets.
> I've started with setting all the toolchain (binutils/gcc) and got it
> built successfully, but compiling the linux kernel ended up in an error
> at the very beginning
>   CHK     include/linux/version.h
>   CHK     include/linux/utsrelease.h
>   HOSTCC  scripts/mod/mk_elfconfig
> In file included from scripts/mod/mk_elfconfig.c:1:
> /usr/local/include/stdio.h:5:27: error: libio/stdio.h: No such file or directory
> In file included from scripts/mod/mk_elfconfig.c:1:
> /usr/local/include/stdio.h:9: error: parse error before 'size_t'
> It's not the point though. I then decided to use crosstool as a more
> general solution, but it didn't help me either. After have issued
> "eval `cat i686.dat gcc-3.4.3-glibc-2.1.3.dat` sh all.sh --notest"
> I ended up with the following:
>   ... skipped ...
>   make ARCH=i386 oldconfig
>   HOSTCC  scripts/basic/fixdep
> In file included from scripts/basic/fixdep.c:97:
> /usr/local/include/sys/types.h:1:29: error: posix/sys/types.h: No such file or d
> In file included from scripts/basic/fixdep.c:98:
> /usr/local/include/sys/stat.h:2:25: error: io/sys/stat.h: No such file or direct
> In file included from scripts/basic/fixdep.c:98:
> /usr/local/include/sys/stat.h:8: error: parse error before '__mode_t'
> /usr/local/include/sys/stat.h:9: error: parse error before '__mode_t'
>    ... skipped ...
> make[1]: *** [scripts/basic/fixdep] Error 1
> make: *** [scripts_basic] Error 2
> I've tried out few different than gcc-3.4.3-glibc-2.1.3.dat
> configurations, but with no success too.
> Any ideas what I have to tweak in order to get things worked?
> 	-kuvkir
> -- 
> Make a wish, it might come true.

Mhm.. Seems these weird error occurred due to some kind of glitch with
the header files in /usr/local/include. I've fixed it and managed to
step forward, but eventually run into other issues, that I managed to
sort out.

The last thing that I've got stuck in is this one:

i686-unknown-linux-gnu-gcc  ../sysdeps/i386/i686/memcmp.S -c
-I../include -I.
-I.. -I../libio
-I../sysdeps/i386/elf -I../linuxthreads/sysdeps/unix/sysv/linux/i386
-I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread
-I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix
-I../linuxthreads/sysdeps/i386/i686 -I../linuxthreads/sysdeps/i386
-I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux
-I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386
-I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix
-I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686
-I../sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../sysdeps/i386
-I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32
-I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic
-nostdinc -isystem
-D_LIBC_REENTRANT -include ../include/libc-symbols.h       -DASSEMBLER
-DGAS_SYNTAX  -Wa,--noexecstack  -o
../sysdeps/i386/i686/memcmp.S: Assembler messages:
../sysdeps/i386/i686/memcmp.S:390: Error: can't resolve `.rodata'
{.rodata section} - `memcmp' {.text section}
make[2]: ***
Error 1
make[1]: *** [string/subdir_lib] Error 2
make: *** [lib] Error 2

Looks like there is the patch
for this, but according to my build log this patch has been applied, but
the problem hasn't gone.

I was trying to use gcc-4.1.0, glibc-2.3.6, binutils-2.15 this time.

So my ultimate question is - is there any success stories getting the
linux kernel (2.6.*) cross-compiled under Mac OS X?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3593 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20070312/28d5eb64/attachment.bin>

More information about the crossgcc mailing list