From 7b34fcc4874671dc92413fa1a091eafac4191cee Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 8 Sep 2010 20:34:07 -0400 Subject: [PATCH] configure: Enable -fvisibility=hidden for g++ as well --- configure.ac | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.30.2