https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69775
Bug ID: 69775 Summary: thread_local extern variable causes linkage error Product: gcc Version: 5.3.0 Status: UNCONFIRMED Severity: blocker Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: saarraz2 at gmail dot com Target Milestone: --- I have code equivalent to the following: foo.hpp: extern thread_local Foo foo; foo.cpp: thread_local Foo foo; I get a linkage error: undefined reference to `TLS init function for hhh::util::format::start' I've seen this bug referenced multiple times before - #55800 and #59364, both of which happened 2 years ago and state that GCC version 4.9 had fixed the problem, yet I'm getting the same problem with GCC 5.3! (through MINGW)