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: Vladimir 'phcoder' Serbinenko
Subject: Re: Report: compil error on OSX for target=i386
Date: Sat, 8 Aug 2009 16:47:40 +0200

On Sat, Aug 8, 2009 at 4:44 PM, Bean<address@hidden> wrote:
> Hi,
>
> I also encounter this problem with apple gcc 4.0, the fix is to replace:
>
> asm volatile ("jmp *%2" : : "b" (0), "S" (real_mode_mem), "g"
> (params->code32_start));
>
> With:
>  asm volatile ("movl %0, %%ecx" : : "m" (params->code32_start));
>  asm volatile ("movl %0, %%esi" : : "m" (real_mode_mem));
>
>  asm volatile ("xorl %%ebx, %%ebx" : : );
>  asm volatile ("jmp *%%ecx" : : );
This code has absolutely no guaranty to work since C can change
registers between asm parts. In long term I was planning to replace
this code with use of relocator framework
>
> On Sat, Aug 8, 2009 at 10:34 PM, Yves Blusseau<address@hidden> wrote:
>> Hi,
>>
>> can't compil grub2 on OSX with target=i386:
>>
>> ./configure --prefix=/opt --target=i386
>>
>> *******************************************************
>> GRUB2 will be compiled with following components:
>> Platform: i386-pc
>> grub-emu: Yes
>> USB support for grub-emu: No (need libusb library)
>> With memory debugging: No
>> grub-pe2elf will not be built
>> efiemu runtime: No (cannot compile with -m64 -mcmodel=large -mno-red-zone
>> -nostdlib)
>> grub-fstest: Yes
>> grub-mkfont: Yes
>> *******************************************************
>>
>> make
>>
>> loader/i386/linux.c: In function ‘grub_linux_boot’:
>> loader/i386/linux.c:563: error: can't find a register in class ‘BREG’ while
>> reloading ‘asm’
>> make: *** [linux_mod-loader_i386_linux.o] Error 1
>>
>> Yves Blusseau
>>
>> _______________________________________________
>> Grub-devel mailing list
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/grub-devel
>>
>
>
>
> --
> Bean
>
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git




reply via email to

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