[cfe-dev] [RFC] Bump up clang's __GNUC_MINOR__
pageexec at freemail.hu
Wed May 16 12:09:07 PDT 2012
On 16 May 2012 at 18:10, Benjamin Kramer wrote:
> However the problem is not compiling glibc. That's something
> completely different that won't ever work with clang unless the glibc
> maintainers move. It uses extensions that are broken beyond repair
> like __builtin_apply and -fno-toplevel-reorder, making it a lot worse
> to deal with than the linux kernel.
__builtin_return/__builtin_apply seem to be used in dlfcn/eval.c only
which is no longer built by glibc since 2004 according to git log.
-fno-toplevel-reorder can be a real problem, i wonder where glibc relies
on its behaviour though.
are you aware of any other incompatibility that prevents clang from
compiling glibc (i'm just preparing mentally for the day i get to try
this one day ;)?
> The problem is that glibc uses those extensions in the standard header
> files (if FORTIFY_SOURCE is specified) so any code base using e.g.
> stdio.h and FORTIFY_SOURCE will have to change the gcc version clang
> simulates, which is not acceptable.
ok, i misunderstood the original issue as being with glibc itself, not
with its headers used everywhere else. in that case i suggest that you
simply ignore this problem and stipulate that distros building with
clang not define _FORTIFY_SOURCE (it's not a big loss anyway).
More information about the cfe-dev