Re: Patch to compile grub2 with Apple compiler

2014-04-08 Thread Yves Blusseau
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.

Regards,
Yves

Le 7 avr. 2014 à 21:51, Vladimir 'φ-coder/phcoder' Serbinenko 
 a écrit :

> On 07.04.2014 13:21, Yves Blusseau wrote:
>> Hi,
>> 
>> this is a patch to allow compilation of grub2 with Apple Compiler
>> 
>> 
> Why do you need this patch? __bzero shouldn't need any special tratement
> in GRUB_UTIL case.
>> 
>> 
>> 
>> Regards,
>> Yves Blusseau
>> 
>> 
>> 
>> ___
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>> 
> 
> 
> ___
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel



smime.p7s
Description: S/MIME cryptographic signature
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Patch to compile grub2 with Apple compiler

2014-04-08 Thread Vladimir 'phcoder' Serbinenko
On 8 Apr 2014 10:55, "Yves Blusseau"  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
> Regards,
> Yves
>
> Le 7 avr. 2014 à 21:51, Vladimir 'φ-coder/phcoder' Serbinenko <
phco...@gmail.com> a écrit :
>
> > On 07.04.2014 13:21, Yves Blusseau wrote:
> >> Hi,
> >>
> >> this is a patch to allow compilation of grub2 with Apple Compiler
> >>
> >>
> > Why do you need this patch? __bzero shouldn't need any special tratement
> > in GRUB_UTIL case.
> >>
> >>
> >>
> >> Regards,
> >> Yves Blusseau
> >>
> >>
> >>
> >> ___
> >> Grub-devel mailing list
> >> Grub-devel@gnu.org
> >> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>
> >
> >
> > ___
> > Grub-devel mailing list
> > Grub-devel@gnu.org
> > https://lists.gnu.org/mailman/listinfo/grub-devel
>
>
> ___
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Patch to compile grub2 with Apple compiler

2014-04-08 Thread Yves Blusseau

Le 8 avr. 2014 à 11:00, Vladimir 'phcoder' Serbinenko  a 
écrit :

> 
> On 8 Apr 2014 10:55, "Yves Blusseau"  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 ?

Regards,
Yves



smime.p7s
Description: S/MIME cryptographic signature
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Patch to compile grub2 with Apple compiler

2014-04-08 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 08.04.2014 14:27, Yves Blusseau wrote:
> 
> Le 8 avr. 2014 à 11:00, Vladimir 'phcoder' Serbinenko  > a écrit :
> 
>>
>> On 8 Apr 2014 10:55, "Yves Blusseau" > > 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)
 {




signature.asc
Description: OpenPGP digital signature
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Patch to compile grub2 with Apple compiler

2014-04-08 Thread SevenBits
On Apr 8, 2014, at 5:47 PM, Vladimir 'φ-coder/phcoder' Serbinenko 
 wrote:

> On 08.04.2014 14:27, Yves Blusseau wrote:
>> 
>> Le 8 avr. 2014 à 11:00, Vladimir 'phcoder' Serbinenko > > a écrit :
>> 
>>> 
>>> On 8 Apr 2014 10:55, "Yves Blusseau" >> > 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
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Patch to compile grub2 with Apple compiler

2014-04-08 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 08.04.2014 23:50, SevenBits wrote:
> 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.
You say directly the opposite of what I said and the patch.



signature.asc
Description: OpenPGP digital signature
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: XP, 8.1 and UEFI with grub2?

2014-04-08 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 08.04.2014 03:48, SevenBits wrote:
> On Monday, April 7, 2014,  > wrote:
> 
> Grub Gurus
> 
> Perhaps this is good timing for this
> question.  I hope I am asking it in the right place.  I have been
> using Ubuntu and XP multiboot for quite some time and using Ubuntu
> more and XP less.  With support for XP expiring April 8 I would like
> to stop using it while connected to the internet.  My goal is to
> multiboot XP, Ubuntu and 8.1 on the same 64 bit new machine.
> 
> 
> 
> My question is if XP requires legacy
> BIOS and it is available (?) but 8.1 requires UEFI (?) does this
> prevent grub2 from accessing the three OSs from a single menu.  Can
> Grub2 switch between legacy BIOS and UEFI or does this require a
> process like changing BIOS settings?
> 
> 
> This is determined by your firmware, and not by GRUB.
Not fully true. You can switch from EFI to BIOS but exact function
depends on exact EFI vendor. GRUB currently knows only how to do it on
macs (see appleloader).
> Most hardware that can run XP probably can't run Windows 8.1 AFAIK.
>  
Quite the opposite. Most computers with enough power can run both.

In general please don't propagate misinformation.



signature.asc
Description: OpenPGP digital signature
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel