From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JKCwJ-0005gh-6d for mharc-grub-devel@gnu.org; Wed, 30 Jan 2008 08:25:19 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JKCwG-0005fe-J3 for grub-devel@gnu.org; Wed, 30 Jan 2008 08:25:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JKCwF-0005ey-62 for grub-devel@gnu.org; Wed, 30 Jan 2008 08:25:16 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JKCwE-0005eu-Us for grub-devel@gnu.org; Wed, 30 Jan 2008 08:25:14 -0500 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JKCwE-0007cx-Di for grub-devel@gnu.org; Wed, 30 Jan 2008 08:25:14 -0500 Received: from [192.168.10.6] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1JKCwC-00046w-0y for grub-devel@gnu.org; Wed, 30 Jan 2008 14:25:13 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1JKCuI-00040C-TF for grub-devel@gnu.org; Wed, 30 Jan 2008 14:23:14 +0100 Date: Wed, 30 Jan 2008 14:23:14 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080130132314.GA15277@thorin> References: <20080126172120.GA4119@thorin> <1201378308.10461.10.camel@k9.localnet> <20080127085650.GB11381@thorin> <20080129053051.GY1341@kirkkit.kollasch.net> <20080129134707.GF27435@thorin> <20080130003750.GB1341@kirkkit.kollasch.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080130003750.GB1341@kirkkit.kollasch.net> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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 13:25:16 -0000 On Tue, Jan 29, 2008 at 06:37:50PM -0600, jakllsch@kollasch.net wrote: > > > > > /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. Ok, so we need __enable_execute_stack then, I guess. I find it strange that some parts of libgcc can not be used in freestanding code. Does this happen with the unpatched version of GCC too? Maybe we'll have add some dummy symbols to make it happy. I don't think any of this will be actually needed when kernel isn't present. -- Robert Millan I know my rights; I want my phone call! What use is a phone call… if you are unable to speak? (as seen on /.)