Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JK0y8-0007PI-E8 for mharc-grub-devel@gnu.org; Tue, 29 Jan 2008 19:38:24 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JK0y7-0007OV-1J for grub-devel@gnu.org; Tue, 29 Jan 2008 19:38:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JK0y4-0007Lo-1W for grub-devel@gnu.org; Tue, 29 Jan 2008 19:38:22 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JK0y3-0007Ld-O9 for grub-devel@gnu.org; Tue, 29 Jan 2008 19:38:19 -0500 Received: from kollasch.net ([168.103.54.221] helo=mail.kollasch.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JK0y2-00057u-Tl for grub-devel@gnu.org; Tue, 29 Jan 2008 19:38:19 -0500 Received: from kirkkit.kollasch.net (unknown [IPv6:2002:a867:36dd:1:216:3eff:fed1:27c5]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: jakllsch@KOLLASCH.NET) by mail.kollasch.net (Postfix) with ESMTP id 410773C126 for ; Wed, 30 Jan 2008 00:37:06 +0000 (UTC) Date: Tue, 29 Jan 2008 18:37:50 -0600 From: jakllsch@kollasch.net To: The development of GRUB 2 Message-ID: <20080130003750.GB1341@kirkkit.kollasch.net> References: <20080126172120.GA4119@thorin> <1201378308.10461.10.camel@k9.localnet> <20080127085650.GB11381@thorin> <20080129053051.GY1341@kirkkit.kollasch.net> <20080129134707.GF27435@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080129134707.GF27435@thorin> User-Agent: Mutt/1.5.16 (2007-06-09) X-detected-kernel: by monty-python.gnu.org: NetBSD 3.0 (DF) 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: Wed, 30 Jan 2008 00:38:23 -0000 On Tue, Jan 29, 2008 at 02:47:07PM +0100, Robert Millan wrote: > On Mon, Jan 28, 2008 at 11:30:51PM -0600, jakllsch@kollasch.net wrote: > > On Sun, Jan 27, 2008 at 09:56:50AM +0100, Robert Millan wrote: > > > On Sat, Jan 26, 2008 at 12:11:48PM -0800, walt wrote: > > > > > 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? > > > > > > Do you see this line in ./configure ? > > > > > > checking whether `gcc' accepts `-fstack-protector'... yes > > > > Yes. > > > > Apparently -fno-stack-protector doesn't actually work the way > > I/we would expect. > > > > But, I'm surprised that this doesn't affect the building > > of NetBSD's own 'stand' code. > > Maybe we need another flag? Could you check the link command in NetBSD's > kernel ? I couldn't find anything that looked like it would fix this. I believe the reason that NetBSD's own code isn't affected by this is because they (apparently) do not use nested functions in their stand-alone code. I did see OpenBSD had a -ftrampolines flag, I'm not quite sure what it exactly does, but it may be related to this. Jonathan Kollasch