[cfe-dev] [RFC] Bump up clang's __GNUC_MINOR__

Benjamin Kramer benny.kra at googlemail.com
Wed May 16 07:08:10 PDT 2012


On 16.05.2012, at 15:40, Rafael EspĂ­ndola wrote:

>> So far we got away rather well with only implementing a more or less sane subset of gcc extensions even if our GNUC_MINOR suggests that we support all of them up to gcc 4.2 (including __builtin_apply and nested functions). So now thanks to the piece of software glibc is we're stuck at gcc 4.2 even though our subset of extensions expands greatly beyond that.
> 
> What version of glibc do we have to support? It does look like the
> current maintainers are more reasonable, so if the really bad parts
> were fixed we   might be able to bump GNUC_MINOR one day.
> 
> Would it be worth it trying to bump it to only 4.3 for now?

__builtin_va_arg_pack was introduced in 4.3 and is used by glibc as a wrapper for many vararg functions when FORTIFY_SOURCE is enabled. We can't afford breaking open(2) for everyone on linux :(

Arguing against uses of __builtin_va_arg_pack is also hard, as the only other way to implement the same features for FORTIFY_SOURCE is a variadic macro. While this is perfectly fine with the standard, some code may break if it sees a macro instead of a real function.

It may be possible to persuade the glibc maintiners into using the same fallback path as gcc 4.2 uses (some stuff is implemented with macros and some checks seem to be missing). But turnaround time for glibc is really slow. Debian stable is still stuck at a 3 year old version and RHEL is probably even older.

- Ben






More information about the cfe-dev mailing list