grub-devel
[Top][All Lists]
Advanced

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

Re: powerpc/sparc problems


From: Vladimir 'phcoder' Serbinenko
Subject: Re: powerpc/sparc problems
Date: Mon, 12 Oct 2009 17:45:33 +0200
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701)

Pavel Roskin wrote:
> On Mon, 2009-10-12 at 03:28 -0700, David Miller wrote:
>   
>>> Do you think we should just revert it?
>>>       
>> Probably.
>>     
>
> The purpose of the patch was to remove the requirement that the target
> libc development package is present.  That's a common situation for
> x86_64 systems that may have a 32-bit capable compiler, and maybe the
> 32-bit libc installed as a dependency of a 32-bit package (e.g. wine),
> but no the files necessary to link against the 32-bit libc.
>
> I don't know why the checks need to be reinstated, but if it's really
> needed to be done, we could use the trick described in the gcc manual:
>
> `-print-libgcc-file-name'
>      Same as `-print-file-name=libgcc.a'.
>
>      This is useful when you use `-nostdlib' or `-nodefaultlibs' but
>      you do want to link with `libgcc.a'.  You can do
>
>           gcc -nostdlib FILES... `gcc -print-libgcc-file-name`
>
> This way, it should be possible to check if the functions are in libgcc
> without requiring libc.
>   
On sparc64, ppc and mips we compile using -nostdlib -lgcc
-static-libgcc. I would prefer to use the same method in check and
actual compile.

Another idea: we could use nm to generate list of functions in libgcc.
This way we acquire robustness against new functions in gcc but it may
increase the kernel size. PPC and sparc are less used and hence more
prone to problems and size on them doesn't matter so much as it does on
i386-pc. So I would prefer to buy robustness at cost of size
I haven't made up my mind for mips(el) yet since the target is to be
burned in flash where space is limited.
Another solution would be to enumerate symbols in all modules and
compare them to libgcc symbols and include only needed ones but it has a
major drawback of potentially breaking external and separately compiled
modules which is especially problematic if core is burned in flash.

-- 
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]