S390: Fix building with --disable-mutli-arch [BZ #31196]

Starting with commits
- 7ea510127e
string: Add libc_hidden_proto for strchrnul
- 22999b2f0f
string: Add libc_hidden_proto for memrchr

building glibc on s390x with --disable-multi-arch fails if only
the C-variant of strchrnul / memrchr is used.  This is the case
if gcc uses -march < z13.

The build fails with:
../sysdeps/s390/strchrnul-c.c:28:49: error: ‘__strchrnul_c’ undeclared here (not in a function); did you mean ‘__strchrnul’?
   28 | __hidden_ver1 (__strchrnul_c, __GI___strchrnul, __strchrnul_c);

With --disable-multi-arch, __strchrnul_c is not available as string/strchrnul.c
is just included without defining STRCHRNUL and thus we also don't have to create
the internal hidden symbol.

Tested-by: Andreas K. Hüttel <dilfridge@gentoo.org>
This commit is contained in:
Stefan Liebler 2024-01-30 09:34:32 +01:00 committed by Andreas K. Hüttel
parent feeb729754
commit cc1b91eabd
No known key found for this signature in database
GPG Key ID: DC2B16215ED5412A
2 changed files with 6 additions and 2 deletions

View File

@ -25,7 +25,9 @@
# include <string/memrchr.c>
# if defined SHARED && IS_IN (libc)
# if HAVE_MEMRCHR_IFUNC
# if defined SHARED && IS_IN (libc)
__hidden_ver1 (__memrchr_c, __GI___memrchr, __memrchr_c);
# endif
# endif
#endif

View File

@ -24,7 +24,9 @@
# endif
# include <string/strchrnul.c>
# if defined SHARED && IS_IN (libc)
# if HAVE_STRCHRNUL_IFUNC
# if defined SHARED && IS_IN (libc)
__hidden_ver1 (__strchrnul_c, __GI___strchrnul, __strchrnul_c);
# endif
# endif
#endif