Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JIrNs-0006Ic-Nt for mharc-grub-devel@gnu.org; Sat, 26 Jan 2008 15:12:12 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JIrNq-0006IL-Hy for grub-devel@gnu.org; Sat, 26 Jan 2008 15:12:10 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JIrNo-0006I9-7s for grub-devel@gnu.org; Sat, 26 Jan 2008 15:12:09 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIrNo-0006I6-4t for grub-devel@gnu.org; Sat, 26 Jan 2008 15:12:08 -0500 Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JIrNn-0007Ks-MO for grub-devel@gnu.org; Sat, 26 Jan 2008 15:12:08 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JIrNg-0006cZ-SN for grub-devel@gnu.org; Sat, 26 Jan 2008 20:12:00 +0000 Received: from adsl-69-234-204-161.dsl.irvnca.pacbell.net ([69.234.204.161]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 26 Jan 2008 20:12:00 +0000 Received: from wa1ter by adsl-69-234-204-161.dsl.irvnca.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 26 Jan 2008 20:12:00 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: grub-devel@gnu.org From: walt Date: Sat, 26 Jan 2008 12:11:48 -0800 Organization: gmane Message-ID: <1201378308.10461.10.camel@k9.localnet> References: <20080126172120.GA4119@thorin> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: adsl-69-234-204-161.dsl.irvnca.pacbell.net In-Reply-To: <20080126172120.GA4119@thorin> X-Mailer: Evolution 2.12.3 Sender: news X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) Subject: Re: Compiling grub2 on *BSD? X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jan 2008 20:12:10 -0000 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': _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!