http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54908
--- Comment #9 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-10-15
14:24:00 UTC ---
(In reply to comment #7)
> (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?
At r192457 on x86_64-apple-darwin12, this failure still exists but can be
converted into passes with the change...
Index: libgomp/testsuite/libgomp.c++/pr24455.C
===================================================================
--- libgomp/testsuite/libgomp.c++/pr24455.C (revision 192457)
+++ libgomp/testsuite/libgomp.c++/pr24455.C (working copy)
@@ -1,6 +1,7 @@
// { dg-do run }
// { dg-additional-sources pr24455-1.C }
// { dg-require-effective-target tls_runtime }
+// { dg-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } }
extern "C" void abort (void);
The failures at -m32/-m64 of...
FAIL: libgomp.c++/tls-init1.C -O (test for excess errors)
WARNING: libgomp.c++/tls-init1.C -O compilation failed to produce executable
still remain due to the usage of ASM_OUTPUT_DEF as with the remaining failing
g++.dg testcases.