grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] to make grub2 compile on NetBSD


From: walt
Subject: Re: [PATCH] to make grub2 compile on NetBSD
Date: Tue, 12 Feb 2008 15:56:06 -0800

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 <address@hidden> 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 <address@hidden>
> >
> >     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!







reply via email to

[Prev in Thread] Current Thread [Next in Thread]