This is the mail archive of the 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: why Glibc does not build with clang?

Thanks for moving the (interesting!) alloca discussion to a separate subject.
Any comments on the original questions?


On Fri, May 16, 2014 at 3:26 PM, Konstantin Serebryany
<> wrote:
> Hello,
> Today if you try to build Glibc with clang the compilation will fail
> on a few dozen files.
> The largest offenders are local functions [1] and VLAIS [2].
> There are ~5 other easily fixable things, not worth discussing.
> Would the Glibc team consider patches that remove local functions and VLAIS?
> Is there any reason (technical/political/social/religious?) to keep
> non-standard extensions
> in Glibc, or this is just a lack of hands to do the cleanup?
> (No intention to initiate a holly war, just want to know :)
> Ability to build with clang may bring some new benefits to Glibc developers,
> such as new warnings or some dynamic testing tools not available in GCC.
> In particular I am interested in building Glibc with MemorySanitizer
> to find bugs
> in Glibc itself and to find more bugs in user code.
> Thanks (and excuse me if this is some trivial FAQ),
> --kcc
> [1]
> "error: function definition is not allowed here"
> elf/dl-deps.c:159
> elf/dl-load.c:2388
> elf/dl-lookup.c:131
> elf/dl-lookup.c:315
> elf/do-rel.h:45
> elf/get-dynamic-info.h:28
> locale/weight.h:23  # included into other files.
> locale/weightwc.h:23
> nss/makedb.c:662
> malloc/malloc.c:5045
> crypt/md5-crypt.c:273
> nptl/allocatestack.c:836
> stdio-common/printf_fp.c:219
> locale/programs/ld-ctype.c:2946
> locale/programs/locale.c:802
> locale/programs/locale.c:834
> posix/regcomp.c:2787
> posix/regcomp.c:2813
> posix/regcomp.c:2882
> posix/regcomp.c:2962
> stdlib/rpmatch.c:36
> sha256-crypt.c:346
> sha512-crypt.c:345
> sysdeps/x86_64/dl-machine.h:239 #included into other files
> [2]
> error: fields must have a constant size: 'variable length array in
> structure'
> extension will never be supported
> nscd/nscd_helper.c:192
> iconv/iconv_charmap.c:388
> nscd/nscd.c:387
> nscd/netgroupcache.c:148

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