From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1962) id AB3F6385842A; Thu, 1 Feb 2024 09:10:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB3F6385842A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1706778656; bh=ukuPygqG5AcDex6m8uUlbzn3oQyWhRgpHeO+VtMKyXQ=; h=From:To:Subject:Date:From; b=NjmoTcV4fCAL1jKbAYgFp6iXJ/co5tnnoycaPCSjN5kbQicYqR97sOAd9At3dFuZM RmBiQyGJ4AW31OHFHpHH2xi/J6JvaRIX8yaPJZWEzGqUhq5gr5bNNe00wR78j06C1M VVoXN5s/tllFShUJhR9nAwkZ1w4TMrMbpl/zF0sA= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" From: Stefan Liebler To: glibc-cvs@sourceware.org Subject: [glibc/release/2.38/master] S390: Fix building with --disable-mutli-arch [BZ #31196] X-Act-Checkin: glibc X-Git-Author: Stefan Liebler X-Git-Refname: refs/heads/release/2.38/master X-Git-Oldrev: 30e546d76e756fe4d2d20a8b2286de4fbf30ceb5 X-Git-Newrev: 18876c9ff52c3d9aefe2c663b1a287589bebedc0 Message-Id: <20240201091056.AB3F6385842A@sourceware.org> Date: Thu, 1 Feb 2024 09:10:56 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=18876c9ff52c3d9aefe2c663b1a287589bebedc0 commit 18876c9ff52c3d9aefe2c663b1a287589bebedc0 Author: Stefan Liebler Date: Tue Jan 30 09:34:32 2024 +0100 S390: Fix building with --disable-mutli-arch [BZ #31196] Starting with commits - 7ea510127e2067efa07865158ac92c330c379950 string: Add libc_hidden_proto for strchrnul - 22999b2f0fb62eed1af4095d062bd1272d6afeb1 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 (cherry picked from commit cc1b91eabd806057aa7e3058a84bf129ed36e157) Diff: --- 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 bdf3c7bbe0..fadd63087a 100644 --- a/sysdeps/s390/memrchr-c.c +++ b/sysdeps/s390/memrchr-c.c @@ -25,7 +25,9 @@ # include -# 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 f6f5bae311..97fbc16edb 100644 --- a/sysdeps/s390/strchrnul-c.c +++ b/sysdeps/s390/strchrnul-c.c @@ -24,7 +24,9 @@ # endif # include -# 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