diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-07-01 17:20:17 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-07-02 00:20:46 +0000 |
commit | ae26b12f3e93e3f0938cc7e13f8ece57a7843e9c (patch) | |
tree | 4a3ba5bb857dac92c9eb84b0635fdf0d9a5b9c7e | |
parent | ab1e6f30d26973cba2b6752b7b7ba35e17f8042f (diff) |
If -fvisibility=hidden isn't supported, try -xldscope=hidden.
That's the option for newer versions of Sun^WOracle C.
Change-Id: I62c12d5870d84587f81a8789732675021523e9ed
Reviewed-on: https://code.wireshark.org/review/2769
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | configure.ac | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 15f910c59b..fb865fb662 100644 --- a/configure.ac +++ b/configure.ac @@ -903,12 +903,29 @@ esac # AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fexcess-precision=fast) +# +# Try to have the compiler default to hiding symbols, so that only +# symbols explicitly exported with WS_DLL_PUBLIC will be visible +# outside (shared) libraries; that way, more UN*X builds will catch +# failures to export symbols, rather than having that fail only on +# Windows. +# CFLAGS_before_fvhidden="$CFLAGS" +# +# GCC and GCC-compatible compilers +# AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fvisibility=hidden) if test "x$CFLAGS" = "x$CFLAGS_before_fvhidden" then - # TODO add other ways of hiding symbols - AC_MSG_WARN(Compiler will export all symbols from shared libraries) + # + # Sun^WOracle C. + # + AC_WIRESHARK_COMPILER_FLAGS_CHECK(-xldscope=hidden) + if test "x$CFLAGS" = "x$CFLAGS_before_fvhidden" + then + # TODO add other ways of hiding symbols + AC_MSG_WARN(Compiler will export all symbols from shared libraries) + fi fi AC_WIRESHARK_LDFLAGS_CHECK([-Wl,--as-needed]) |