aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Liebler <stli@linux.ibm.com>2020-12-15 15:18:03 +0100
committerStefan Liebler <stli@linux.ibm.com>2020-12-17 16:18:04 +0100
commit844b4d8b4b937fe6943d2c0c80ce7d871cdb1eb5 (patch)
treee1b9009fe7c5b66a726fb47369b9da4d054521a9
parent29a4db291b1282f4088e549391d86b6b470f22be (diff)
downloadglibc-844b4d8b4b937fe6943d2c0c80ce7d871cdb1eb5.zip
glibc-844b4d8b4b937fe6943d2c0c80ce7d871cdb1eb5.tar.gz
glibc-844b4d8b4b937fe6943d2c0c80ce7d871cdb1eb5.tar.bz2
s390x: Require GCC 7.1 or later to build glibc.
GCC 6.5 fails to correctly build ldconfig with recent ld.so.cache commits, e.g.: 785969a047ad2f23f758901c6816422573544453 elf: Implement a string table for ldconfig, with tail merging If glibc is build with gcc 6.5.0: __builtin_add_overflow is used in <glibc>/elf/stringtable.c:stringtable_finalize() which leads to ldconfig failing with "String table is too large". This is also recognizable in following tests: FAIL: elf/tst-glibc-hwcaps-cache FAIL: elf/tst-glibc-hwcaps-prepend-cache FAIL: elf/tst-ldconfig-X FAIL: elf/tst-ldconfig-bad-aux-cache FAIL: elf/tst-ldconfig-ld_so_conf-update FAIL: elf/tst-stringtable See gcc "Bug 98269 - gcc 6.5.0 __builtin_add_overflow() with small uint32_t values incorrectly detects overflow" (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269)
-rw-r--r--INSTALL3
-rw-r--r--NEWS2
-rw-r--r--manual/install.texi2
-rw-r--r--sysdeps/s390/configure35
-rw-r--r--sysdeps/s390/configure.ac17
5 files changed, 59 insertions, 0 deletions
diff --git a/INSTALL b/INSTALL
index 2b00f80..accdc39 100644
--- a/INSTALL
+++ b/INSTALL
@@ -467,6 +467,9 @@ build the GNU C Library:
For ARC architecture builds, GCC 8.3 or higher is needed.
+ For s390x architecture builds, GCC 7.1 or higher is needed (See gcc
+ Bug 98269).
+
For multi-arch support it is recommended to use a GCC which has
been built with support for GNU indirect functions. This ensures
that correct debugging information is generated for functions
diff --git a/NEWS b/NEWS
index 0820984..86e05fb 100644
--- a/NEWS
+++ b/NEWS
@@ -67,6 +67,8 @@ Changes to build and runtime requirements:
(and pseudo-terminals are supported), a devpts file system is mounted
on /dev/pts. Current systems already meet these requirements.
+* s390x requires GCC 7.1 or newer. See gcc Bug 98269.
+
Security related changes:
CVE-2020-27618: An infinite loop has been fixed in the iconv program when
diff --git a/manual/install.texi b/manual/install.texi
index 2e16447..648f366 100644
--- a/manual/install.texi
+++ b/manual/install.texi
@@ -509,6 +509,8 @@ Library with support for IEEE long double.
For ARC architecture builds, GCC 8.3 or higher is needed.
+For s390x architecture builds, GCC 7.1 or higher is needed (See gcc Bug 98269).
+
For multi-arch support it is recommended to use a GCC which has been built with
support for GNU indirect functions. This ensures that correct debugging
information is generated for functions selected by IFUNC resolvers. This
diff --git a/sysdeps/s390/configure b/sysdeps/s390/configure
index fa46e9e..5f98640 100644
--- a/sysdeps/s390/configure
+++ b/sysdeps/s390/configure
@@ -296,5 +296,40 @@ then
fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC is sufficient to build libc on s390x" >&5
+$as_echo_n "checking if $CC is sufficient to build libc on s390x... " >&6; }
+if ${libc_cv_compiler_ok_on_s390x+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !defined __GNUC__ || __GNUC__ < 7 || (__GNUC__ == 7 && __GNUC_MINOR__ < 1)
+#error insufficient compiler for building on s390x
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ libc_cv_compiler_ok_on_s390x=yes
+else
+ libc_cv_compiler_ok_on_s390x=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_compiler_ok_on_s390x" >&5
+$as_echo "$libc_cv_compiler_ok_on_s390x" >&6; }
+if test "$libc_cv_compiler_ok_on_s390x" != yes; then
+ critic_missing="$critic_missing On s390x, GCC >= 7.1.0 is required."
+fi
+
test -n "$critic_missing" && as_fn_error $? "
*** $critic_missing" "$LINENO" 5
diff --git a/sysdeps/s390/configure.ac b/sysdeps/s390/configure.ac
index 3ed5a8e..dfe007a 100644
--- a/sysdeps/s390/configure.ac
+++ b/sysdeps/s390/configure.ac
@@ -212,5 +212,22 @@ then
AC_DEFINE(HAVE_S390_MIN_ARCH13_ZARCH_ASM_SUPPORT)
fi
+dnl test if GCC is new enough. See gcc "Bug 98269 - gcc 6.5.0
+dnl __builtin_add_overflow() with small uint32_t values incorrectly detects
+dnl overflow
+dnl (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269)
+AC_CACHE_CHECK([if $CC is sufficient to build libc on s390x],
+libc_cv_compiler_ok_on_s390x, [
+AC_TRY_COMPILE([], [
+#if !defined __GNUC__ || __GNUC__ < 7 || (__GNUC__ == 7 && __GNUC_MINOR__ < 1)
+#error insufficient compiler for building on s390x
+#endif
+],
+ [libc_cv_compiler_ok_on_s390x=yes],
+ [libc_cv_compiler_ok_on_s390x=no])])
+if test "$libc_cv_compiler_ok_on_s390x" != yes; then
+ critic_missing="$critic_missing On s390x, GCC >= 7.1.0 is required."
+fi
+
test -n "$critic_missing" && AC_MSG_ERROR([
*** $critic_missing])