aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2025-02-12 12:53:09 +0800
committerH.J. Lu <hjl.tools@gmail.com>2025-03-31 08:04:29 -0700
commit27b96e069aad17cefea9437542180bff448ac3a0 (patch)
tree2d204676120550fcf53dd3ba256cac3694f3ff6b /sysdeps
parentdbb2880e61bf2b2906a40ed00181a831d3a65798 (diff)
downloadglibc-27b96e069aad17cefea9437542180bff448ac3a0.zip
glibc-27b96e069aad17cefea9437542180bff448ac3a0.tar.gz
glibc-27b96e069aad17cefea9437542180bff448ac3a0.tar.bz2
Raise the minimum GCC version to 12.1 [BZ #32539]
For all Linux distros with glibc 2.40 which I can find, GCC 14.2 is used to compile glibc 2.40: OS GCC URL AOSC 14.2.0 https://aosc.io/ Arch Linux 14.2.0 https://archlinux.org/ ArchPOWER 14.2.0 https://archlinuxpower.org/ Artix 14.2.0 https://artixlinux.org/ Debian 14.2.0 https://www.debian.org/ Devuan 14.2.0 https://www.devuan.org/ Exherbo 14.2.0 https://www.exherbolinux.org/ Fedora 14.2.1 https://fedoraproject.org/ Gentoo 14.2.1 https://gentoo.org/ Kali Linux 14.2.0 https://www.kali.org/ KaOS 14.2.0 https://kaosx.us/ LiGurOS 14.2.0 https://liguros.gitlab.io/ Mageia 14.2.0 https://www.mageia.org/en/ Manjaro 14.2.0 https://manjaro.org/ NixOS 14.2.0 https://nixos.org/ openmamba 14.2.0 https://openmamba.org/ OpenMandriva 14.2.0 https://openmandriva.org/ openSUSE 14.2.0 https://www.opensuse.org/ Parabola 14.2.0 https://www.parabola.nu/ PLD Linux 14.2.0 https://pld-linux.org/ PureOS 14.2.0 https://pureos.net/ Raspbian 14.2.0 http://raspbian.org/ Slackware 14.2.0 http://www.slackware.com/ Solus 14.2.0 https://getsol.us/ T2 SDE 14.2.0 http://t2sde.org/ Ubuntu 14.2.0 https://www.ubuntu.com/ Wikidata 14.2.0 https://wikidata.org/ Support older versions of GCC to build glibc 2.42: 1. Need to work around bugs in older versions of GCC. 2. Can't use the new features in newer versions of GCC, which may be required for new features, like _Float16 which requires GCC 12.1 or above, in glibc, The main benefit of supporting older versions of GCC is easier backport of bug fixes to the older releases of glibc, which can be mitigated by avoiding incompatible features in newer versions of GCC for critical bug fixes. Require GCC 12.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. For glibc developers who are using Linux OSes which don't come with GCC 12.1 or newer, they should build and install GCC 12.1 or newer to work on glibc. This fixes BZ #32539. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/s390/configure40
-rw-r--r--sysdeps/s390/configure.ac18
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/configure83
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/configure.ac34
4 files changed, 0 insertions, 175 deletions
diff --git a/sysdeps/s390/configure b/sysdeps/s390/configure
index 67c3755..97f5252 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 89c3e5b..496866b 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 61ae675..6fa7589 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 8d2ec60..bcf0c62 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])