On Tue, Feb 28, 2012 at 3:10 PM, Rafael Espíndola <[email protected]> wrote: > 2012/2/28 Jeffrey Yasskin <[email protected]>: >> Hm, what if you link Firefox against libunwind's .so instead of >> libgcc_s's? Is there a way to define headers so they work either >> statically or dynamically linked? Is this a bug in libunwind's >> headers? > > That would not work. Once we have a hidden undefined reference we > cannot resolve it with a shared library. That is why gcc's (and > clang's) header have visibility attributes.
Oh, you should mention that you're building with -fvisibility=hidden. You want clang's unwind.h to push "default" around the #include_next? That seems reasonable, but it also seems to indicate a bug in libunwind's header. Have you filed that? Do they agree that it's a bug, or is there a reason that they shouldn't override the user-chosen visibility in their header file? The gcc manual does say, "Be aware that headers from outside your project, in particular system headers and headers from any other library you use, may not be expecting to be compiled with visibility other than the default. You may need to explicitly say `#pragma GCC visibility push(default)' before including any such headers.", so maybe it makes more sense for Firefox to specify the visibility it wants before #including unwind.h? Jeffrey _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
