diff options
author | Kristian Høgsberg <[email protected]> | 2010-09-08 20:34:07 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2010-09-08 20:45:07 -0400 |
commit | 7b34fcc4874671dc92413fa1a091eafac4191cee (patch) | |
tree | c215874b28888ee0d253f7fc8a4c9ef82524d686 /configure.ac | |
parent | 7fc882643ce1c57fb8f60d8c5edd761eff404749 (diff) |
configure: Enable -fvisibility=hidden for g++ as well
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 7 insertions, 0 deletions
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 |