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

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Srowen
Member
Member
Posts: 60
Joined: Thu Feb 26, 2009 2:31 pm
Location: Genova, ITALY

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

Post 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?
Last edited by Srowen on Sat Sep 05, 2009 2:54 pm, edited 1 time in total.
tarrox
Posts: 19
Joined: Wed Dec 31, 2008 8:40 am

Re: The new Snow Leopard and build the cross compiler

Post 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.
jesseg
Posts: 1
Joined: Thu Sep 03, 2009 10:07 pm

Re: The new Snow Leopard and build the cross compiler

Post by jesseg »

I'm getting the exact same error on Snow Leopard. I tried disabling werror, but no luck.
Srowen
Member
Member
Posts: 60
Joined: Thu Feb 26, 2009 2:31 pm
Location: Genova, ITALY

Re: The new Snow Leopard and build the cross compiler

Post 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..
User avatar
Firestryke31
Member
Member
Posts: 550
Joined: Sat Nov 29, 2008 1:07 pm
Location: Throw a dart at central Texas
Contact:

Re: The new Snow Leopard and build the cross compiler

Post 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...
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
Srowen
Member
Member
Posts: 60
Joined: Thu Feb 26, 2009 2:31 pm
Location: Genova, ITALY

Re: The new Snow Leopard and build the cross compiler

Post by Srowen »

maybe if some mac user can post his cross-compiler i could work..
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: The new Snow Leopard and build the cross compiler

Post 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*).
torshie
Member
Member
Posts: 89
Joined: Sun Jan 11, 2009 7:41 pm

Re: The new Snow Leopard and build the cross compiler

Post by torshie »

Try configure switch --disable-werror
Srowen
Member
Member
Posts: 60
Joined: Thu Feb 26, 2009 2:31 pm
Location: Genova, ITALY

Re: The new Snow Leopard and build the cross compiler

Post by Srowen »

torshie wrote:Try configure switch --disable-werror
it seems to work.. now i try to compile my kernel...
Srowen
Member
Member
Posts: 60
Joined: Thu Feb 26, 2009 2:31 pm
Location: Genova, ITALY

Re: The new Snow Leopard and build the cross compiler

Post by Srowen »

it works! Thanks a lot!
Post Reply