This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: compiler standards (and/or min gcc version) supported with installedheaders ?
- From: Andreas Jaeger <aj at suse dot com>
- To: libc-alpha at sourceware dot org
- Date: Fri, 04 Jan 2013 11:12:04 +0100
- Subject: Re: compiler standards (and/or min gcc version) supported with installedheaders ?
- References: <201212282357.52390.vapier@gentoo.org> <50E53F6C.2070805@suse.com> <201301031531.21968.vapier@gentoo.org>
Here're some minor changes. Please review whether the language itself is
clear,
Andreas
* 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
notes:
- The installed headers should work with any compiler that:
* supports at least ISO C 90 (or C++98)
* supports the type "long long"
- GCC version 2.95.3 is the oldest compiler supported in general
(for some more recent hardware architectures a more recent
compiler will be needed)
- Compiler dependend code needs to be protected by proper feature
test macros. For example the various GCC __builtin_X functions can
be used but need to be properly guarded.
- The glibc header files might include special optimizations for
newer compiler versions which might not be available for older
compilers
- The header files for glibc use GCC 4.3 as baseline for
optimizations
- 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.
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126