2011/10/29 Grzegorz Dąbrowski <grzegorz.dabrowski@xxxxxxxxx>: > On Fri, Oct 28, 2011 at 1:03 PM, Paul Davey <plmdvy@xxxxxxxxx> wrote: >> While trying to build libroot with clang, it errored out on >> src/system/libroot/posix/arch/x86/fenv.c complaining about the lines >> containing __weak_reference > > Can you paste compiler output? > As I remebmer, function declaration was incomplete in fenv.c, see > http://svn.gna.org/viewcvs/pingwinek/trunk/projects/tiltos/haiku-clang-llvm-hacks.patch?revision=13783&view=markup The compiler error does not give the cause of the error. The code is trying to use the __weak_reference built-in or macro or whatever it is to create weak references for these functions, however the macro isnt defined so clang treats those lines as function declarations. They are not function declarations and your patches solution for them is not correct, but I cant see how gcc is meant to deal with these though. Paul