From 59558c4a83935d5a8b48efe92cb6d6969110b6a7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Dec 2020 12:03:00 -0800 Subject: [PATCH] Require GCC 7.1 or later * INSTALL, NEWS, configure.ac: * manual/install.texi (Tools for Compilation): Require GCC 7.1 instead of 6.2. * configure.ac: Reject icc, as icc 2021.1 mishandles integer overflow. * sysdeps/s390/configure.ac (HAVE_S390_MIN_ARCH13_ZARCH_ASM_SUPPORT): Remove GCC 7.1 check, as the top-level configure.ac now does this. * configure, sysdeps/s390/configure: Regenerate. --- INSTALL | 7 ++----- NEWS | 9 +++++---- configure | 2 +- configure.ac | 2 +- manual/install.texi | 4 ++-- sysdeps/s390/configure | 35 ----------------------------------- sysdeps/s390/configure.ac | 17 ----------------- 7 files changed, 11 insertions(+), 65 deletions(-) diff --git a/INSTALL b/INSTALL index accdc39821..0ea5362c77 100644 --- a/INSTALL +++ b/INSTALL @@ -449,9 +449,9 @@ build the GNU C Library: As of relase time, GNU 'make' 4.2.1 is the newest verified to work to build the GNU C Library. - * GCC 6.2 or newer + * GCC 7.1 or newer - GCC 6.2 or higher is required. In general it is recommended to use + GCC 7.1 or higher is required. In general it is recommended to use the newest version of the compiler that is known to work for building the GNU C Library, as newer compilers usually produce better code. As of release time, GCC 9.2.1 is the newest compiler @@ -467,9 +467,6 @@ 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 86e05fb023..939914d9b5 100644 --- a/NEWS +++ b/NEWS @@ -25,8 +25,7 @@ Major new features: - rv32imafdc ilp32 - rv32imafdc ilp32d - The 32-bit RISC-V port requires at least Linux 5.4, GCC 7.1 and binutils - 2.28. + The 32-bit RISC-V port requires at least Linux 5.4 and binutils 2.28. Deprecated and removed features, and other changes affecting compatibility: @@ -55,6 +54,10 @@ Deprecated and removed features, and other changes affecting compatibility: Changes to build and runtime requirements: +* GCC 7.1 or later is required to build the GNU C Library. + Older GCC versions and non-GNU compilers are still supported when + compiling programs that use the GNU C Library. + * On Linux, the system administrator needs to configure /dev/pts with the intended access modes for pseudo-terminals. glibc no longer attemps to adjust permissions of terminal devices. The previous glibc @@ -67,8 +70,6 @@ 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/configure b/configure index 4795e721e5..0d49ab728e 100755 --- a/configure +++ b/configure @@ -5105,7 +5105,7 @@ int main () { -#if !defined __GNUC__ || __GNUC__ < 6 || (__GNUC__ == 6 && __GNUC_MINOR__ < 2) +#if !defined __GNUC__ || __GNUC__ < 7 || defined __ICC #error insufficient compiler #endif ; diff --git a/configure.ac b/configure.ac index 93e68fb696..eb23d99d79 100644 --- a/configure.ac +++ b/configure.ac @@ -1004,7 +1004,7 @@ AC_CHECK_PROG_VER(BISON, bison, --version, AC_CACHE_CHECK([if $CC is sufficient to build libc], libc_cv_compiler_ok, [ AC_TRY_COMPILE([], [ -#if !defined __GNUC__ || __GNUC__ < 6 || (__GNUC__ == 6 && __GNUC_MINOR__ < 2) +#if !defined __GNUC__ || __GNUC__ < 7 || defined __ICC #error insufficient compiler #endif], [libc_cv_compiler_ok=yes], diff --git a/manual/install.texi b/manual/install.texi index 648f366371..53b1efcb83 100644 --- a/manual/install.texi +++ b/manual/install.texi @@ -488,9 +488,9 @@ As of relase time, GNU @code{make} 4.2.1 is the newest verified to work to build @theglibc{}. @item -GCC 6.2 or newer +GCC 7.1 or newer -GCC 6.2 or higher is required. In general it is recommended to use +GCC 7.1 or higher is required. In general it is recommended to use the newest version of the compiler that is known to work for building @theglibc{}, as newer compilers usually produce better code. As of release time, GCC 9.2.1 is the newest compiler verified to work to build diff --git a/sysdeps/s390/configure b/sysdeps/s390/configure index 5f98640d0f..fa46e9e351 100644 --- a/sysdeps/s390/configure +++ b/sysdeps/s390/configure @@ -296,40 +296,5 @@ 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 dfe007a774..3ed5a8ef87 100644 --- a/sysdeps/s390/configure.ac +++ b/sysdeps/s390/configure.ac @@ -212,22 +212,5 @@ 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]) -- 2.29.2