[PATCH] libstdc++: add _GLIBCXX_ macro prefix in atexit_thread.cc

Jonathan Wakely jwakely@redhat.com
Fri Aug 1 19:46:00 GMT 2014


On 30/07/14 23:36 +0800, Zifei Tong wrote:
>On Wed, Jul 30, 2014 at 11:25 PM, Jonathan Wakely <jwakely@redhat.com> wrote:
>> On 30/07/14 22:42 +0800, Zifei Tong wrote:
>>>
>>> Hi,
>>>
>>> I found an issue that the __cxa_thread_atexit_impl() function never called
>>> by
>>> __cxa_thread_atexit() even with newest glibc which have
>>> __cxa_thread_atexit_impl
>>> implemented.
>>>
>>> It turns out that the code tried to use macro
>>> HAVE___CXA_THREAD_ATEXIT_IMPL, but
>>> not _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL which is defined in
>>> bits/c++config.h
>>> (generated from autoconf scripts).
>>>
>>> This patch adds the missing macro prefix.
>>
>>
>> The patch is correct, thanks very much.
>>
>> Do you have commit access?
>I don't think so, this is my first patch to gcc :)
>
>> If not I can do it for you.
>Thanks!

I've committed the attached patch to trunk, I'll apply it to the 4.8
and 4.9 branches soon too.

Tested x86_64-linux, with both glibc 2.11 and 2.18 so with and without
__cxa_thread_atexit_impl.

Thanks again for the report and patch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 1262 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20140801/c0fcabe5/attachment.bin>


More information about the Libstdc++ mailing list