Rafael, does this patch fix the Mozilla build with libunwind installed?
commit 9f021424046ae0149c7d600003091ecd121441e6
Author: Jeffrey Yasskin <[email protected]>
Date: Sat Mar 10 18:32:27 2012 -0800
Push default visibility around the #include_next<unwind.h> so that
projects using -fvisibility=hidden can continue to call unwind
functions defined in a separate shared library.
diff --git a/lib/Headers/unwind.h b/lib/Headers/unwind.h
index a99c8a1..a065920 100644
--- a/lib/Headers/unwind.h
+++ b/lib/Headers/unwind.h
@@ -31,7 +31,19 @@
# define _SHOULD_UNDEFINE_GNU_SOURCE
# define _GNU_SOURCE
# endif
-# include_next <unwind.h>
+// libunwind's unwind.h reflects the current visibility. However, Mozilla
+// builds with -fvisibility=hidden and relies on gcc's unwind.h to reset the
+// visibility to default and export its contents. gcc also allows users to
+// override its override by #defining HIDE_EXPORTS (but note, this only obeys
+// the user's -fvisibility setting; it doesn't hide any exports on its own). We
+// imitate gcc's header here:
+# ifdef HIDE_EXPORTS
+# include_next <unwind.h>
+# else
+# pragma GCC visibility push(default)
+# include_next <unwind.h>
+# pragma GCC visibility pop
+# endif
# ifdef _SHOULD_UNDEFINE_GNU_SOURCE
# undef _GNU_SOURCE
# undef _SHOULD_UNDEFINE_GNU_SOURCE
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits