https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106435
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Iain Sandoe from comment #3) > (In reply to Andrew Pinski from comment #2) > > This might be an emulated TLS issue ... As it looks like it is not working > > on mingw either. > > quite possibly; > - there was a change made to support cross-TU static inits for TLS - but > that did not include an equivalent for emulated TLS (or targets without > symbol aliases). It could also be a "non-weak" target issue too. both darwin and mingw are not elf targets so the semantics for non-elf targets sometimes are wrong and not always working because there are less people working on non-elf targets.