aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Turner <digit@android.com>2010-12-07 06:28:51 -0800
committerAndroid Code Review <code-review@android.com>2010-12-07 06:28:51 -0800
commit1e0a1b89d72d527a388ea66a298c06f22da39f42 (patch)
tree27bae8d6e6f777b68b407e21379adbb077a10d84
parent5f6bd84e375226bf228fc8ac90318957ec9e1e7f (diff)
parent1cb15eb3049b918c8c1363e874f2efb491cbb534 (diff)
downloadexternal_libpng-1e0a1b89d72d527a388ea66a298c06f22da39f42.zip
external_libpng-1e0a1b89d72d527a388ea66a298c06f22da39f42.tar.gz
external_libpng-1e0a1b89d72d527a388ea66a298c06f22da39f42.tar.bz2
Merge "libpng: use GCC visibility to reduce shared library size"
-rw-r--r--Android.mk3
-rw-r--r--pngconf.h6
2 files changed, 7 insertions, 2 deletions
diff --git a/Android.mk b/Android.mk
index 2a6eb43..d5c81d7 100644
--- a/Android.mk
+++ b/Android.mk
@@ -22,7 +22,8 @@ common_SRC_FILES := \
pngwtran.c \
pngwutil.c
-common_CFLAGS := ## -fomit-frame-pointer
+common_CFLAGS := \
+ -fvisibility=hidden ## -fomit-frame-pointer
common_C_INCLUDES += \
diff --git a/pngconf.h b/pngconf.h
index defc16d..5760ba3 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1505,7 +1505,11 @@ typedef z_stream FAR * png_zstreamp;
# define PNGAPI
#endif
#ifndef PNG_IMPEXP
-# define PNG_IMPEXP
+# if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33)
+# define PNG_IMPEXP __attribute__((visibility ("default")))
+# else
+# define PNG_IMPEXP
+# endif
#endif
#ifdef PNG_BUILDSYMS