Hello,

I should add a 'caveat emptor'. I've never built GRUB2 on OS X before, and, although I do not anticipate issues with the method I mentioned in my previous email, I am not guaranteeing success either. I've built my kernel both on Linux and OS X this way though, and I had no issues. My understanding is that you will have to somehow convince the GRUB2 build to use your gcc versus the system one.

Have a good day.

On Dec 3, 2005, at 8:49 PM, Andre Smith wrote:

Thanks Much! I will build that tool chain and rebuild GRUB2.


On Dec 3, 2005, at 9:05 PM, Andrei Warkentin wrote:

Hello,

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.

Andre


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

Andre Smith <[EMAIL PROTECTED]> 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:

http://lists.apple.com/archives/Xcode-users/2005/Nov/msg00267.html

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.

--
Marco



_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel




_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel



_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel




_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel



_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to