diff options
| author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-11-10 10:28:59 -0300 |
|---|---|---|
| committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-11-17 11:17:07 -0300 |
| commit | 53ad1eae0fed85d16c3a00eae6b9ca6bd030b624 (patch) | |
| tree | 37e7123d55103d8d843add23368d9da6d1c010bf /assert | |
| parent | edd4dc7dc830a4e3ba52058c75fc5eda9e800f17 (diff) | |
x86: Fix strstr ifunc on clang
Work around the clang limitation wrt inline function and attribute
definition, where it does not allow to 'add' new attribute if a
function is already defined:
Buildint with clang triggers multiple issue on how ifunc macro are
used:
../sysdeps/x86_64/multiarch/strstr.c:38:54: error: attribute declaration must precede definition [-Werror,-Wignored-attributes]
38 | extern __typeof (__redirect_strstr) __strstr_generic attribute_hidden;
| ^
./../include/libc-symbols.h:356:43: note: expanded from macro 'attribute_hidden'
356 | # define attribute_hidden __attribute__ ((visibility ("hidden")))
| ^
../string/strstr.c:76:1: note: previous definition is here
76 | STRSTR (const char *haystack, const char *needle)
| ^
../sysdeps/x86_64/multiarch/strstr.c:27:16: note: expanded from macro 'STRSTR'
27 | #define STRSTR __strstr_generic
| ^
../sysdeps/x86_64/multiarch/strstr.c:65:43: error: redefinition of '__libc_strstr'
65 | libc_ifunc_redirected (__redirect_strstr, __libc_strstr, IFUNC_SELECTOR ());
| ^
And
../sysdeps/x86_64/multiarch/strstr.c:65:43: error: redefinition of '__libc_strstr'
65 | libc_ifunc_redirected (__redirect_strstr, __libc_strstr, IFUNC_SELECTOR ());
| ^
../sysdeps/x86_64/multiarch/strstr.c:59:13: note: previous definition is here
59 | libc_ifunc (__libc_strstr,
| ^
Refactor to use a auxiliary function like other selection (for instance,
x86_64/multiarch/strcmp.c).
Diffstat (limited to 'assert')
0 files changed, 0 insertions, 0 deletions
