[PATCH] Make string _chk functions available for glibc tests
Siddhesh Poyarekar
siddhesh@sourceware.org
Tue Dec 17 16:01:00 GMT 2024
On 2024-12-17 10:05, Sam James wrote:
> Sam James <sam@gentoo.org> writes:
>
>> "H.J. Lu" <hjl.tools@gmail.com> writes:
>>
>>> String _chk functions are exported in libc.so.6, but their prototypes
>>> aren't provided since they can be used by GCC directly without prototypes.
>>> But some glibc tests are using them and Clang issues an error:
>>>
>>> ./tst-gnuglob-skeleton.c:225:3: error: call to undeclared function '__strcpy_chk'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>>> 225 | __strcpy_chk (dir->d.d_name, filesystem[dir->idx].name, NAME_MAX);
>>> | ^
>>>
>>> Make string _chk function prototypes available for glibc tests to avoid
>>> Clang error.
>>
>> __builtin___XXX_chk should work for Clang. But maybe it's better for us
>> to do this anyway rather than relying on the GCC builtins being
>> consistent.
>
> ... so OK if no objections.
>
Fine with me too.
Thanks,
Sid
More information about the Libc-alpha
mailing list