From: Sam James <sam@gentoo.org>
To: Stefan Liebler <stli@linux.ibm.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] S390: Fix building with --disable-mutli-arch [BZ #31196]
Date: Tue, 30 Jan 2024 18:59:30 +0000 [thread overview]
Message-ID: <874jeu8x58.fsf@gentoo.org> (raw)
In-Reply-To: <20240130083432.544403-1-stli@linux.ibm.com>
Stefan Liebler <stli@linux.ibm.com> writes:
> Starting with commits
> - 7ea510127e2067efa07865158ac92c330c379950
> string: Add libc_hidden_proto for strchrnul
> - 22999b2f0fb62eed1af4095d062bd1272d6afeb1
> string: Add libc_hidden_proto for memrchr
Nit: s/mutli/multi/ in title (it's obvious what it means ofc but
mentioning it because it impacts ability to grep).
Thanks!
>
> 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.
> ---
> sysdeps/s390/memrchr-c.c | 4 +++-
> sysdeps/s390/strchrnul-c.c | 4 +++-
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/sysdeps/s390/memrchr-c.c b/sysdeps/s390/memrchr-c.c
> index b4b85725d3..f6ffe85572 100644
> --- a/sysdeps/s390/memrchr-c.c
> +++ b/sysdeps/s390/memrchr-c.c
> @@ -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
> diff --git a/sysdeps/s390/strchrnul-c.c b/sysdeps/s390/strchrnul-c.c
> index 7f2f1fd540..97fd9ffbf7 100644
> --- a/sysdeps/s390/strchrnul-c.c
> +++ b/sysdeps/s390/strchrnul-c.c
> @@ -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
next prev parent reply other threads:[~2024-01-30 19:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 8:34 Stefan Liebler
2024-01-30 17:21 ` Adhemerval Zanella Netto
2024-01-31 12:06 ` Stefan Liebler
2024-01-30 18:59 ` Sam James [this message]
2024-01-31 12:03 ` Stefan Liebler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874jeu8x58.fsf@gentoo.org \
--to=sam@gentoo.org \
--cc=libc-alpha@sourceware.org \
--cc=stli@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).