From: RĂ©mi Denis-Courmont Date: Sat, 7 May 2011 16:38:42 +0000 (+0300) Subject: Mark other symbols as hidden X-Git-Tag: 1.2.0-pre1~2770 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=9887eeccca78880aab56ac1c0bfe28d8716646bc;p=vlc Mark other symbols as hidden Unfortunately, libtool is yet incapable of doing marking symbols as hidden (not exported) at compilation time. So lets do it manually. According to the GCC documentation, this allow some compile-time optimizations depending on the platform. This was already done by Damien earlier (and removed during the plugin headers cleanup). The check is disabled on Windows, as the compiler accepts the flag, but generates lots of warnings during compilation. --- diff --git a/configure.ac b/configure.ac index c851043bb7..2f436afb23 100644 --- a/configure.ac +++ b/configure.ac @@ -1036,6 +1036,23 @@ AS_IF([test "${enable_coverage}" != "no"], [ LDFLAGS_save="${LDFLAGS}" ]) +AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"], [ + AC_CACHE_CHECK([if $CC accepts -fvisibility=hidden], + [ac_cv_c_visibility_hidden], [ + CFLAGS="${CFLAGS_save} -ffast-math" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [ + ac_cv_c_visibility_hidden=yes + ], [ + ac_cv_c_visibility_hidden=no + ]) + ]) + AS_IF([test "${ac_cv_c_visibility_hidden}" != "no"], [ + CFLAGS="${CFLAGS} -fvisibility=hidden" + CXXFLAGS="${CXXFLAGS} -fvisibility=hidden" + OBJCFLAGS="${OBJCFLAGS} -fvisibility=hidden" + ]) +]) + VLC_SAVE_FLAGS dnl