From: walt <wa1ter@myrealbox.com>
To: grub-devel@gnu.org
Subject: Re: Compiling grub2 on *BSD?
Date: Fri, 01 Feb 2008 13:11:06 -0800 [thread overview]
Message-ID: <1201900266.744.3.camel@k9.localnet> (raw)
In-Reply-To: <20080131110328.GA12043@thorin>
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);
/* 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 <grub/disk.h>
#include <grub/dl.h>
+void __enable_execute_stack(void);
+void __enable_execute_stack(void) {}
+
#ifdef MM_DEBUG
# undef grub_malloc
# undef grub_realloc
next prev parent reply other threads:[~2008-02-01 21:11 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-26 17:08 Compiling grub2 on *BSD? walt
2008-01-26 17:21 ` Robert Millan
2008-01-26 18:15 ` Bean
2008-01-28 10:14 ` Bean
2008-01-28 10:47 ` Robert Millan
2008-01-28 11:15 ` Bean
2008-01-28 12:56 ` Marco Gerards
2008-01-29 11:00 ` Bean
2008-01-26 20:11 ` walt
2008-01-27 8:56 ` Robert Millan
2008-01-29 5:30 ` jakllsch
2008-01-29 13:47 ` Robert Millan
2008-01-30 0:37 ` jakllsch
2008-01-30 8:56 ` Marco Gerards
2008-01-30 13:23 ` Robert Millan
2008-01-30 13:51 ` walt
2008-01-30 14:00 ` Robert Millan
2008-01-30 16:38 ` walt
2008-01-30 18:40 ` Robert Millan
2008-01-30 19:06 ` walt
2008-01-30 19:14 ` Robert Millan
2008-01-30 21:55 ` jakllsch
2008-01-31 11:03 ` Robert Millan
2008-02-01 21:11 ` walt [this message]
2008-02-01 21:38 ` Robert Millan
2008-02-04 15:32 ` Marco Gerards
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1201900266.744.3.camel@k9.localnet \
--to=wa1ter@myrealbox.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.