All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] to make grub2 compile on NetBSD
@ 2008-02-03 21:33 walt
  2008-02-04 15:56 ` Marco Gerards
  0 siblings, 1 reply; 12+ messages in thread
From: walt @ 2008-02-03 21:33 UTC (permalink / raw)
  To: grub-devel

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.



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   3 Feb 2008 21:24:18 -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 NetBSD gcc */
 
 /* 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   3 Feb 2008 21:24:19 -0000
@@ -66,6 +66,12 @@
 #include <grub/disk.h>
 #include <grub/dl.h>
 
+/* Dummy symbol to make NetBSD gcc happy */
+void
+__enable_execute_stack(void)
+{
+}
+
 #ifdef MM_DEBUG
 # undef grub_malloc
 # undef grub_realloc






^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-02-13  3:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-03 21:33 [PATCH] to make grub2 compile on NetBSD walt
2008-02-04 15:56 ` Marco Gerards
2008-02-04 20:21   ` walt
2008-02-04 20:55     ` Marco Gerards
2008-02-04 22:27     ` Robert Millan
2008-02-04 22:55       ` walt
2008-02-04 23:30         ` Robert Millan
2008-02-05  6:37         ` Marco Gerards
2008-02-11 22:44   ` walt
2008-02-12  7:22     ` Yoshinori K. Okuji
2008-02-12 23:56       ` walt
2008-02-13  3:55         ` Yoshinori K. Okuji

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.