test(avplayer): link guest_avplayer with the shared runtime libraries
guest_avplayer_tests imports __cxa_throw from libc.prx, which is loaded before libstdc++, but -static-libgcc gave it a private copy of _Unwind_Resume. A failed Check threw through libc.prx's unwinder and the landing pad of the test function resumed with the private one, so on Linux every failure aborted in _Unwind_RaiseException_Phase2 instead of printing its message from main. This is the unexplained Linux abort in the intermittent guest_avplayer failures. The test is now linked without the static runtime flags, as the AgcDriver, Agc and VideoOut tests already are, so the unwinder comes from the same library as __cxa_throw. A forced Check failure in TestPlayback aborted before and now prints its message and exits with 1. (cherry picked from commit fa5199cd8fef7f9c7ab9e83a441e15d16364a81d)
This commit is contained in:
parent
34a16b7f08
commit
5959506bbd
|
|
@ -2,6 +2,9 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/AvPlayerLibrary.cmake)
|
|||
add_sce_avplayer_library(libSceAvPlayer)
|
||||
|
||||
if(BUILD_TESTING)
|
||||
foreach(runtimeLinkFlag IN ITEMS -static-libgcc -static-libstdc++ -static)
|
||||
string(REPLACE "${runtimeLinkFlag}" "" CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
|
||||
endforeach()
|
||||
add_test_executable(guest_avplayer_tests ${LIBS_INCLUDE_DIR}/tests/GuestAvPlayer.cpp)
|
||||
target_include_directories(guest_avplayer_tests PRIVATE ${LIBS_INCLUDE_DIR})
|
||||
target_link_libraries(guest_avplayer_tests PRIVATE libSceAvPlayer libc)
|
||||
|
|
|
|||
Loading…
Reference in New Issue