grub-devel
[Top][All Lists]
Advanced

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

Re: Patch to compile grub2 with Apple compiler


From: SevenBits
Subject: Re: Patch to compile grub2 with Apple compiler
Date: Tue, 8 Apr 2014 17:50:25 -0400

On Apr 8, 2014, at 5:47 PM, Vladimir 'φ-coder/phcoder' Serbinenko 
<address@hidden> wrote:

> On 08.04.2014 14:27, Yves Blusseau wrote:
>> 
>> Le 8 avr. 2014 à 11:00, Vladimir 'phcoder' Serbinenko <address@hidden
>> <mailto:address@hidden>> a écrit :
>> 
>>> 
>>> On 8 Apr 2014 10:55, "Yves Blusseau" <address@hidden
>>> <mailto:address@hidden>> wrote:
>>>> 
>>>> Hi Vladimir,
>>>> 
>>>> this patch is needed because the declaration of __bzero must made
>>> also for non util AND util compilation: __bzero is used in compilation
>>> of grub-core/kern/misc.c (line 546).
>>>> 
>>>> Without this patch we have this error: http://pastebin.com/aiPGcte0
>>>> So the declaration must be made even if GRUB_UTIL is defined.
>>>> 
>>> Not true. You just need to guard implementation as well
>>> 
>> Don’t understand. What is the solution to solve the problem of compilation ?
>> 
> diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
> index 54db2e1..c5c815d 100644
> --- a/grub-core/kern/misc.c
> +++ b/grub-core/kern/misc.c
> @@ -542,6 +542,9 @@ memset (void *s, int c, grub_size_t n)
>   return grub_memset (s, c, n);
> }
> 
> +#endif
> +
> +#if !defined(GRUB_UTIL) && defined(__APPLE__)
> void GRUB_BUILTIN_ATTR
> __bzero (void *s, grub_size_t n)
> {

Yves: what I presume was meant was that your patch only needs to be applied on 
Apple machines, and so you should surround certain parts in preprocessor 
statements so they don’t negatively effect compilation on other platforms and 
compilers.

> 
> 
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail


reply via email to

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