From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JP4z6-0005it-OQ for mharc-grub-devel@gnu.org; Tue, 12 Feb 2008 18:56:20 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JP4z4-0005g6-6W for grub-devel@gnu.org; Tue, 12 Feb 2008 18:56:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JP4z2-0005ei-QZ for grub-devel@gnu.org; Tue, 12 Feb 2008 18:56:17 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JP4z2-0005eV-Ml for grub-devel@gnu.org; Tue, 12 Feb 2008 18:56:16 -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 1JP4z2-0007ov-67 for grub-devel@gnu.org; Tue, 12 Feb 2008 18:56:16 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JP4yy-0001La-A0 for grub-devel@gnu.org; Tue, 12 Feb 2008 23:56:12 +0000 Received: from adsl-69-234-229-173.dsl.irvnca.pacbell.net ([69.234.229.173]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 12 Feb 2008 23:56:12 +0000 Received: from wa1ter by adsl-69-234-229-173.dsl.irvnca.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 12 Feb 2008 23:56:12 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: grub-devel@gnu.org From: walt Date: Tue, 12 Feb 2008 15:56:06 -0800 Message-ID: <1202860566.26121.6.camel@k9.localnet> References: <1202074413.560.7.camel@k9.localnet> <874pco90mm.fsf@xs4all.nl> <200802120822.11993.okuji@enbug.org> 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-229-173.dsl.irvnca.pacbell.net In-Reply-To: <200802120822.11993.okuji@enbug.org> 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: [PATCH] to make grub2 compile on NetBSD 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: Tue, 12 Feb 2008 23:56:18 -0000 On Tue, 2008-02-12 at 08:22 +0100, Yoshinori K. Okuji wrote: > On Monday 11 February 2008 23:44, walt wrote: > > On Mon, 2008-02-04 at 16:56 +0100, Marco Gerards wrote: > > > walt writes: > > > > NetBSD's gcc wants libgcc and libc to define __enable_execute_stack, > > > > but this is useless for a free-standing executable like grub. Define > > > > a dummy function in lieu of libgcc to supply __enable_execute_stack. > > > > > > ... If this is for NetBSD only, > > > shouldn't you add a #ifdef instead of a comment? > > > > Third try: > > > > 2008-??-?? walt > > > > Make NetBSD's gcc happy. Based on pkgsrc/wip/grub2 patches. > > > > * include/grub/mm.h > > [__NetBSD__] (__enable_execute_stack): New function prototype. > > * kern/mm.c > > [__NetBSD__] (__enable_execute_stack): New function. > > I don't strongly object to this way, but I feel that it would be better to > probe if __enable_execute_stack must be defined, and define a variable in > configure, instead of hardcoding __NetBSD__. That sounds excellent -- I hate adding ifdefs for specific operating systems because it just disguises the real problem instead of solving it. This is a link-time error, and I have no clue how to detect it at configure time. Please show me how you would do it. Thanks!