PING: [PATCH] Raise the minimum GCC version to 11.1
H.J. Lu
hjl.tools@gmail.com
Thu Jan 2 00:09:54 GMT 2025
On Sat, Dec 14, 2024 at 1:09 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> Require GCC 11.1 or newer to build. Remove GCC version check for PowerPC
> and s390x. TEST_CC and TEST_CXX can be used to test the glibc build
> with the older versions of GCC.
PING.
> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
> ---
> INSTALL | 25 +-----
> configure | 3 +-
> configure.ac | 3 +-
> manual/install.texi | 24 +-----
> sysdeps/s390/configure | 40 ----------
> sysdeps/s390/configure.ac | 18 -----
> sysdeps/unix/sysv/linux/powerpc/configure | 83 --------------------
> sysdeps/unix/sysv/linux/powerpc/configure.ac | 34 --------
> 8 files changed, 11 insertions(+), 219 deletions(-)
>
> diff --git a/INSTALL b/INSTALL
> index 85c8e4cef1..a88b25b9ef 100644
> --- a/INSTALL
> +++ b/INSTALL
> @@ -488,31 +488,14 @@ build the GNU C Library:
> As of release time, GNU 'make' 4.4.1 is the newest verified to work
> to build the GNU C Library.
>
> - * GCC 6.2 or newer
> + * GCC 11.1 or newer
>
> - GCC 6.2 or higher is required. In general it is recommended to use
> - the newest version of the compiler that is known to work for
> + GCC 11.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 14.1 is the newest compiler
> + better code. As of release time, GCC 14.2 is the newest compiler
> verified to work to build the GNU C Library.
>
> - For PowerPC 64-bits little-endian (powerpc64le), a GCC version with
> - support for '-mno-gnu-attribute', '-mabi=ieeelongdouble', and
> - '-mabi=ibmlongdouble' is required. Likewise, the compiler must
> - also support passing '-mlong-double-128' with the preceding
> - options. As of release, this implies GCC 7.4 and newer (excepting
> - GCC 7.5.0, see GCC PR94200). These additional features are
> - required for building the GNU C 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 AArch64 architecture builds with mathvec enabled, GCC 10 or
> - higher is needed due to dependency on arm_sve.h.
> -
> 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/configure b/configure
> index 2c2b19f9a6..4366b1f6c2 100755
> --- a/configure
> +++ b/configure
> @@ -5764,6 +5764,7 @@ if test $ac_verc_fail = yes; then
> fi
>
>
> +# Require GCC 11.1 to build.
> { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC is sufficient to build libc" >&5
> printf %s "checking if $CC is sufficient to build libc... " >&6; }
> if test ${libc_cv_compiler_ok+y}
> @@ -5778,7 +5779,7 @@ int
> main (void)
> {
>
> -#if !defined __GNUC__ || __GNUC__ < 6 || (__GNUC__ == 6 && __GNUC_MINOR__ < 2)
> +#if !defined __GNUC__ || __GNUC__ < 11 || (__GNUC__ == 11 && __GNUC_MINOR__ < 1)
> #error insufficient compiler
> #endif
> ;
> diff --git a/configure.ac b/configure.ac
> index 1de79bd729..62de722e61 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -573,9 +573,10 @@ AC_CHECK_PROG_VER(BISON, bison, --version,
> [bison (GNU Bison) \([0-9]*\.[0-9.]*\)],
> [2.7*|[3-9].*|[1-9][0-9]*], critic_missing="$critic_missing bison")
>
> +# Require GCC 11.1 to build.
> AC_CACHE_CHECK([if $CC is sufficient to build libc], libc_cv_compiler_ok, [
> AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[]], [[
> -#if !defined __GNUC__ || __GNUC__ < 6 || (__GNUC__ == 6 && __GNUC_MINOR__ < 2)
> +#if !defined __GNUC__ || __GNUC__ < 11 || (__GNUC__ == 11 && __GNUC_MINOR__ < 1)
> #error insufficient compiler
> #endif]])],
> [libc_cv_compiler_ok=yes],
> diff --git a/manual/install.texi b/manual/install.texi
> index 61745b88d8..e4ed7d9895 100644
> --- a/manual/install.texi
> +++ b/manual/install.texi
> @@ -531,32 +531,14 @@ As of release time, GNU @code{make} 4.4.1 is the newest verified to work
> to build @theglibc{}.
>
> @item
> -GCC 6.2 or newer
> +GCC 11.1 or newer
>
> -GCC 6.2 or higher is required. In general it is recommended to use
> +GCC 11.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 14.1 is the newest compiler verified to work to build
> +release time, GCC 14.2 is the newest compiler verified to work to build
> @theglibc{}.
>
> -For PowerPC 64-bits little-endian (powerpc64le), a GCC version with support
> -for @option{-mno-gnu-attribute}, @option{-mabi=ieeelongdouble}, and
> -@option{-mabi=ibmlongdouble} is required. Likewise, the compiler must also
> -support passing @option{-mlong-double-128} with the preceding options. As
> -of release, this implies GCC 7.4 and newer (excepting GCC 7.5.0, see GCC
> -PR94200). These additional features are required for building the GNU C
> -Library with support for IEEE long double.
> -
> -@c powerpc64le performs an autoconf test to verify the compiler compiles with
> -@c commands like "$CC -c foo.c -mabi=ibmlongdouble -mlong-double-128".
> -
> -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 AArch64 architecture builds with mathvec enabled, GCC 10 or higher is needed
> -due to dependency on arm_sve.h.
> -
> 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 67c3755c16..97f52524fb 100644
> --- a/sysdeps/s390/configure
> +++ b/sysdeps/s390/configure
> @@ -309,46 +309,6 @@ then
>
> fi
>
> -
> -
> -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC is sufficient to build libc on s390x" >&5
> -printf %s "checking if $CC is sufficient to build libc on s390x... " >&6; }
> -if test ${libc_cv_compiler_ok_on_s390x+y}
> -then :
> - printf %s "(cached) " >&6
> -else case e in #(
> - e)
> -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> -/* end confdefs.h. */
> -
> -int
> -main (void)
> -{
> -
> -#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_cpp "$LINENO"
> -then :
> - libc_cv_compiler_ok_on_s390x=yes
> -else case e in #(
> - e) libc_cv_compiler_ok_on_s390x=no ;;
> -esac
> -fi
> -rm -f conftest.err conftest.i conftest.$ac_ext ;;
> -esac
> -fi
> -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_compiler_ok_on_s390x" >&5
> -printf "%s\n" "$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 89c3e5b211..496866b850 100644
> --- a/sysdeps/s390/configure.ac
> +++ b/sysdeps/s390/configure.ac
> @@ -161,23 +161,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_PREPROC_IFELSE([AC_LANG_PROGRAM([[]], [[
> -#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])
> diff --git a/sysdeps/unix/sysv/linux/powerpc/configure b/sysdeps/unix/sysv/linux/powerpc/configure
> index 61ae675c1a..6fa7589530 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/configure
> +++ b/sysdeps/unix/sysv/linux/powerpc/configure
> @@ -1,89 +1,6 @@
> # This file is generated from configure.ac by Autoconf. DO NOT EDIT!
> # Local configure fragment for sysdeps/unix/sysv/linux/powerpc/.
>
> -
> -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC $CFLAGS -mlong-double-128 uses IBM extended format" >&5
> -printf %s "checking whether $CC $CFLAGS -mlong-double-128 uses IBM extended format... " >&6; }
> -if test ${libc_cv_mlong_double_128ibm+y}
> -then :
> - printf %s "(cached) " >&6
> -else case e in #(
> - e) save_CFLAGS="$CFLAGS"
> -CFLAGS="$CFLAGS -mlong-double-128"
> -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> -/* end confdefs.h. */
> -#include <float.h>
> -int
> -main (void)
> -{
> -
> -#if LDBL_MANT_DIG != 106
> -# error "compiler doesn't implement IBM extended format of long double"
> -#endif
> -long double foobar (long double x) { return x; }
> - ;
> - return 0;
> -}
> -_ACEOF
> -if ac_fn_c_try_compile "$LINENO"
> -then :
> - libc_cv_mlong_double_128ibm=yes
> -else case e in #(
> - e) libc_cv_mlong_double_128ibm=no ;;
> -esac
> -fi
> -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
> -CFLAGS="$save_CFLAGS" ;;
> -esac
> -fi
> -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mlong_double_128ibm" >&5
> -printf "%s\n" "$libc_cv_mlong_double_128ibm" >&6; }
> -
> -if test "$libc_cv_mlong_double_128ibm" = no; then
> - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC $CFLAGS supports -mabi=ibmlongdouble" >&5
> -printf %s "checking whether $CC $CFLAGS supports -mabi=ibmlongdouble... " >&6; }
> -if test ${libc_cv_mabi_ibmlongdouble+y}
> -then :
> - printf %s "(cached) " >&6
> -else case e in #(
> - e) save_CFLAGS="$CFLAGS"
> - CFLAGS="$CFLAGS -mlong-double-128 -mabi=ibmlongdouble"
> - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> -/* end confdefs.h. */
> -#include <float.h>
> -int
> -main (void)
> -{
> -
> -#if LDBL_MANT_DIG != 106
> -# error "compiler doesn't implement IBM extended format of long double"
> -#endif
> -long double foobar (long double x) { return x; }
> - ;
> - return 0;
> -}
> -_ACEOF
> -if ac_fn_c_try_compile "$LINENO"
> -then :
> - libc_cv_mabi_ibmlongdouble=yes
> -else case e in #(
> - e) libc_cv_mabi_ibmlongdouble=no ;;
> -esac
> -fi
> -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
> - CFLAGS="$save_CFLAGS" ;;
> -esac
> -fi
> -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mabi_ibmlongdouble" >&5
> -printf "%s\n" "$libc_cv_mabi_ibmlongdouble" >&6; }
> -
> - if test "$libc_cv_mabi_ibmlongdouble" = yes; then
> - CFLAGS="$CFLAGS -mabi=ibmlongdouble"
> - else
> - as_fn_error $? "this configuration requires -mlong-double-128 IBM extended format support" "$LINENO" 5
> - fi
> -fi
> -
> { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linker that supports --no-tls-get-addr-optimize" >&5
> printf %s "checking for linker that supports --no-tls-get-addr-optimize... " >&6; }
> libc_linker_feature=no
> diff --git a/sysdeps/unix/sysv/linux/powerpc/configure.ac b/sysdeps/unix/sysv/linux/powerpc/configure.ac
> index 8d2ec60f68..bcf0c62442 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/configure.ac
> +++ b/sysdeps/unix/sysv/linux/powerpc/configure.ac
> @@ -2,40 +2,6 @@ sinclude(./aclocal.m4)dnl Autoconf lossage
> GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
> # Local configure fragment for sysdeps/unix/sysv/linux/powerpc/.
>
> -AC_CACHE_CHECK(whether $CC $CFLAGS -mlong-double-128 uses IBM extended format,
> - libc_cv_mlong_double_128ibm, [dnl
> -save_CFLAGS="$CFLAGS"
> -CFLAGS="$CFLAGS -mlong-double-128"
> -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <float.h>]], [[
> -#if LDBL_MANT_DIG != 106
> -# error "compiler doesn't implement IBM extended format of long double"
> -#endif
> -long double foobar (long double x) { return x; }]])],
> - libc_cv_mlong_double_128ibm=yes,
> - libc_cv_mlong_double_128ibm=no)
> -CFLAGS="$save_CFLAGS"])
> -
> -if test "$libc_cv_mlong_double_128ibm" = no; then
> - AC_CACHE_CHECK(whether $CC $CFLAGS supports -mabi=ibmlongdouble,
> - libc_cv_mabi_ibmlongdouble, [dnl
> - save_CFLAGS="$CFLAGS"
> - CFLAGS="$CFLAGS -mlong-double-128 -mabi=ibmlongdouble"
> - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <float.h>]], [[
> -#if LDBL_MANT_DIG != 106
> -# error "compiler doesn't implement IBM extended format of long double"
> -#endif
> -long double foobar (long double x) { return x; }]])],
> - libc_cv_mabi_ibmlongdouble=yes,
> - libc_cv_mabi_ibmlongdouble=no)
> - CFLAGS="$save_CFLAGS"])
> -
> - if test "$libc_cv_mabi_ibmlongdouble" = yes; then
> - CFLAGS="$CFLAGS -mabi=ibmlongdouble"
> - else
> - AC_MSG_ERROR([this configuration requires -mlong-double-128 IBM extended format support])
> - fi
> -fi
> -
> LIBC_LINKER_FEATURE([--no-tls-get-addr-optimize], [-Wl,--no-tls-get-addr-optimize],
> [libc_cv_tls_get_addr_optimize=yes], [libc_cv_tls_get_addr_optimize=no])
> LIBC_CONFIG_VAR([have-tls-get-addr-optimize], [$libc_cv_tls_get_addr_optimize])
> --
> 2.47.1
>
--
H.J.
More information about the Libc-alpha
mailing list