http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54908
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2012-10-15 07:43:16 UTC --- (In reply to comment #5) > Undefined symbols: > "TLS init function for i", referenced from: > TLS wrapper function for i in ccoTk54U.o > __ZTH1i$non_lazy_ptr in ccoTk54U.o > (maybe you meant: __ZTH1i$non_lazy_ptr) The wrapper tries to use a weak reference to the init function so that if the variable doesn't need dynamic initialization it can just omit the init function so the wrapper won't call it. This seems to not be working on darwin, but I thought darwin had weakrefs?