From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AF62B3858C74; Sun, 20 Mar 2022 21:59:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AF62B3858C74 From: "hstong at ca dot ibm.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100641] Link error when using extern thread_local variables on AIX Date: Sun, 20 Mar 2022 21:59:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 8.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hstong at ca dot ibm.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2022 21:59:06 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100641 Hubert Tong changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hstong at ca dot ibm.com --- Comment #2 from Hubert Tong --- This was addressed in Clang last year. The AIX linker does not have the same weak reference semantics as some other linkers. The means that the TLS init function needs to be defined by the object file containing the definition of the `thread_local` variable if the language semantics does not make it so t= hat all potential references occur in contexts where it is known that the initialization/finalization is constant.=