[oe] [PATCH 2/3] uClibc: use __always_inline instead of __inline__

Mario Domenech Goulart mario at ossystems.com.br
Thu Aug 13 12:16:27 UTC 2009


Hi Khem

On Tue, 11 Aug 2009 17:15:29 -0700 Khem Raj <raj.khem at gmail.com> wrote:

> On Tue, Aug 11, 2009 at 2:51 AM, Phil Blundell<philb at gnu.org> wrote:
>> On Tue, 2009-08-11 at 05:01 +0200, Holger Hans Peter Freyther wrote:
>>> On Monday 20 July 2009 00:33:57 Otavio Salvador wrote:
>>> > From: Mario Domenech Goulart <mario at ossystems.com.br>
>>> >
>>> > Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
>>>
>>> Why? what does it fix?
>>
>> There are some functions in the dynamic linker bootstrap code that must
>> (for a variety of reasons) be inlined to operate correctly.  Under some
>> circumstances, particularly on MIPS for some reason, gcc decided to
>> disregard the normal "inline" qualifier and put these functions out of
>> line which led to disaster.
>
> Which particular gcc version is in question here ?

IIRC, I've tested it with gcc 4.3.2, 4.1.2 and 4.2.4.


> Looking at the code I think if it is gcc 3.2 then it would use the
> 'must align' semantics but I would be surprised for other gcc versions
> because for other versoins __always_inline is simply defined as
> __inline which is equivalent to __inline__

I haven't tried gcc 3.x.

This patch is actually from the uClibc tree
(http://git.uclibc.org/uClibc/commit/?id=c190f738e1b0e87658ea5f86c057fb147dc19428).

Without this patch, dynamic linked applications segfault at least on
MIPS and MIPSEL.

Best wishes.
Mario




More information about the Openembedded-devel mailing list