On 12/29/2012 05:57 AM, Mike Frysinger wrote:
seems like something we should have spelled out in the manual and/or faq.
what standards do we want to support with installed headers ? and similarly,
what min gcc version ?
going by features.h, it seems like we support very old standards, which means
it should be easy to support old gcc versions too. a quick grep on my system
shows we have __GNUC_PREREQ(2,0).
based on the comments in this thread, I wrote the following proposal.
I've tried to separate the proposal into two discussion points:
First, what are the requirements. Second which compiler versions to
* glibc needs a recent GCC compiler version to build itself (right now
at least 4.3 required, 4.6 or newer recommended)
* Userland applications and libraries that use glibc's headers and
libraries can be build by a variety of compilers with the following
- The compiler needs to support at least ISO C 90 (or C++98)
- The compiler needs to support the type "long long"
- GCC version X  is the oldest compiler supported in general (for some
more recent hardware architectures a more recent compiler will be
- The glibc header files might include special optimizations for
newer compiler versions which might not be available for older
- The header files for glibc use GCC Y  as baseline for such
- Support for other compilers besides GCC might need extra patches
which are welcome to be submitted for inclusion glibc
- For headers shared with gnulib, other conditions do apply (the
requirements from gnulib to support even older compilers)
To support different compilers, we would ideally not test - as today -
for a specific GCC version but for a specific feature.
So, instead of __GNUC_PREREQ(x,y) to check for a specific version in
some header file, the advise is to add a macro to features.h, like
__GLIBC_HAVE_BUILTIN_COMPLEX and use that - and that macro definition
is dependend on compiler versions.
I propose to use GCC 2.95.3 as baseline and GCC 4.3 - the same one we
use for building of glibc - for the optimization part.
Would this work?