From: Kristian Høgsberg Date: Thu, 9 Sep 2010 00:34:07 +0000 (-0400) Subject: configure: Enable -fvisibility=hidden for g++ as well X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7b34fcc4874671dc92413fa1a091eafac4191cee;p=mesa.git configure: Enable -fvisibility=hidden for g++ as well --- diff --git a/configure.ac b/configure.ac index a7ee0f5763c..bf8feb63528 100644 --- a/configure.ac +++ b/configure.ac @@ -155,6 +155,13 @@ fi if test "x$GXX" = xyes; then CXXFLAGS="$CXXFLAGS -Wall" + # Enable -fvisibility=hidden if using a gcc that supports it + save_CXXFLAGS="$CXXFLAGS" + AC_MSG_CHECKING([whether $CXX supports -fvisibility=hidden]) + CXXFLAGS="$CXXFLAGS -fvisibility=hidden" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]), + [CXXFLAGS="$save_CXXFLAGS" ; AC_MSG_RESULT([no])]); + # Work around aliasing bugs - developers should comment this out CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" fi