[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Broken Build on Mac OS X

From: Andrei Warkentin
Subject: Re: Broken Build on Mac OS X
Date: Sat, 3 Dec 2005 20:05:17 -0600


I would suggest building a bootstrap gcc powerpc crosscompiler and binutils, where the the host is your OS X system and the target is powerpc-linux. This will allow you to build PowerPC ELF objects, which you can then boot with OF. It is my understanding that the GRUB2 PowerPC build pretty much assumes ELF. OpenFirmware is now capable of running Mach-O executables, but I have never tried that.

Here is the configure
command I passed to configure GCC4 prior to compiling -

../gcc-4.0.2/configure --target=powerpc-linux
--prefix=/Users/andreywarkentin/crossdev/powerpc-linux --disable- shared --disable-threads
--enable-languages=c,c++ --with-newlib

On Dec 3, 2005, at 11:30 AM, Andre Smith wrote:

Thank you for that information Marco. I will get on the gcc mailing list to see if there is a known process for re-enabling nested functions. I swear that really bites, and I wish Apple used some sort of flag to disable that feature. If I find out something positive, I'll report back to GRUB2 list.


On Dec 3, 2005, at 8:00 AM, Marco Gerards wrote:

Andre Smith <address@hidden> writes:

gcc -Icommands -Igrub2/commands -I. -Iinclude -Igrub2/include - Wall -
W -DGRUB_DATADIR=\"/usr/local/share/grub/powerpc-ieee1275\" -g -O2 -
DGRUB_UTIL=1  -c -o grub_emu-commands_help.o grub2/commands/help.c
grub2/commands/help.c: In function 'grub_cmd_help':
grub2/commands/help.c:42: error: nested functions are not supported
on MacOSX
grub2/commands/help.c:65: error: nested functions are not supported
on MacOSX
make: *** [grub_emu-commands_help.o] Error 1

After searching a bit with google, I found this thread:

It seems that the apple version of gcc (?) had nested functions
disabled because of the executable stack.  It seems to me that this
was done by the apple developers and not by the gcc developers.

The reason they did this was because they was to disable executable
stacks.  And the way they did seems quite awkward to me.  Instead of
disabling it by default they just disabled it completely.  You might
have to consider building gcc yourself or using an older version.


Grub-devel mailing list

Grub-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]