[OE-core] [PATCH] gettext: Fix overloadable error with clang

Khem Raj raj.khem at gmail.com
Wed Jan 22 20:28:02 UTC 2020


On Tue, Jan 21, 2020 at 8:32 AM Adrian Bunk <bunk at stusta.de> wrote:
>
> On Thu, Jan 16, 2020 at 07:17:20AM -0800, Khem Raj wrote:
> > On Thu, Jan 16, 2020 at 5:13 AM Adrian Bunk <bunk at stusta.de> wrote:
> > >
> > > On Wed, Jan 15, 2020 at 08:46:09PM -0800, Khem Raj wrote:
> > > > Clang detects that getcwd is being re-declared and signatures don't
> > > > match, simple solution is to let clang use overloadable attribute
> > > >...
> > > > +Fixes
> > > > +dcigettext.c:147:7: error: redeclaration of 'getcwd' must have the 'overloadable' attribute
> > > >...
> > > > +-char *getcwd ();
> > > >...
> > >
> > > Looks like a bug in clang to me, and should be fixed there.
> > >
> > > The code does not tell anything regarding the parameters,
> > > but clang seems to misinterpret it as "no parameters".
> > >
> > its conflicting with declaration from glibc system headers
> >...
>
> Why did the glibc 2.31 upgrade add a not upstreamed patch from 2017 that
> created these conflicts?
>

This supports building userspace with clang better and find more
errors when fortify sources option is on.
this patch was already proposed to glibc and I will follow up on it.
It definitely improves fortify when using clang

> The commit message does not mention that this patch was added,
> and an OE-only patch that makes a compiler reject valid C code
> is not good.
>

I think thats my bad as it slipped my mind with numerous rebases I did
over the life of the glibc patchset.
however, I think its probably best to leave it outside core for now.
There is another patchset I will do for
glibc 2.31 where I will drop it and perhaps house it in meta-clang.

> cu
> Adrian


More information about the Openembedded-core mailing list