I compile static version of python3.7.12, I added the static standard library that I want to compile in Modules/Setup, reference Modules/Setup.dist in python source, like this:
#readline readline.c -lreadline -ltermcap
array arraymodule.c # array objects
cmath cmathmodule.c _math.c # -lm # complex math library functions
math mathmodule.c _math.c # -lm # math library functions, e.g. sin()
_contextvars _contextvarsmodule.c # Context Variables
_struct _struct.c # binary structure packing/unpacking
But there are still many modules that fail to compile, these modules with no commented out build definitions in the Modules/Setup.dist file. How do I add these modules build definitions to the Modules/Setup, yes they compile successfully ?