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