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]

Re: compiler standards (and/or min gcc version) supported with installedheaders ?


On 01/04/2013 05:09 PM, Carlos O'Donell wrote:
[...]
Thanks for putting this together and driving concensus here.

Thanks for the review, I'm appending a version that has your changes in it.


I assume your goal is to add this to the concensus section on the wiki
and to add it to INSTALL or some other file in the project?

I wanted to add this to the wiki but haven't figured out where exactly.


* glibc needs a recent GCC compiler version to build itself (right now
  "requires GCC version 4.3 or newer to build; GCC 4.6 is
  recommended.")

* Userland applications and libraries that use glibc's headers and
  libraries can be built by a variety of compilers.

The following community concensus applies to glibc's headers:

  - The installed headers shall 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 supported compiler, with some
    architectures requiring more recent versions.
  - GCC versions older than 2.95.3 may still be used, but no
    optimizations or special allowances are made for them.
  - Compiler dependent code shall be protected by 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


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