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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> > > > > 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! _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel