This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: g++ 5.3 AIX call_once issues
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Brian Groose <brian at groose dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Tue, 31 Oct 2017 11:47:46 +0000
- Subject: Re: g++ 5.3 AIX call_once issues
- Authentication-results: sourceware.org; auth=none
- References: <CAKMEP23i1ji+bM2_VeNmStV8gyZTvgMwmNSA0_5xeDRvfW0Yew@mail.gmail.com>
On 29 October 2017 at 16:14, Brian Groose wrote:
> I'm hitting what looks like pr67478 (which is fixed by pr 68192).
>
> The example in PR67478 fails with the same error. However, I'm running g++
> 5.3.0, so the issue should be fixed with my compiler.
>
> I can see the symbols in libstdc++.a as type L as expected.
>
> Do I need to compile g++ with some special option for this?
>
> TLS using the thread_local keyword works fine, it's just that the linker
> can't seem to find the symbols for call once:
> ld: 0711-317 ERROR: Undefined symbol: std::__once_callable
> ld: 0711-317 ERROR: Undefined symbol: std::__once_call
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
> information.
> collect2: error: ld returned 8 exit status
Those symbols don't use thread_local, they use __thread, which isn't
necessarily implemented the same way.
Does using __thread for thread-local variables work?