Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(655)

Unified Diff: sys-libs/zlib/files/zlib-1.2.3-visibility-support.patch

Issue 6776028: Upgrade libxml2 and its portage dependencies (Closed) Base URL: ssh://gitrw.chromium.org:9222/portage-stable.git@master
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sys-libs/zlib/files/zlib-1.2.3-visibility-support.patch
diff --git a/sys-libs/zlib/files/zlib-1.2.3-visibility-support.patch b/sys-libs/zlib/files/zlib-1.2.3-visibility-support.patch
new file mode 100644
index 0000000000000000000000000000000000000000..ceb065e9c7bb90760757a59e33f27aff198f9226
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.2.3-visibility-support.patch
@@ -0,0 +1,45 @@
+Only export symbols that should be exported.
+
+Patch by Mike Frysinger
+
+http://bugs.gentoo.org/32764
+http://bugs.gentoo.org/149929
+
+--- zlib-1.2.3/configure
++++ zlib-1.2.3/configure
+@@ -209,6 +209,20 @@
+ fi
+
+ cat > $test.c <<EOF
++int foo __attribute__ ((visibility ("hidden")));
++int main()
++{
++ return 0;
++}
++EOF
++if ($CC -c -fvisibility=hidden $CFLAGS $test.c) 2>/dev/null; then
++ CFLAGS="$CFLAGS -DHAS_attribute_visibility -fvisibility=hidden"
++ echo "Checking for attribute(visibility) support... Yes."
++else
++ echo "Checking for attribute(visibility) support... No."
++fi
++
++cat > $test.c <<EOF
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include "zconf.h"
+--- zlib-1.2.3/zconf.in.h
++++ zlib-1.2.3/zconf.in.h
+@@ -244,7 +244,11 @@
+ #endif
+
+ #ifndef ZEXTERN
+-# define ZEXTERN extern
++# if defined(ZLIB_INTERNAL) && defined(HAS_attribute_visibility)
++# define ZEXTERN extern __attribute__ ((visibility("default")))
++# else
++# define ZEXTERN extern
++# endif
+ #endif
+ #ifndef ZEXPORT
+ # define ZEXPORT
« no previous file with comments | « sys-libs/zlib/files/zlib-1.2.3-r1-bsd-soname.patch ('k') | sys-libs/zlib/files/zlib-1.2.5-fbsd_chosts.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698