From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JOhNM-0005zG-KK for mharc-grub-devel@gnu.org; Mon, 11 Feb 2008 17:43:48 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JOhNK-0005z4-Mo for grub-devel@gnu.org; Mon, 11 Feb 2008 17:43:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JOhNK-0005yW-12 for grub-devel@gnu.org; Mon, 11 Feb 2008 17:43:46 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOhNJ-0005yO-Hg for grub-devel@gnu.org; Mon, 11 Feb 2008 17:43:45 -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 1JOhNJ-0008Vo-5D for grub-devel@gnu.org; Mon, 11 Feb 2008 17:43:45 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JOhNG-0004fK-NW for grub-devel@gnu.org; Mon, 11 Feb 2008 22:43:42 +0000 Received: from adsl-69-234-204-125.dsl.irvnca.pacbell.net ([69.234.204.125]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Feb 2008 22:43:42 +0000 Received: from wa1ter by adsl-69-234-204-125.dsl.irvnca.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Feb 2008 22:43:42 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: grub-devel@gnu.org From: walt Date: Mon, 11 Feb 2008 14:44:18 -0800 Organization: none Message-ID: References: <1202074413.560.7.camel@k9.localnet> <874pco90mm.fsf@xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: adsl-69-234-204-125.dsl.irvnca.pacbell.net User-Agent: Thunderbird 3.0a1pre (X11/2008021105) In-Reply-To: <874pco90mm.fsf@xs4all.nl> 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: Mon, 11 Feb 2008 22:43:46 -0000 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. Index: include/grub/mm.h =================================================================== RCS file: /sources/grub/grub2/include/grub/mm.h,v retrieving revision 1.8 diff -u -r1.8 mm.h --- include/grub/mm.h 21 Jul 2007 23:32:22 -0000 1.8 +++ include/grub/mm.h 4 Feb 2008 20:05:36 -0000 @@ -34,6 +34,11 @@ void *EXPORT_FUNC(grub_realloc) (void *ptr, grub_size_t size); void *EXPORT_FUNC(grub_memalign) (grub_size_t align, grub_size_t size); +#ifdef __NetBSD__ +/* Dummy symbol to make gcc happy. */ +void EXPORT_FUNC(__enable_execute_stack) (void); +#endif + /* For debugging. */ #if defined(MM_DEBUG) && !defined(GRUB_UTIL) /* Set this variable to 1 when you want to trace all memory function calls. */ Index: kern/mm.c =================================================================== RCS file: /sources/grub/grub2/kern/mm.c,v retrieving revision 1.19 diff -u -r1.19 mm.c --- kern/mm.c 23 Jan 2008 14:57:40 -0000 1.19 +++ kern/mm.c 4 Feb 2008 20:05:36 -0000 @@ -66,6 +66,14 @@ #include #include +#ifdef __NetBSD__ +/* Dummy symbol to make gcc happy. */ +void +__enable_execute_stack (void) +{ +} +#endif + #ifdef MM_DEBUG # undef grub_malloc # undef grub_realloc