Re: [klibc 07/31] i386 support for klibc

H. Peter Anvin
2006-06-29T00:45:59Z

Roman Zippel wrote:
> Hi,
>
> On Wed, 28 Jun 2006, H. Peter Anvin wrote:
>
>> The i386 ones are a bit special... usually the reason I have added libgcc
>> functions is that on some architectures, gcc has various problems linking with
>> libgcc in some configurations.
>
> If gcc has problems to link its own libgcc you really have a serious
> problem...

The way libgcc is handled inside gcc is, indeed, completely screwed up;
even the gcc people admit that. They pretty much don't have a way to
handle the effects of compiler options on libgcc, especially the ones
that affect binary compatibility.

However, that affects only a small minority of configurations (MIPS is one.)

> The standard libgcc may not be as small as you like, but it still should
> be the first choice. If there is a problem with it, the gcc people do
> accept patches.

That's just an asinine statement. Under that logic we should just
forget about the kernel and go hack the gcc bugs du jour; we certainly
have enough workarounds for gcc bugs in the kernel.

There is absolutely nothing wrong with providing an override for a
function which has well-defined semantics. If new functions are needed,
they are pulled from libgcc.

-hpa