From 8e22ede2a66dcd6d8da3c37d5d7fda0474b474ae Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 1 Aug 2023 09:36:39 -0600 Subject: [PATCH] Parse --disable-python in mkpkg and don't override -m32 for Solaris. We want to be able to build without python and to specify the memory model when building 32-bit .so's for Solaris. --- scripts/mkpkg | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/scripts/mkpkg b/scripts/mkpkg index 4a63585f0..d0a814d3c 100755 --- a/scripts/mkpkg +++ b/scripts/mkpkg @@ -484,8 +484,15 @@ case "$osversion" in if [ $osrelease -ge 11 ]; then # Build 64-bit binaries on Solaris 11 and above. - CFLAGS="${CFLAGS:--O2 -g} -m64"; export CFLAGS - LDFLAGS="-m64${LDFLAGS:+ }${LDFLAGS}"; export LDFLAGS + case "${CC}${CFLAGS}" in + *-m32*|*-m64*) + # User specified memory model flags + ;; + *) + CFLAGS="${CFLAGS:--O2 -g} -m64"; export CFLAGS + LDFLAGS="-m64${LDFLAGS:+ }${LDFLAGS}"; export LDFLAGS + ;; + esac # Solaris audit is not supported by Illumos if [ X"`uname -o 2>/dev/null`" = X"illumos" ]; then configure_opts="${configure_opts}${configure_opts+$tab}--with-bsm-audit" @@ -541,10 +548,13 @@ case "$osversion" in ;; esac -# Don't enable OpenSSL if user disabled it. +# Don't enable OpenSSL or python if disabled by the user. case "$configure_opts" in *--disable-openssl*) with_openssl=false;; esac +case "$configure_opts" in + *--disable-python*) with_python=false;; +esac if [ X"$with_openssl" = X"true" ]; then configure_opts="${configure_opts}${configure_opts+$tab}--enable-openssl" fi