Page 1 of 1

The new Snow Leopard and build the cross compiler [solved]

Posted: Thu Sep 03, 2009 1:52 pm
by Srowen
Hi everyone..
i've installed the new snow leopard and now i'm trying to build the gcc cross compiler. I follow the tutorial in the wiki; I've compiled the GMP and MPFR library and they are ok.
Now I download the binutils-2.19 (that is the last release) and i tried to compile it, following the tutorial. While i use the command

Code: Select all

make all
it end with this code:

Code: Select all

gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.19/binutils -I. -I. -I../../binutils-2.19/binutils -I../bfd -I../../binutils-2.19/binutils/../bfd -I../../binutils-2.19/binutils/../include -DLOCALEDIR="\"/usr/cross/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation   -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c ../../binutils-2.19/binutils/strings.c
cc1: warnings being treated as errors
../../binutils-2.19/binutils/strings.c: In function ‘strings_file’:
../../binutils-2.19/binutils/strings.c:407: warning: ‘stat64’ is deprecated (declared at /usr/include/sys/stat.h:465)
make[4]: *** [strings.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-binutils] Error 2
make: *** [all] Error 2
there's any solution to this error?

Re: The new Snow Leopard and build the cross compiler

Posted: Thu Sep 03, 2009 3:13 pm
by tarrox
You could delete the "-Werror" flag, with this the Warning isn't an error anymore and the make will not stop. But I don't know if it is a good idea^^, but a good way to try.

Re: The new Snow Leopard and build the cross compiler

Posted: Thu Sep 03, 2009 10:09 pm
by jesseg
I'm getting the exact same error on Snow Leopard. I tried disabling werror, but no luck.

Re: The new Snow Leopard and build the cross compiler

Posted: Fri Sep 04, 2009 1:54 am
by Srowen
jesseg wrote:I'm getting the exact same error on Snow Leopard. I tried disabling werror, but no luck.

the same for me..
maybe i could compile my kernel in the mach-o format and try to boot it with a my bootloader..

Re: The new Snow Leopard and build the cross compiler

Posted: Fri Sep 04, 2009 9:37 am
by Firestryke31
If you do decide to do that then Chameleon is a relatively nice bootloader for PCs. It supports FAT32 and HFS+ natively, but requires a MBR or GPT partitioned setup, meaning no floppies and some extra hackery for disk images. It is heavily geared towards booting OS X on non-Apple hardware, but in theory it should be able to boot any Mach-O formatted executable. With Snow Leopard and it's 64-bit kernel I think it might even support long mode too.

I'm planning on using it for my OS once I can handle an MBR-partitioned disk image.

On a real Mac, the normal boot system should work fine too...

Re: The new Snow Leopard and build the cross compiler

Posted: Fri Sep 04, 2009 9:50 am
by Srowen
maybe if some mac user can post his cross-compiler i could work..

Re: The new Snow Leopard and build the cross compiler

Posted: Fri Sep 04, 2009 6:41 pm
by pcmattman
I tried disabling werror, but no luck.
You must disable -Werror in the top-level Makefile and the Makefile in <build dir>/binutils or else the change won't have any effect (another reason why recursive Makefiles *suck*).

Re: The new Snow Leopard and build the cross compiler

Posted: Fri Sep 04, 2009 7:56 pm
by torshie
Try configure switch --disable-werror

Re: The new Snow Leopard and build the cross compiler

Posted: Sat Sep 05, 2009 2:41 pm
by Srowen
torshie wrote:Try configure switch --disable-werror
it seems to work.. now i try to compile my kernel...

Re: The new Snow Leopard and build the cross compiler

Posted: Sat Sep 05, 2009 2:53 pm
by Srowen
it works! Thanks a lot!