Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JM3HL-0001Rc-Qo for mharc-grub-devel@gnu.org; Mon, 04 Feb 2008 10:30:39 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JM3HJ-0001Qe-NM for grub-devel@gnu.org; Mon, 04 Feb 2008 10:30:37 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JM3HH-0001Pb-LU for grub-devel@gnu.org; Mon, 04 Feb 2008 10:30:37 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JM3HH-0001PU-Fz for grub-devel@gnu.org; Mon, 04 Feb 2008 10:30:35 -0500 Received: from smtp-vbr8.xs4all.nl ([194.109.24.28]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JM3HH-0001Yx-BC for grub-devel@gnu.org; Mon, 04 Feb 2008 10:30:35 -0500 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr8.xs4all.nl (8.13.8/8.13.8) with ESMTP id m14FUX0n009823 for ; Mon, 4 Feb 2008 16:30:33 +0100 (CET) (envelope-from mgerards@xs4all.nl) From: Marco Gerards To: The development of GRUB 2 References: <20080127085650.GB11381@thorin> <20080129053051.GY1341@kirkkit.kollasch.net> <20080129134707.GF27435@thorin> <20080130003750.GB1341@kirkkit.kollasch.net> <20080130132314.GA15277@thorin> <1201701103.17791.9.camel@k9.localnet> <20080130140017.GA16576@thorin> <1201720010.27623.26.camel@k9.localnet> <20080130215559.GC1341@kirkkit.kollasch.net> <20080131110328.GA12043@thorin> <1201900266.744.3.camel@k9.localnet> Mail-Copies-To: mgerards@xs4all.nl Date: Mon, 04 Feb 2008 16:32:22 +0100 In-Reply-To: <1201900266.744.3.camel@k9.localnet> (wa1ter@myrealbox.com's message of "Fri, 01 Feb 2008 13:11:06 -0800") Message-ID: <87hcgo91q1.fsf@xs4all.nl> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 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: Mon, 04 Feb 2008 15:30:38 -0000 walt writes: > On Thu, 2008-01-31 at 12:03 +0100, Robert Millan wrote: >> On Wed, Jan 30, 2008 at 03:55:59PM -0600, jakllsch@kollasch.net wrote: >> > On Wed, Jan 30, 2008 at 11:06:50AM -0800, walt wrote: >> > > >> > > You can tell I'm desperate because I'm putting -lgcc everywhere I can >> > > think of. Here is the symbol in libgcc.a: >> > >> > I (like I found in pkgsrc-wip/grub2) am using a fake __enable_execute_stack(), >> >> Ok, we could add that dummy __enable_execute_stack() but ... >> >> > -lgcc isn't necessary. >> >> ... if we remove -lgcc, what happens if it becomes necessary for other versions >> of GCC? Or does gcc already add libgcc per demand? > > I got grub2 compiled on NetBSD using the fake in those pkgsrc patches. > I regenerated the patches below against grub2 cvs. They are the same > ideas you suggested earlier, I just didn't use them all at the same > time: > > 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 1 Feb 2008 21:04:27 -0000 > @@ -33,6 +33,7 @@ > void EXPORT_FUNC(grub_free) (void *ptr); > void *EXPORT_FUNC(grub_realloc) (void *ptr, grub_size_t size); > void *EXPORT_FUNC(grub_memalign) (grub_size_t align, grub_size_t size); > +void EXPORT_FUNC(__enable_execute_stack) (void); Is this arch specific? > /* For debugging. */ > #if defined(MM_DEBUG) && !defined(GRUB_UTIL) > 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 1 Feb 2008 21:04:28 -0000 > @@ -66,6 +66,9 @@ > #include > #include > > +void __enable_execute_stack(void); > +void __enable_execute_stack(void) {} > + Is this arch specific? Please put braces on separate lines. Won't this break on GNU/Linux? Or on other architectures? Did you test this? -- Marco