[cfe-dev] libcxxabi cmake test problem on Linux x86-64

İsmail Dönmez ismail at donmez.ws
Fri Jul 11 22:59:39 PDT 2014


Hi,

If I disable ld's --as-needed support [0] tests pass for me too. But this
means we are underlinking. For example pthread symbols are used in
libcxxabi so we must link to pthread explicitly. Same for unwinding support
those symbols are defined in gcc_s.


[0]
http://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#What_is_--as-needed.3F


On Fri, Jul 11, 2014 at 10:28 PM, Dan Albert <danalbert at google.com> wrote:

> Hmm. Just tested ToT libcxxabi and it passes for me.
>
> When running make check-libcxxabi, you should see the following line:
> lit.py: lit.cfg:215: note: inferred link_flags as: ['-lc++abi',
> '-lgcc_eh', '-lc', '-lm', '-lpthread', '-lgcc_s']
>
>
> On Fri Jul 11 2014 at 12:19:08 PM, İsmail Dönmez <ismail at donmez.ws> wrote:
>
>> I am not enabling the llwn unwinder. Compiling with:
>>
>>
>> cmake -DLIBCXXABI_LIBCXX_INCLUDES=/usr/include/c++/v1
>>
>> and run the tests with
>>
>> make check-libcxxabi
>>
>>
>> On Fri, Jul 11, 2014 at 9:56 PM, Dan Albert <danalbert at google.com> wrote:
>>
>>> How are you building/running the tests? test/lit.cfg will link gcc_s
>>> into each test executable. If you've enabled the llvm unwinder, the tests
>>> are expected to fail on Linux.
>>>
>>> - Dan
>>>
>>> On Fri Jul 11 2014 at 10:29:44 AM, İsmail Dönmez <ismail at donmez.ws>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> Unless I apply the patch below exception tests fail on Linux x86-64.
>>>>
>>>> --- libcxxabi.orig/src/CMakeLists.txt
>>>> +++ libcxxabi/src/CMakeLists.txt
>>>> @@ -48,7 +48,7 @@ include_directories("${LIBCXXABI_LIBCXX_
>>>>  set(libraries ${LIBCXXABI_CXX_ABI_LIBRARIES})
>>>>  append_if(libraries LIBCXXABI_HAS_C_LIB c)
>>>>
>>>> -target_link_libraries(cxxabi ${libraries})
>>>> +target_link_libraries(cxxabi ${libraries} gcc_s pthread)
>>>>
>>>>  # Setup flags.
>>>>  append_if(compile_flags LIBCXXABI_HAS_FPIC_FLAG -fPIC)
>>>>
>>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140712/99129f0b/attachment.html>


More information about the cfe-dev mailing list