diff mbox

RFC: requiring GCC >= 4.7 to build glibc

Message ID alpine.DEB.2.10.1510141630430.20331@digraph.polyomino.org.uk
State New
Headers show

Commit Message

Joseph Myers Oct. 14, 2015, 4:33 p.m. UTC
On Thu, 20 Aug 2015, Mike Frysinger wrote:

> On 20 Aug 2015 13:51, Joseph Myers wrote:
> > For glibc 2.21 we increased the minimum GCC version for building glibc to 
> > 4.6.  There's one major GCC release a year, so the correspondingly old 
> > version for glibc 2.23 would be GCC 4.7.  What do people think about 
> > increasing the minimum version requirement?
> 
> i'd like to see the diff (not exact, but at least get an idea).
> the bullet points below don't seem terribly compelling to me.

Here is a 14-patch series for requiring GCC 4.7 and making consequent
cleanups.  I have't written ChangeLog entries or other write-ups for
individual patches, or tested the individual patches on their own, or
done non-x86_64 testing where applicable, or done comparisons of
installed shared libraries to make sure there aren't unexpected
changes, but it should be illustrative of what requiring GCC 4.7 would
enable (which I think is more than most such version increments).

None of these changes should have any effects on binutils version
requirements, as binutils 2.22 supports both AVX2 and ARM TLS
descriptors (although I think a move to requiring 2.23 makes sense on
general principles of time-based updates to such requirements).

1. Require GCC >= 4.7 to build glibc.
2. Use -std-gnu11 instead of -std=gnu99.
3. Use -std=c11 for C11 conform/ tests.
4. Remove pre-GCC-4.7 conform/ test XFAILs.
5. Add -std=gnu11 and -std=c11 NPTL initializers tests.
6. Use C11 *_TRUE_MIN macros where applicable.
7. Use C11 *_DECIMAL_DIG macros in libm-test.inc.
8. Use C11 CMPLX* macros in libm tests.
9. Remove MIPS16 atomics using __sync_* (bug 17404).
10. Remove GCC version conditionals on -Wmaybe-uninitialized pragmas.
11. Remove miscellaneous GCC >= 4.7 version conditionals.
12. Remove configure tests for AVX2 support.
13. Remove configure test for ARM TLS descriptors support.
14. Use max_align_t from <stddef.h>.

Comments

Florian Weimer Oct. 15, 2015, 1:25 p.m. UTC | #1
On 10/14/2015 06:33 PM, Joseph Myers wrote:
> Here is a 14-patch series for requiring GCC 4.7 and making consequent
> cleanups.  I have't written ChangeLog entries or other write-ups for
> individual patches, or tested the individual patches on their own, or
> done non-x86_64 testing where applicable, or done comparisons of
> installed shared libraries to make sure there aren't unexpected
> changes, but it should be illustrative of what requiring GCC 4.7 would
> enable (which I think is more than most such version increments).

I read through the patches, and they look okay to me.

> None of these changes should have any effects on binutils version
> requirements, as binutils 2.22 supports both AVX2 and ARM TLS
> descriptors (although I think a move to requiring 2.23 makes sense on
> general principles of time-based updates to such requirements).

I can only test GCC 4.7 easily with binutils 2.22.  Maybe there are
other distributions which offer a 4.7-on-2.23 configuration, though.

Florian
Joseph Myers Oct. 15, 2015, 4:08 p.m. UTC | #2
On Thu, 15 Oct 2015, Florian Weimer wrote:

> On 10/14/2015 06:33 PM, Joseph Myers wrote:
> > Here is a 14-patch series for requiring GCC 4.7 and making consequent
> > cleanups.  I have't written ChangeLog entries or other write-ups for
> > individual patches, or tested the individual patches on their own, or
> > done non-x86_64 testing where applicable, or done comparisons of
> > installed shared libraries to make sure there aren't unexpected
> > changes, but it should be illustrative of what requiring GCC 4.7 would
> > enable (which I think is more than most such version increments).
> 
> I read through the patches, and they look okay to me.

Thanks.  The question at this point is more whether people think these 
changes provide sufficient justification for the version requirement, 
taking into account the concerns expressed by Mike and David.  (See 
Carlos's definition at <https://sourceware.org/glibc/wiki/Consensus>, 
"Consensus need not imply unanimity.".)  The patches would be posted 
individually for review (except where they fall within areas I maintain - 
patches 3, 4, 6, 7, 8, 9, 13) if consensus on the version requirement is 
reached.

(I've realised that patch 1 is missing a NEWS update.)
diff mbox

Patch

diff --git a/INSTALL b/INSTALL
index ca847e2..eb02c65 100644
--- a/INSTALL
+++ b/INSTALL
@@ -357,9 +357,9 @@  build the GNU C Library:
      recommend GNU 'make' version 3.79.  All earlier versions have
      severe bugs or lack features.
 
-   * GCC 4.6 or newer
+   * GCC 4.7 or newer
 
-     GCC 4.6 or higher is required.  In general it is recommended to use
+     GCC 4.7 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 4.9.2 is the newest compiler
diff --git a/configure b/configure
index f0cd175..c5510f6 100755
--- a/configure
+++ b/configure
@@ -5071,7 +5071,7 @@  int
 main ()
 {
 
-#if !defined __GNUC__ || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6)
+#if !defined __GNUC__ || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7)
 #error insufficient compiler
 #endif
   ;
diff --git a/configure.ac b/configure.ac
index 75a3a77..ea89b3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -975,7 +975,7 @@  AC_CHECK_PROG_VER(AWK, gawk, --version,
 
 AC_CACHE_CHECK([if $CC is sufficient to build libc], libc_cv_compiler_ok, [
 AC_TRY_COMPILE([], [
-#if !defined __GNUC__ || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6)
+#if !defined __GNUC__ || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7)
 #error insufficient compiler
 #endif],
 	       [libc_cv_compiler_ok=yes],
diff --git a/manual/install.texi b/manual/install.texi
index c502446..e9fff25 100644
--- a/manual/install.texi
+++ b/manual/install.texi
@@ -400,9 +400,9 @@  recommend GNU @code{make} version 3.79.  All earlier versions have severe
 bugs or lack features.
 
 @item
-GCC 4.6 or newer
+GCC 4.7 or newer
 
-GCC 4.6 or higher is required.  In general it is recommended to use
+GCC 4.7 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 4.9.2 is the newest compiler verified to work to build