I've compiled hiawatha for sabotage linux with a fully statically linked mbedtls system library, basically like this:
CFLAGS="-static" cmake -DUSE_SYSTEM_MBEDTLS=ON
sed -i 's/-lmbedtls/-lmbedtls -lmbedcrypto -lmbedx509/' CMakeFiles/*/link.txt
(mbedtls is compiled with MBEDTLS_THREADING_C and MBEDTLS_THREADING_PTHREAD)
Here's the link to my current build recipe (it has the full make/cmake statements):https://github.com/robotanarchy/sabotage/blob/hiawatha/pkg/hiawatha
So while this works, it is a hack and proper upstream support would be better. Would you like to add this to the cmake buildsystem (maybe with something like -DUSE_SYSTEM_MBEDTLS_STATICALLY=ON)?
Thanks for making this great webserver