This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Require GCC 4.3 or later to build glibc


This patch restricts the supported GCC versions for building the
library to 4.3 and later, with 4.6 consistently recommended (rather
than variably recommending 4.1 or 4.4 in quick succession) as the
current stable release series.  The configure test is made to accept
versions 5-9 as some future proofing.  A sentence about bugs in GCC
2.7 and 2.8 is removed since it doesn't seem relevant now to single
out particular bugs in very old compilers among all the bugs in all
the possible compilers people might use.

For x86 and x86_64, 4.3 was already required because cpuid.h was
required and earlier versions did not install that header.  So older
versions will not be well-tested for building current glibc.

Note: I have not tested building current glibc with 4.3, 4.4 or 4.5 so
I don't actually know if those versions work, just that older ones
can't be used on x86 and x86_64.  It definitely works with 4.6 on x86
and x86_64.

I didn't try to clean up __GNUC_PREREQ uses (in non-installed code)
for 4.3 and older versions, since Marek Polacek volunteered in
<http://sourceware.org/ml/libc-alpha/2012-02/msg00403.html> to do
that.  And I didn't clean up the many old compiler references in the
FAQ (many suggesting compilers much older than 3.4) given the general
plan to migrate the still-current parts of the FAQ to the wiki.

Comments?

2012-02-23  Joseph Myers  <joseph@codesourcery.com>

	* configure.in (CC): Restrict allowed GCC versions to 4.3 and
	later.  Allow versions 5-9.
	* manual/install.texi (Tools for Compilation): Give GCC 4.3 as
	required minimum version and 4.6 as recommended version.  Do not
	mention bugs in GCC 2.7 and 2.8.

diff --git a/configure.in b/configure.in
index af42c8a..bd9a463 100644
--- a/configure.in
+++ b/configure.in
@@ -932,7 +932,7 @@ AC_CHECK_PROG_VER(LD, $LD, --version,
 # These programs are version sensitive.
 AC_CHECK_TOOL_PREFIX
 AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v,
-  [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ],
+  [version \([egcygnustpi-]*[0-9.]*\)], [4.[3-9].* | 4.[1-9][0-9].* | [5-9].* ],
   critic_missing="$critic_missing gcc")
 AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version,
   [GNU Make[^0-9]*\([0-9][0-9.]*\)],
diff --git a/manual/install.texi b/manual/install.texi
index 1656c5e..bbb2482 100644
--- a/manual/install.texi
+++ b/manual/install.texi
@@ -312,21 +312,13 @@ recommend GNU @code{make} version 3.79.  All earlier versions have severe
 bugs or lack features.
 
 @item
-GCC 3.4 or newer, GCC 4.1 recommended
-
-GCC 3.4 or higher is required; as of this
-writing, GCC 4.4 is the compiler we advise to use for current versions.
-On certain machines including @code{powerpc64}, compilers prior to GCC
-4.0 have bugs that prevent them compiling the C library code.  On other
-machines, GCC 4.1 is required to build the C
-library with support for the correct @code{long double} type format;
-these include @code{powerpc} (32 bit), @code{s390} and @code{s390x}.  For
-other architectures special compiler-provided headers are needed
-(like @file{cpuid.h} on x86) which only come with later compiler versions.
+GCC 4.3 or newer, GCC 4.6 recommended
+
+GCC 4.3 or higher is required; as of this writing, GCC 4.6 is the
+compiler we advise to use to build the GNU C library.
 
 You can use whatever compiler you like to compile programs that use GNU
-libc, but be aware that both GCC 2.7 and 2.8 have bugs in their
-floating-point support that may be triggered by the math library.
+libc.
 
 Check the FAQ for any special compiler issues on particular platforms.
 

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]