llvm-test failures on FreeBSD

I'm getting a large number of failures with this error:

gccld: error: Cannot link in module '/home/llvm-gcc/install/lib/libstdc++.a(ostream-inst.o)': Linking globals named '_ZN16__Atomicity_lockILi0EE17_S_atomicity_lockE': symbol multiply defined!
gccld: error: Cannot link archive '/home/llvm-gcc/install/lib/libstdc++.a'

Any simple solution? Or is this a bug?

From the CFEBuildInstrs.html document:

Fix 2: If you are building the C++ front-end on a CPU we haven't tried
yet, you will probably have to edit the appropriate version of
atomicity.h under src/libstdc++-v3/config/cpu/name-of-cpu/atomicity.h
and apply a patch so that it does not use inline assembly.

Not sure if that's related or not.

Could you provide the bytecode file you're linking, the gccld command
line, and etc. so I can replicate this? It sounds like a bug.



This is a bug (http://llvm.cs.uiuc.edu/PR480). As a work around, please just comment out this line of i*86/atomicity.h in libstdc++:

template volatile int __Atomicity_lock<0>::_S_atomicity_lock;

I'm currently out of town, but I hope to get this PR resolved when I get back in early January.