[PATCH] [POWERPC] Fix kernel builds with newer gcc versions and -Os

Scott Wood scottwood at freescale.com
Sat May 3 07:40:14 EST 2008

Kumar Gala wrote:
> On May 2, 2008, at 12:34 PM, Segher Boessenkool wrote:
>>>> <brokenrecord>
>>>> Why don't we just link with libgcc?
>>>> </brokenrecord>
>>> Its something of a PITA to do that in the kernel at this point since 
>>> we've duplicated libgcc functionality in it.  I'm sure there are some 
>>> historical reasons this wasn't done to start with.
>> That's the same as saying that it would be a nice cleanup to remove all
>> that duplicated code now...
> We'll hopefully this thread might spark either an explanation for why we 
> aren't just linking libgcc in a statement that says we should and we can 
> remove the code that implements libgcc functionality.
> How would libgcc linking intermix with modules?  Would we have to 
> EXPORT_SYMBOL() all functions that libgcc implements? 

Yes, unfortunately.

A quick way to generate such a list would be to build a non-modular 
kernel and leave out the libgcc link (after removing the reimplemented 
functions), and see what linker errors you get.

 > I'm guessing that's varies w/different gcc versions.

Yeah, but so does the set of functions that Linux needs to reimplement.


More information about the Linuxppc-dev mailing list