[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r12080: The plugin should be built w
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r12080: The plugin should be built with -fvisibility=hidden, if possible. As the |
Date: |
Fri, 19 Mar 2010 14:36:48 +0100 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 12080
committer: Bastiaan Jacques <address@hidden>
branch nick: trunk
timestamp: Fri 2010-03-19 14:36:48 +0100
message:
The plugin should be built with -fvisibility=hidden, if possible. As the
plugin is loaded into the browser's namespace on equal footing with other
plugins, there is no guarantee that when our plugin calls an internal
function that is exported, the browser namespace won't override it.
modified:
configure.ac
plugin/Makefile.am
=== modified file 'configure.ac'
--- a/configure.ac 2010-03-16 04:06:00 +0000
+++ b/configure.ac 2010-03-19 13:36:48 +0000
@@ -2110,7 +2110,7 @@
GNASH_PATH_GLIB
fi
-AM_CONDITIONAL(HAVE_GLIB, [ test x"${has_glib} "= xyes ])
+AM_CONDITIONAL(HAVE_GLIB, [ test x"${has_glib}" = xyes ])
if test x$build_gtk = xno -o x$build_kde4 = xno; then
if test x$npapi = xyes; then
@@ -2543,15 +2543,34 @@
)
if test x$ac_cv_gcc_visibility_bug = xno; then
CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
- if test x"$enable_visibility" != x"no"; then
- CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
- fi
fi
]
)
CHECK_VISIBILITY_GCC_BUG
+
+if test x$ac_cv_gcc_visibility_bug = xno; then
+ AC_LANG_PUSH(C++)
+ AC_MSG_CHECKING([whether $CXX supports -fvisibility=hidden])
+ save_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM()],
+ [ac_cv_gcc_visibility=yes;
+ AC_MSG_RESULT([yes])],
+ [ac_cv_gcc_visibility=no;
+ AC_MSG_RESULT([no])]);
+ CXXFLAGS="$save_CXXFLAGS"
+ AC_LANG_POP(C++)
+fi
+
+
+AM_CONDITIONAL(VISIBILITY_WORKS, test x"$ac_cv_gcc_visibility" = xyes)
+
+if test x"$ac_cv_gcc_visibility" = xyes -a x"$enable_visibility" != xno; then
+ CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
+fi
+
dnl Define convienience constants so Gnash can print out the
dnl default configuration of the build.
RENDERER_CONFIG=${add_renderer}
@@ -3666,6 +3685,15 @@
fi
fi
+if test x"$ac_cv_gcc_visibility" != xyes; then
+ if test x"$npapi" = xyes; then
+ echo " WARNING: NPAPI (mozilla) plugin is enabled, but your
compiler"
+ echo " does not support symbol visibility. This may cause "
+ echo " the plugin to malfunction and may result in small "
+ echo " children being eaten. You have been warned!"
+ fi
+fi
+
if test x"${DEJAGNU}" != x""; then
echo " DEJAGNU's runtest is $DEJAGNU"
else
=== modified file 'plugin/Makefile.am'
--- a/plugin/Makefile.am 2010-03-10 02:05:23 +0000
+++ b/plugin/Makefile.am 2010-03-19 13:36:48 +0000
@@ -121,6 +121,11 @@
else
libgnashplugin_la_LDFLAGS = -module -avoid-version -L$(plugindir)
endif
+
+if VISIBILITY_WORKS
+libgnashplugin_la_CXXFLAGS = -fvisibility=hidden
+endif
+
endif # NPAPI
endif # WIN32
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r12080: The plugin should be built with -fvisibility=hidden, if possible. As the,
Bastiaan Jacques <=