add autogenerated jemalloc.sh wrapper script
This commit is contained in:
parent
da9dde0854
commit
2bd3cbc5c6
1
.gitignore
vendored
1
.gitignore
vendored
@ -21,3 +21,4 @@
|
||||
!test/*.c
|
||||
!test/*.exp
|
||||
/VERSION
|
||||
/bin/jemalloc.sh
|
||||
|
@ -42,7 +42,7 @@ TEST_LIBRARY_PATH :=
|
||||
endif
|
||||
|
||||
# Lists of files.
|
||||
BINS := @srcroot@bin/pprof
|
||||
BINS := @srcroot@bin/pprof @objroot@bin/jemalloc.sh
|
||||
CHDRS := @objroot@include/jemalloc/jemalloc@install_suffix@.h \
|
||||
@objroot@include/jemalloc/jemalloc_defs@install_suffix@.h
|
||||
CSRCS := @srcroot@src/jemalloc.c @srcroot@src/arena.c @srcroot@src/atomic.c \
|
||||
|
9
bin/jemalloc.sh.in
Normal file
9
bin/jemalloc.sh.in
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
|
||||
@LD_PRELOAD_VAR@=${libdir}/libjemalloc.@SHLIB_SUFFIX_NAME@.1
|
||||
export @LD_PRELOAD_VAR@
|
||||
exec "$@"
|
20
configure.ac
20
configure.ac
@ -167,6 +167,9 @@ case "${host_cpu}" in
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED([CPU_SPINWAIT], [$CPU_SPINWAIT])
|
||||
|
||||
LD_PRELOAD_VAR="LD_PRELOAD"
|
||||
SHLIB_SUFFIX_NAME="so"
|
||||
|
||||
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.
|
||||
@ -180,6 +183,8 @@ case "${host}" in
|
||||
abi="macho"
|
||||
AC_DEFINE([JEMALLOC_PURGE_MADVISE_FREE])
|
||||
RPATH=""
|
||||
LD_PRELOAD_VAR="DYLD_INSERT_LIBRARIES"
|
||||
SHLIB_SUFFIX_NAME="dylib"
|
||||
;;
|
||||
*-*-freebsd*)
|
||||
CFLAGS="$CFLAGS"
|
||||
@ -217,6 +222,17 @@ case "${host}" in
|
||||
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
|
||||
LIBS="$LIBS -lposix4 -lsocket -lnsl"
|
||||
;;
|
||||
*-ibm-aix*)
|
||||
if "$LG_SIZEOF_PTR" = "8"; then
|
||||
dnl 64bit AIX
|
||||
LD_PRELOAD_VAR="LDR_PRELOAD64"
|
||||
else
|
||||
dnl 32bit AIX
|
||||
LD_PRELOAD_VAR="LDR_PRELOAD"
|
||||
fi
|
||||
abi="xcoff"
|
||||
RPATH="-Wl,-rpath,"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([Unsupported operating system: ${host}])
|
||||
abi="elf"
|
||||
@ -225,6 +241,8 @@ case "${host}" in
|
||||
esac
|
||||
AC_SUBST([abi])
|
||||
AC_SUBST([RPATH])
|
||||
AC_SUBST([LD_PRELOAD_VAR])
|
||||
AC_SUBST([SHLIB_SUFFIX_NAME])
|
||||
|
||||
JE_COMPILABLE([__attribute__ syntax],
|
||||
[static __attribute__((unused)) void foo(void){}],
|
||||
@ -881,7 +899,7 @@ AC_CONFIG_HEADERS([$cfghdrs_tup])
|
||||
|
||||
dnl ============================================================================
|
||||
dnl Generate outputs.
|
||||
AC_CONFIG_FILES([$cfgoutputs_tup config.stamp])
|
||||
AC_CONFIG_FILES([$cfgoutputs_tup config.stamp bin/jemalloc.sh])
|
||||
AC_SUBST([cfgoutputs_in])
|
||||
AC_SUBST([cfgoutputs_out])
|
||||
AC_OUTPUT
|
||||
|
Loading…
Reference in New Issue
Block a user