summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2020-06-30 15:29:58 -0400
committerRich Felker <dalias@aerifal.cx>2020-06-30 15:30:43 -0400
commite71188fa051c70128c1c880164c222c34b1749c3 (patch)
treec324923adc6a17b652e1238c73d5e37b4a1c86f9
parent503bd3976623493a10b0f32c617feb51f9ba04c8 (diff)
downloadmusl-e71188fa051c70128c1c880164c222c34b1749c3.tar.gz
musl-e71188fa051c70128c1c880164c222c34b1749c3.tar.bz2
musl-e71188fa051c70128c1c880164c222c34b1749c3.tar.xz
musl-e71188fa051c70128c1c880164c222c34b1749c3.zip
add malloc implementation selection to configure
the intent here is to keep oldmalloc as an option, at least for the short term, in case any users are negatively impacted in some way by mallocng and need to fallback until their issues are resolved.
-rwxr-xr-xconfigure12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure b/configure
index 43598825..0dfd2d17 100755
--- a/configure
+++ b/configure
@@ -35,6 +35,9 @@ Optional features:
--disable-shared inhibit building shared library [enabled]
--disable-static inhibit building static library [enabled]
+Optional packages:
+ --with-malloc=... choose malloc implementation [oldmalloc]
+
Some influential environment variables:
CC C compiler command [detected]
CFLAGS C compiler flags [-Os -pipe ...]
@@ -139,6 +142,7 @@ static=yes
wrapper=auto
gcc_wrapper=no
clang_wrapper=no
+malloc_dir=oldmalloc
for arg ; do
case "$arg" in
@@ -168,6 +172,7 @@ case "$arg" in
--disable-wrapper|--enable-wrapper=no) wrapper=no ;;
--enable-gcc-wrapper|--enable-gcc-wrapper=yes) wrapper=yes ; gcc_wrapper=yes ;;
--disable-gcc-wrapper|--enable-gcc-wrapper=no) wrapper=no ;;
+--with-malloc=*) malloc_dir=${arg#*=} ;;
--enable-*|--disable-*|--with-*|--without-*|--*dir=*) ;;
--host=*|--target=*) target=${arg#*=} ;;
--build=*) build=${arg#*=} ;;
@@ -215,6 +220,12 @@ set +C
trap 'rm "$tmpc"' EXIT INT QUIT TERM HUP
#
+# Check that the requested malloc implementation exists
+#
+test -d "$srcdir/src/malloc/$malloc_dir" \
+|| fail "$0: error: chosen malloc implementation '$malloc_dir' does not exist"
+
+#
# Check whether we are cross-compiling, and set a default
# CROSS_COMPILE prefix if none was provided.
#
@@ -779,6 +790,7 @@ OPTIMIZE_GLOBS = $OPTIMIZE_GLOBS
ALL_TOOLS = $tools
TOOL_LIBS = $tool_libs
ADD_CFI = $ADD_CFI
+MALLOC_DIR = $malloc_dir
EOF
test "x$static" = xno && echo "STATIC_LIBS ="
test "x$shared" = xno && echo "SHARED_LIBS ="