Require GCC 6.2 or later to build glibc
Commit Message
As discussed during development for glibc 2.29, when we increased the
required minimum GCC version for building glibc to GCC 5, working
purely based on the times at which such requirements have been
increased in the past it would be appropriate for glibc 2.30 to
require GCC 6 (matching GCC 4.9 having been required for glibc 2.26).
Naming 6.2 specifically as the minimum version then means a separate
version requirement no longer needs to be specified for powerpc64le.
Thus, this patch increases the minimum to 6.2, removing the
documentation of the separate requirement for powerpc64le. It does
not remove the powerpc64le configure test, or any __GNUC_PREREQ that
could be removed as not being in installed headers or files shared
with gnulib; I think such cleanups are best done separately.
Tested for x86_64.
2019-01-31 Joseph Myers <joseph@codesourcery.com>
* configure.ac (libc_cv_compiler_ok): Require GCC 6.2 or later.
* configure: Regenerated.
* manual/install.texi (Tools for Compilation): Update minimum GCC
version.
* INSTALL: Regenerated.
Comments
* Joseph Myers:
> Thus, this patch increases the minimum to 6.2, removing the
> documentation of the separate requirement for powerpc64le. It does
> not remove the powerpc64le configure test, or any __GNUC_PREREQ that
> could be removed as not being in installed headers or files shared
> with gnulib; I think such cleanups are best done separately.
Agreed.
> 2019-01-31 Joseph Myers <joseph@codesourcery.com>
>
> * configure.ac (libc_cv_compiler_ok): Require GCC 6.2 or later.
> * configure: Regenerated.
> * manual/install.texi (Tools for Compilation): Update minimum GCC
> version.
> * INSTALL: Regenerated.
Patch looks okay to me, thanks.
Florian
On Thu, Jan 31 2019, Joseph Myers wrote:
>
> Thus, this patch increases the minimum to 6.2, removing the
> documentation of the separate requirement for powerpc64le. It does
> not remove the powerpc64le configure test, or any __GNUC_PREREQ that
> could be removed as not being in installed headers or files shared
> with gnulib; I think such cleanups are best done separately.
I'd like to keep the tests for powerpc64le requirements, namely, the
checks for the presence of quad-precision builtins, and POWER8 as target
(sysdeps/powerpc/powerpc64/le/configure.ac). Was it your intention to
suggest that we should remove the check for the builtins or are these
cleanups about __GNUC_PREREQ alone?
The patch looks good to me.
On Fri, 1 Feb 2019, Gabriel F. T. Gomes wrote:
> On Thu, Jan 31 2019, Joseph Myers wrote:
> >
> > Thus, this patch increases the minimum to 6.2, removing the
> > documentation of the separate requirement for powerpc64le. It does
> > not remove the powerpc64le configure test, or any __GNUC_PREREQ that
> > could be removed as not being in installed headers or files shared
> > with gnulib; I think such cleanups are best done separately.
>
> I'd like to keep the tests for powerpc64le requirements, namely, the
> checks for the presence of quad-precision builtins, and POWER8 as target
> (sysdeps/powerpc/powerpc64/le/configure.ac). Was it your intention to
> suggest that we should remove the check for the builtins or are these
> cleanups about __GNUC_PREREQ alone?
I'd suggest removing the libc_cv_compiler_powerpc64le_binary128_ok
configure test, as well as __GNUC_PREREQ calls, since the minimum GCC
version should imply those built-in functions are available. I think the
point of such configure tests (for conditions that, if not met, would
result in a build failure anyway) is to ensure a helpful early error
saying what the problem is in the most likely cases of something wrong
with the build tools (such as GCC being too old) - not to cover every
theoretically possible form of compiler breakage (such as a 6.2 compiler
somehow having had support for those built-in functions removed).
@@ -459,19 +459,14 @@ 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 5 or newer
+ * GCC 6.2 or newer
- GCC 5 or higher is required. In general it is recommended to use
+ 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
building the GNU C Library, as newer compilers usually produce
better code. As of release time, GCC 8.2.1 is the newest compiler
verified to work to build the GNU C Library.
- For PowerPC 64-bits little-endian (powerpc64le), GCC 6.2 or higher
- is required. This compiler version is the first to provide the
- features required for building the GNU C Library with support for
- '_Float128'.
-
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
@@ -17,7 +17,10 @@ Deprecated and removed features, and other changes affecting compatibility:
Changes to build and runtime requirements:
- [Add changes to build and runtime requirements here]
+* GCC 6.2 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.
Security related changes:
@@ -5119,7 +5119,7 @@ int
main ()
{
-#if !defined __GNUC__ || __GNUC__ < 5
+#if !defined __GNUC__ || __GNUC__ < 6 || (__GNUC__ == 6 && __GNUC_MINOR__ < 2)
#error insufficient compiler
#endif
;
@@ -1017,7 +1017,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__ < 5
+#if !defined __GNUC__ || __GNUC__ < 6 || (__GNUC__ == 6 && __GNUC_MINOR__ < 2)
#error insufficient compiler
#endif],
[libc_cv_compiler_ok=yes],
@@ -499,18 +499,14 @@ As of relase time, GNU @code{make} 4.2.1 is the newest verified to work
to build @theglibc{}.
@item
-GCC 5 or newer
+GCC 6.2 or newer
-GCC 5 or higher is required. In general it is recommended to use
+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 building
@theglibc{}, as newer compilers usually produce better code. As of
release time, GCC 8.2.1 is the newest compiler verified to work to build
@theglibc{}.
-For PowerPC 64-bits little-endian (powerpc64le), GCC 6.2 or higher is
-required. This compiler version is the first to provide the features
-required for building @theglibc{} with support for @code{_Float128}.
-
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