From fa5d245aef7087c19c375590a7ee2966a0ae339a Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Tue, 15 Mar 2011 10:25:59 -0700 Subject: [PATCH] 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 --- jemalloc/configure.ac | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/jemalloc/configure.ac b/jemalloc/configure.ac index 46a2bd4f..f10641bd 100644 --- a/jemalloc/configure.ac +++ b/jemalloc/configure.ac @@ -157,17 +157,6 @@ case "${host_cpu}" in 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 @@ esac 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