https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81142
--- Comment #12 from tomas_paukrt at conel dot cz --- Hi Herald, have you tried to cross-compile the library with -mtls-dialect=gnu2 ? We are using this option as a workaround for this bug because no one seems to be interested in fixing it. I have exactly same findings as you and using a different TLS dialect is the best possible solution that I have found so far. Best regards Tomas