Set default symbol visibility to hidden.
Compile with -fvisibility=hidden rather than -fvisibility=internal, in
order to avoid PLT lookups for internal functions. Also fix a
regression that caused the -fvisibility flag to be omitted, due to:
Port to Mac OS X.
2dbecf1f6267fae7a161b9c39cfd4d04ce168a29
diff --git a/jemalloc/configure.ac b/jemalloc/configure.ac
index 46a2bd4..f10641b 100644
--- a/jemalloc/configure.ac
+++ b/jemalloc/configure.ac
@@ -157,17 +157,6 @@
esac
AC_DEFINE_UNQUOTED([CPU_SPINWAIT], [$CPU_SPINWAIT])
-JE_COMPILABLE([__attribute__ syntax],
- [static __attribute__((unused)) void foo(void){}],
- [],
- [attribute])
-if test "x${attribute}" = "xyes" ; then
- AC_DEFINE([JEMALLOC_HAVE_ATTR], [ ])
- if test "x$GCC" = "xyes" -a "${abi}" = "xelf"; then
- JE_CFLAGS_APPEND([-fvisibility=internal])
- fi
-fi
-
dnl Platform-specific settings. abi and RPATH can probably be determined
dnl programmatically, but doing so is error-prone, which makes it generally
dnl not worth the trouble.
@@ -227,6 +216,17 @@
AC_SUBST([abi])
AC_SUBST([RPATH])
+JE_COMPILABLE([__attribute__ syntax],
+ [static __attribute__((unused)) void foo(void){}],
+ [],
+ [attribute])
+if test "x${attribute}" = "xyes" ; then
+ AC_DEFINE([JEMALLOC_HAVE_ATTR], [ ])
+ if test "x${GCC}" = "xyes" -a "x${abi}" = "xelf"; then
+ JE_CFLAGS_APPEND([-fvisibility=hidden])
+ fi
+fi
+
JE_COMPILABLE([mremap(...MREMAP_FIXED...)], [
#define _GNU_SOURCE
#include <sys/mman.h>