Thanks for the reply and info. As you stated - "not a full fix" - adding this still results in the link failure at the end. I verified that the configure option made it in:
c3700# grep mimalloc work/Python-3.13.11/config.status | head -1
ac_cs_config='--enable-shared --with-openssl=/usr --without-ensurepip --without-system-expat --with-mimalloc=no ac_cv_header_uuid_h=false --without-pymalloc --with-readline=readline --prefix=/usr/pkg --build=hppa--netbsd --host=hppa--netbsd --mandir=/usr/pkg/man --enable-option-checking=yes build_alias=hppa--netbsd host_alias=hppa--netbsd PKG_CONFIG=/usr/pkgsrc/lang/python313/work/.tools/bin/pkg-config PKG_CONFIG_PATH= PKG_CONFIG_LIBDIR=/usr/pkgsrc/lang/python313/work/.buildlink/lib/pkgconfig:/usr/pkgsrc/lang/python313/work/.buildlink/share/pkgconfig CC=gcc '\''CFLAGS=-O2 -I/usr/include -I/usr/pkg/include'\'' '\''LDFLAGS=-L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -latomic -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib'\'' LIBS=-lcrypt '\''CPPFLAGS=-I/usr/include -I/usr/pkg/include'\'''
An example compile line mentions including from "Include/internal/mimalloc" but perhaps that's intended (I'm way out of my depth here...):
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -I/usr/include -I/usr/pkg/include -O2 -I/usr/include -I/usr/pkg/include -O2 -I/usr/include -I/usr/pkg/include -std=gnu11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -f
visibility=hidden -I./Include/internal -I./Include/internal/mimalloc -I. -I./Include -I/usr/include -I/usr/pkg/include -I/usr/include -I/usr/pkg/include -fPIC -DPy_BUILD_CORE_BUILTIN -c ./Modules/pwdmodule.c -o Modules/pwdmodule.o