[Top][All Lists]

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

Re: Compiling grub2 on *BSD?

From: walt
Subject: Re: Compiling grub2 on *BSD?
Date: Sat, 26 Jan 2008 12:11:48 -0800

On Sat, 2008-01-26 at 18:21 +0100, Robert Millan wrote:
> On Sat, Jan 26, 2008 at 09:08:59AM -0800, walt wrote:
> > As a test of my tolerance for frustration I'm building grub2 on FreeBSD,
> > DragonFlyBSD, NetBSD, and OpenBSD, and (naturally) each build fails in a
> > different way, but all the problems seem related to mutations of gcc.
> > 
> > NetBSD:
> > 
> > The problem is the -nostdlib flag when linking kernel.exec.
> What is the problem initially?

kernel_img-kern_device.o: In function `grub_device_iterate':
../kern/device.c:84: undefined reference to `__enable_execute_stack'

That's defined in libgcc so I add -lgcc to the link flags:

/usr/lib/libgcc.a(_enable_execute_stack.o): In function
_enable_execute_stack.c:(.text+0x40): undefined reference to `__sysctl'
_enable_execute_stack.c:(.text+0x6f): undefined reference to `mprotect'

Both of those symbols are defined in libc.a, so I included that, too.
Any ideas?

> > FreeBSD:

Bean's lnxboot.S patch fixed this.  Thanks Bean!

> > DragonFlyBSD:

Correction:  grub2 builds correctly right out of the box.  Dunno why
I had problems the first time.  Black Magic!

reply via email to

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