errno without thread-local storage

191 Views Asked by At

I want to statically compile a program with tcc. tcc complains with error: Unknown relocation type: 23. This is apparently caused by my libc implementation (glibc 2.28-10) using thread-local storage to implement errno, which tcc does not support. The program that I'd like to compile does not use threads, and so it would not be a problem if errno was implemented as a global, which would fix it for tcc. Does anyone know if there's a libc implementation that can be configured to do this?

0

There are 0 best solutions below