grub-devel
[Top][All Lists]
Advanced

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

Re: Report: compil error on OSX for target=i386


From: Yves Blusseau
Subject: Re: Report: compil error on OSX for target=i386
Date: Thu, 3 Sep 2009 23:01:23 +0200


Le 1 sept. 09 à 13:46, Robert Millan a écrit :

On Mon, Aug 31, 2009 at 11:10:17PM +0200, Yves Blusseau wrote:
What about following compromise:
diff --git a/loader/i386/linux.c b/loader/i386/linux.c
index 4144384..1380eb8 100644
--- a/loader/i386/linux.c
+++ b/loader/i386/linux.c
@@ -543,7 +543,8 @@ grub_linux_boot (void)
 asm volatile ("lgdt %0" : : "m" (gdt_desc));

 /* Enter Linux.  */
-  asm volatile ("jmp *%2" : : "b" (0), "S" (real_mode_mem), "g"
(params->code32_start));
+  asm volatile ("xorl %%ebx, %%ebx\n"
+                     "jmp *%1" : : "S" (real_mode_mem), "g"
(params->code32_start));

#endif

Is this compromise acceptable?

Compil and work on OSX.

Is it ok to commit it ?

Apple is free to cripple the version of GCC they're shipping (we wanted them to have this freedom, even if they're unfriendly towards free software).
I think it's short-sighted, but it's their problem.

However, on our side, I'm not satisfied at all with accomodating to arbitrary limitations like this one. This seems like a slippery slope. If we do it
now, what's the next one?

It's much easier to make official GCC a build requirement. People hacking on GRUB source, or distributors (e.g. Fink) should have no problem with a
dependency on GCC.

So what you can do because currently we can't compil grub on OSX:

gcc-4.2 -Iloader/i386 -I./loader/i386 -I. -I./include -I./include - Wall -W -Wall -W -Wshadow -Wpointer-arith -Wmissing- prototypes -Wundef -Wstrict-prototypes -g -Os -falign- jumps=1 -falign-loops=1 -falign-functions=1 -DAPPLE_CC=1 -fnested- functions -m32 -fno-stack-protector -mno-stack-arg-probe -fno-builtin - mrtd -mregparm=3 -m32 -MD -c -o linux_mod-loader_i386_linux.o loader/ i386/linux.c
loader/i386/linux.c: In function ‘grub_linux_boot’:
loader/i386/linux.c:546: error: can't find a register in class ‘BREG’ while reloading ‘asm’
loader/i386/linux.c:542: error: ‘asm’ operand has impossible constraints
loader/i386/linux.c:543: error: ‘asm’ operand has impossible constraints
loader/i386/linux.c:546: error: ‘asm’ operand has impossible constraints
make: *** [linux_mod-loader_i386_linux.o] Error 1


Regards,
Yves Blusseau

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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