[Bug build/31196] master fails to build on s390 with --disable-multi-arch

adhemerval.zanella at linaro dot org sourceware-bugzilla@sourceware.org
Mon Jan 29 12:54:23 GMT 2024


https://sourceware.org/bugzilla/show_bug.cgi?id=31196

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg

--- Comment #5 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
The recent s390 string refactor assumed multiarch/ifunc support as default and
organized the internal code without placing the ifunc selector/variants only on
multiarch folder.  This is to allow the avoid ifunc and some string variants
depending of the default compiler optimization (so if you target glibc to a
z13, there is no need to provide old z900 variants and glibc internally can
assume the z13 variants as default).

I am not very found of this s390-specific organization, it differs from other
ports where there is no need to extra internal checks to see if you are
building with multiarch support (USE_MULTIARCH). The following patch should fix
s390 and s390x, but I think it would be better to make s390 follow current
practice of putting ifunc support only at multiarch folders.

diff --git a/sysdeps/s390/memrchr-c.c b/sysdeps/s390/memrchr-c.c
index bdf3c7bbe0..3cb27b795d 100644
--- a/sysdeps/s390/memrchr-c.c
+++ b/sysdeps/s390/memrchr-c.c
@@ -25,7 +25,7 @@

 # include <string/memrchr.c>

-# if defined SHARED && IS_IN (libc)
+# if defined SHARED && IS_IN (libc) && defined USE_MULTIARCH
 __hidden_ver1 (__memrchr_c, __GI___memrchr, __memrchr_c);
 # endif
 #endif
diff --git a/sysdeps/s390/strchrnul-c.c b/sysdeps/s390/strchrnul-c.c
index f6f5bae311..cee0e1a89e 100644
--- a/sysdeps/s390/strchrnul-c.c
+++ b/sysdeps/s390/strchrnul-c.c
@@ -24,7 +24,7 @@
 # endif

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list