diff --git a/recipe/build_base.sh b/recipe/build_base.sh
index 61d9c70..e625eab 100644
--- a/recipe/build_base.sh
+++ b/recipe/build_base.sh
@@ -77,7 +77,8 @@ find "${PREFIX}/lib" -name "libbz2*${SHLIB_EXT}*" | xargs rm -fv {}
 
 # Prevent lib/python${VER}/_sysconfigdata_*.py from ending up with full paths to these things
 # in _build_env because _build_env will not get found during prefix replacement, only _h_env_placeh ...
-AR=$(basename "${AR}")
+# AR=$(basename "${AR}")
+export AR="/usr/bin/ar"
 
 # CC must contain the string 'gcc' or else distutils thinks it is on macOS and uses '-R' to set rpaths.
 if [[ ${target_platform} == osx-* ]]; then
@@ -85,10 +86,10 @@ if [[ ${target_platform} == osx-* ]]; then
 else
   CC=$(basename "${GCC}")
 fi
-_CCACHE=$(type -P ccache) || true
-if [[ ${_CCACHE} =~ ${BUILD_PREFIX}.* ]]; then
-  CC="${_CCACHE} ${CC}"
-fi
+#_CCACHE=$(type -P ccache) || true
+#if [[ ${_CCACHE} =~ ${BUILD_PREFIX}.* ]]; then
+#  CC="${_CCACHE} ${CC}"
+# fi
 CXX=$(basename "${CXX}")
 RANLIB=$(basename "${RANLIB}")
 READELF=$(basename "${READELF}")
@@ -207,25 +208,22 @@ if [[ -n ${HOST} ]]; then
   fi
 fi
 
-if [[ ${target_platform} == osx-64 ]]; then
-  export MACHDEP=darwin
-  export ac_sys_system=Darwin
-  export ac_sys_release=13.4.0
-  export MACOSX_DEFAULT_ARCH=x86_64
+if [[ ${target_platform} == osx-* ]]; then
   # TODO: check with LLVM 12 if the following hack is needed.
   # https://reviews.llvm.org/D76461 may have fixed the need for the following hack.
   echo '#!/bin/bash' > $BUILD_PREFIX/bin/$HOST-llvm-ar
-  echo "$BUILD_PREFIX/bin/llvm-ar --format=darwin" '"$@"' >> $BUILD_PREFIX/bin/$HOST-llvm-ar
+  echo "/usr/bin/ar " '"$@"' >> $BUILD_PREFIX/bin/$HOST-llvm-ar
   chmod +x $BUILD_PREFIX/bin/$HOST-llvm-ar
   echo "WARNING :: For some reason, configure finds libintl (gettext) in the BUILD_PREFIX on macOS."
   echo "WARNING :: to prevent this, removing BUILD_PREFIX/include/libintl.h"
   echo "WARNING :: and also setting ac_cv_lib_intl_textdomain=no"
-  rm ${BUILD_PREFIX}/include/libintl.h
+  rm -f ${BUILD_PREFIX}/include/libintl.h
   export ac_cv_lib_intl_textdomain=no
 fi
 
 if [[ ${target_platform} == osx-64 ]]; then
   export MACHDEP=darwin
+  export ac_sys_system=Darwin
   export ac_sys_release=13.4.0
   export MACOSX_DEFAULT_ARCH=x86_64
   export ARCHFLAGS="-arch x86_64"
@@ -235,9 +233,9 @@ elif [[ ${target_platform} == osx-arm64 ]]; then
   export ac_sys_system=Darwin
   export ac_sys_release=20.0.0
   export MACOSX_DEFAULT_ARCH=arm64
-  echo '#!/bin/bash' > $BUILD_PREFIX/bin/$HOST-llvm-ar
-  echo "$BUILD_PREFIX/bin/llvm-ar --format=darwin" '"$@"' >> $BUILD_PREFIX/bin/$HOST-llvm-ar
-  chmod +x $BUILD_PREFIX/bin/$HOST-llvm-ar
+  # echo '#!/bin/bash' > $BUILD_PREFIX/bin/$HOST-llvm-ar
+  # echo "$BUILD_PREFIX/bin/llvm-ar --format=darwin" '"$@"' >> $BUILD_PREFIX/bin/$HOST-llvm-ar
+  # chmod +x $BUILD_PREFIX/bin/$HOST-llvm-ar
   export ARCHFLAGS="-arch arm64"
   export CFLAGS="$CFLAGS $ARCHFLAGS"
 elif [[ ${target_platform} == linux-* ]]; then
@@ -269,14 +267,31 @@ _common_configure_args+=(--prefix=${PREFIX})
 _common_configure_args+=(--build=${BUILD})
 _common_configure_args+=(--host=${HOST})
 _common_configure_args+=(--enable-ipv6)
+# _common_configure_args+=(--enable-optimizations)
+# _common_configure_args+=(--with-lto)
+# _common_configure_args+=(--with-system-expat)
+_common_configure_args+=(--with-system-ffi)
+# _common_configure_args+=(--with-system-libpdec)
+_common_configure_args+=(--with-dtrace)
 _common_configure_args+=(--with-ensurepip=no)
 _common_configure_args+=(--with-tzpath=${PREFIX}/share/zoneinfo)
+_common_configure_args+=(--with-openssl="${PREFIX}")
 _common_configure_args+=(--with-computed-gotos)
 _common_configure_args+=(--with-system-ffi)
 _common_configure_args+=(--enable-loadable-sqlite-extensions)
 _common_configure_args+=(--with-tcltk-includes="-I${PREFIX}/include")
 _common_configure_args+=("--with-tcltk-libs=-L${PREFIX}/lib -ltcl8.6 -ltk8.6")
 _common_configure_args+=(--with-platlibdir=lib)
+_common_configure_args+=(PKG_CONFIG_LIBDIR="${PREFIX}/lib")
+_common_configure_args+=(PKG_CONFIG_PATH="${PREFIX}/lib")
+_common_configure_args+=(CPPFLAGS="${CPPFLAGS} -I${PREFIX}/include")
+_common_configure_args+=(CXXFLAGS="${CXXFLAGS} -I${PREFIX}/include")
+_common_configure_args+=(CFLAGS="${CFLAGS} -I${PREFIX}/include")
+_common_configure_args+=(LDFLAGS="${LDFLAGS} -L${PREFIX}/lib")
+_common_configure_args+=(CC="${CC}")
+_common_configure_args+=(CXX="${CXX}")
+_comoon_configure_args+=(CC_FOR_BUIL="${CC}")
+
 
 # Add more optimization flags for the static Python interpreter:
 declare -a PROFILE_TASK=()
@@ -325,10 +340,12 @@ fi
 mkdir -p ${_buildd_shared}
 pushd ${_buildd_shared}
   set +e
+  LLVM_AR="/usr/bin/ar" \
   ${SRC_DIR}/configure "${_common_configure_args[@]}" \
                        "${_dbg_opts[@]}" \
                        --oldincludedir=${BUILD_PREFIX}/${HOST}/sysroot/usr/include \
-                       --enable-shared
+                       --enable-shared \
+                       --with-openssl=${PREFIX}
   if [[ $? != 0 ]]; then
     echo "ERROR :: configure of shared python failed. config.log contains:"
         cat config.log
@@ -351,8 +368,10 @@ if [[ ${target_platform} == linux-ppc64le ]]; then
        EXTRA_CFLAGS="${EXTRA_CFLAGS}" \
        ${_MAKE_TARGET} "${_PROFILE_TASK[@]}" 2>&1 >make-static.log
 else
+  env LDFLAGS="${LDFLAGS} -Xlinker -undefined -Xlinker dynamic_lookup" \
   make -j${CPU_COUNT} -C ${_buildd_static} \
        EXTRA_CFLAGS="${EXTRA_CFLAGS}" \
+       CROSS_COMPILE=no BLDSHARED="${CC} -shared" V=1 \
        ${_MAKE_TARGET} "${_PROFILE_TASK[@]}" 2>&1 | tee make-static.log
 fi
 if rg "Failed to build these modules" make-static.log; then
@@ -363,9 +382,13 @@ fi
 if [[ ${target_platform} == linux-ppc64le ]]; then
   # Travis has issues with long logs
   make -j${CPU_COUNT} -C ${_buildd_shared} \
+          CROSSCOMPILE=no BLDSHARED="${CC} -shared" V=1 \
           EXTRA_CFLAGS="${EXTRA_CFLAGS}" 2>&1 >make-shared.log
 else
+  env LDFLAGS="${LDFLAGS} -Xlinker -undefined -Xlinker dynamic_lookup" \
   make -j${CPU_COUNT} -C ${_buildd_shared} \
+          CROSSCOMPILE=no BLDSHARED="${CC} -shared" V=1 \
+          _PYTHON_HOST_PLATFORM="${_PYTHON_HOST_PLATFORM}" \
           EXTRA_CFLAGS="${EXTRA_CFLAGS}" 2>&1 | tee make-shared.log
 fi
 if rg "Failed to build these modules" make-shared.log; then
@@ -381,9 +404,9 @@ make -j${CPU_COUNT} -C ${_buildd_shared} \
 make -C ${_buildd_static} install
 
 declare -a _FLAGS_REPLACE=()
-if [[ -n ${_CCACHE} ]]; then
-  _FLAGS_REPLACE+=("${_CCACHE}"); _FLAGS_REPLACE+=("")
-fi
+#if [[ -n ${_CCACHE} ]]; then
+#  _FLAGS_REPLACE+=("${_CCACHE}"); _FLAGS_REPLACE+=("")
+#fi
 _FLAGS_REPLACE+=("-L."); _FLAGS_REPLACE+=("")
 # 3 entries as this can be split over two lines.
 _FLAGS_REPLACE+=("-isysroot ${CONDA_BUILD_SYSROOT}"); _FLAGS_REPLACE+=("")
@@ -393,7 +416,7 @@ _FLAGS_REPLACE+=("${CONDA_BUILD_SYSROOT}"); _FLAGS_REPLACE+=("")
 _FLAGS_REPLACE+=("-fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/python-$PKG_VERSION"); _FLAGS_REPLACE+=("")
 _FLAGS_REPLACE+=("-fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix"); _FLAGS_REPLACE+=("")
 if [[ ${_OPTIMIZED} == yes ]]; then
-  _FLAGS_REPLACE+=("-O3"); _FLAGS_REPLACE+=("-O2")
+  # _FLAGS_REPLACE+=("-O3"); _FLAGS_REPLACE+=("-O2")
   _FLAGS_REPLACE+=("-fprofile-use"); _FLAGS_REPLACE+=("")
   _FLAGS_REPLACE+=("-fprofile-correction"); _FLAGS_REPLACE+=("")
   for _LTO_CFLAG in "${LTO_CFLAGS[@]}"; do
diff --git a/recipe/meta.yaml b/recipe/meta.yaml
index a16b2c4..3a69406 100755
--- a/recipe/meta.yaml
+++ b/recipe/meta.yaml
@@ -1,10 +1,10 @@
-{% set version = "3.9.5" %}
+{% set version = "3.9.6" %}
 {% set dev = "" %}
 {% set dev_ = "" %}
 {% set ver2 = '.'.join(version.split('.')[0:2]) %}
 {% set ver2nd = ''.join(version.split('.')[0:2]) %}
 {% set ver3nd = ''.join(version.split('.')[0:3]) %}
-{% set build_number = 4 %}
+{% set build_number = 3 %}
 {% set channel_targets = ('abc', 'def')  %}
 
 # Sanitize build system env. var tweak parameters
@@ -45,7 +45,7 @@ source:
 {% else %}
   - url: https://www.python.org/ftp/python/{{ version }}/Python-{{ version }}{{ dev }}.tar.xz
     # md5 from: https://www.python.org/downloads/release/python-{{ ver3nd }}/
-    md5: 71f7ada6bec9cdbf4538adc326120cfd
+    md5: ecc29a7688f86e550d29dba2ee66cf80
 {% endif %}
     patches:
       - patches/0000-Fix-off-by-one-error-in-_winapi_WaitForMultipleObjec.patch
@@ -165,8 +165,8 @@ outputs:
       #   - lib/libpython3.dylib  # [osx]
       # match python.org compiler standard
       skip: True            # [win and int(float(vc)) < 14]
-      skip_compile_pyc:
-        - '*.py'            # [osx and arm64]
+      # skip_compile_pyc:
+      #  - '*.py'            # [osx and arm64]
 {% if 'conda-forge' in channel_targets %}
       string: {{ dev_ }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython
 {% else %}
@@ -221,12 +221,16 @@ outputs:
         - bzip2  # [not win]
         - sqlite
         - xz  # [not win]
+        - bzip2  # [not win]
+        - unzip  # [not win]
         - zlib  # [not win]
         - openssl
         - readline  # [not win]
+        - libiconv  # [osx]
         - tk  # [not win]
         - ncurses  # [unix]
-        - libffi   # [not (win or (osx and arm64))]
+        - expat    # [unix]
+        - libffi   # [not win]
         - ld_impl_{{ target_platform }}  # [linux]
       run:
         - ld_impl_{{ target_platform }}  # [linux]
diff --git a/recipe/patches/0033-gh24324.patch b/recipe/patches/0033-gh24324.patch
index 65710f8..2395ac8 100644
Binary files a/recipe/patches/0033-gh24324.patch and b/recipe/patches/0033-gh24324.patch differ
diff --git a/recipe/tests/cmake/run_cmake_test.sh b/recipe/tests/cmake/run_cmake_test.sh
index 3e21ec2..7a57a79 100755
--- a/recipe/tests/cmake/run_cmake_test.sh
+++ b/recipe/tests/cmake/run_cmake_test.sh
@@ -5,5 +5,6 @@ set -x
 
 CMAKE_DBG="trace --debug-find --debug-output --debug-trycompile"
 CMAKE_DBG=--debug-find
-cmake -G"Unix Makefiles" -DPY_VER=${1} ${CMAKE_DBG} -DCMAKE_OSX_SYSROOT=${CONDA_BUILD_SYSROOT} -DCMAKE_C_FLAGS=${CFLAGS} .
+cmake -G"Unix Makefiles" -DPY_VER=${1} ${CMAKE_DBG} -DCMAKE_OSX_SYSROOT=${CONDA_BUILD_SYSROOT} -DCMAKE_C_FLAGS="${CFLAGS}" .
 make
+
