[PATCH] ARC: Add GNU glob to ARC defconfigs

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Fri Feb 13 20:02:22 UTC 2015


On February 13, 2015 12:26:07 PM GMT+01:00, Anton Kolesov <Anton.Kolesov at synopsys.com> wrote:
>> On Mon, Feb 09, 2015 at 02:37:11PM +0000, Anton Kolesov wrote:
>> > > > Anton, are you going to spin a patch to that effect ?
>> > >
>> > > Yes.
>> > > Anton
>> >
>> > It didn't worked quite well - glob implementation shipped with make
>> > sources makes some assumptions WRT of presence of __mempcpy,
>> > __alloca and __stat, which are not true for uClibc. I was able to
>> > avoid the problem by changing make/glob/glob.c: by adding there
>> > several #ifdef __UCLIBC__ (similar to the one found in
>> > libpthread/nptl_db/thread_dbP.h at line 32). But that means that
>> > patching of uclibc/include/gnu-versions.h is not sufficient on its
>> > own.
>> 
>> This does not sound plausible. GNU make works on dozens if not
>> hundreds of platforms which do not have the above glibc nonsense
>> exported. Or is it using this stuff based on uclibc's defining of the
>> __GLIBC__ macro?
>> 
>
>1. Error for mempcpy depends on (__GLIBC__ - 0 == 2 && __GLIBC_MINOR__
>>= 1)
>(http://git.savannah.gnu.org/cgit/make.git/tree/glob/glob.c#n179).
>Those conditions are met for uClibc
>(http://git.uclibc.org/uClibc/tree/include/features.h#n395), as a
>result make's glob  undefines mempcpy and sets it to __mempcpy.
>Unfortunately __mempcpy doesn't get resolved by linker to anything.
>
>2. For alloca
>(http://git.savannah.gnu.org/cgit/make.git/tree/glob/glob.c#n211) we
>need "#define __alloca alloca" to be done, but that doesn't happen
>because condition (!defined __GNU_LIBRARY__) is false.
>
>3. For stat it is the same: condition is "#ifndef __GNU_LIBRARY__"
>(http://git.savannah.gnu.org/cgit/make.git/tree/glob/glob.c#n234) which
>is false for uClibc, and __stat is left undefined, but is used by
>glob.c.
>
>I'm not really a libc developer so I would refrain from deciding what
>is right and what is wrong with those defines, I just need "make" to
>run uClibc testsuite and Vineet greenlighted for me enabling gnu glob
>in default config for ARC.

So we will just enable the GNU glob for ARC as a quick measure and I already planned to look into removing our cheat after the release, thus we can easily disable GNU glob for the defconfig afterwards.

Thanks,



More information about the uClibc mailing list