Author: rafael
Date: Wed Mar 28 22:37:17 2012
New Revision: 153633
URL: http://llvm.org/viewvc/llvm-project?rev=153633&view=rev
Log:
unwind.h fix for -fvisibility=hidden users. This fixes firefox build in a system
with libunwind installed.
Patch by Jeffrey Yasskin!
Modified:
cfe/trunk/lib/Headers/unwind.h
Modified: cfe/trunk/lib/Headers/unwind.h
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/unwind.h?rev=153633&r1=153632&r2=153633&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/unwind.h (original)
+++ cfe/trunk/lib/Headers/unwind.h Wed Mar 28 22:37:17 2012
@@ -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