The starting point I'd approach this from would be this repository
https://github.com/GataOS/musl-tcc
Do a merge / rebase against latest musl, look at the diff to musl upstream and clean up and rewrite anything I don't like. If / where necessary introduce conditional compilation blocks active only when used by/with tcc.