This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/54908] misc regressions on emutls targets remain from dynamic initialization of non-function-local TLS variables
- From: "howarth at nitro dot med.uc.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 16 Oct 2012 15:50:45 +0000
- Subject: [Bug target/54908] misc regressions on emutls targets remain from dynamic initialization of non-function-local TLS variables
- Auto-submitted: auto-generated
- References: <bug-54908-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54908
--- Comment #10 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-10-16 15:50:45 UTC ---
Note that the fix in comment 9 for libgomp/testsuite/libgomp.c++/pr24455.C
works for Xcode 3.2.6 and earlier on darwin10 but not Xcode 4.2. This is
because Apple broke weak symbol lookup in Xcode 4.2's linker (radr://10466868,
"-undefined dynamic_lookup linker bug"). This issue wasn't fixed until Xcode
4.4 (which is only available on darwin11 and darwin12).
Note that a simple testcase for this bug is...
--------------- weak.c ---------------------
#include <stdio.h>
char *myweakfunc(void) __attribute__((weak)) ;
int main(int argc, char **argv)
{
if (myweakfunc)
printf ("found myweakfunc %s\n", myweakfunc());
else
printf("Weak func not found\n");
return 0;
}
--------------------------------------------
% gcc weak.c -o wk -undefined dynamic_lookup
% ./wk
Weak func not found