[pocl] 06/07: forcibly link regression tests with -lpthread under cmake
Andreas Beckmann
anbe at moszumanska.debian.org
Mon Nov 27 17:10:00 UTC 2017
This is an automated email from the git hooks/post-receive script.
anbe pushed a commit to branch experimental
in repository pocl.
commit e96643ee93faa32b4b0482ac9feb3ffbe8b28d39
Author: Andreas Beckmann <anbe at debian.org>
Date: Sat Nov 25 20:37:23 2017 +0100
forcibly link regression tests with -lpthread under cmake
---
debian/changelog | 2 ++
...cmake-forcibly-link-regtests-with-pthread.patch | 28 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 31 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index fecee86..e962cf6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ pocl (0.13-12) UNRELEASED; urgency=medium
clang-3.7), like autotools, to avoid symbol changes.
* cmake-no-get_cpu_name.patch: Do not use get_cpu_name(), makes some tests
fail.
+ * cmake-forcibly-link-regtests-with-pthread.patch: Link regression tests
+ with -lpthread unconditionally, otherwise test_issue_231 fails.
-- Andreas Beckmann <anbe at debian.org> Sun, 26 Nov 2017 21:37:57 +0100
diff --git a/debian/patches/cmake-forcibly-link-regtests-with-pthread.patch b/debian/patches/cmake-forcibly-link-regtests-with-pthread.patch
new file mode 100644
index 0000000..ca31684
--- /dev/null
+++ b/debian/patches/cmake-forcibly-link-regtests-with-pthread.patch
@@ -0,0 +1,28 @@
+Author: Andreas Beckmann <anbe at debian.org>
+Description: forcibly link regression tests with -lpthread under CMake
+ test_issue_231 fails otherwise (since this gets scrubbed by -Wl,--as-needed)
+ with the following backtrace:
+
+ #0 __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
+ #1 0x00007ffff72cd3fa in __GI_abort () at abort.c:89
+ #2 0x00007ffff78e0b85 in __gnu_cxx::__verbose_terminate_handler () at ../../../../src/libstdc++-v3/libsupc++/vterminate.cc:95
+ #3 0x00007ffff78de956 in __cxxabiv1::__terminate (handler=<optimized out>) at ../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc:47
+ #4 0x00007ffff78de9a1 in std::terminate () at ../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc:57
+ #5 0x00007ffff78debe4 in __cxxabiv1::__cxa_throw (obj=obj at entry=0x55555576eca0, tinfo=tinfo at entry=0x7ffff7bc2ba0 <typeinfo for std::system_error>,
+ dest=dest at entry=0x7ffff79093f0 <std::system_error::~system_error()>) at ../../../../src/libstdc++-v3/libsupc++/eh_throw.cc:93
+ #6 0x00007ffff79096be in std::__throw_system_error (__i=-1) at ../../../../../src/libstdc++-v3/src/c++11/system_error.cc:81
+ #7 0x0000555555557ce4 in std::call_once<void (&)()> (__once=..., __f=<optimized out>) at /usr/include/c++/6/mutex:622
+ #8 0x0000555555556e26 in cl::Device::getDefault (errResult=0x0) at ./include/CL/cl2.hpp:1939
+ #9 main (argc=<optimized out>, argv=<optimized out>) at ./tests/regression/test_issue_231.cpp:82
+
+--- a/tests/regression/CMakeLists.txt
++++ b/tests/regression/CMakeLists.txt
+@@ -57,7 +57,7 @@ include_directories("${CMAKE_SOURCE_DIR}
+
+ foreach(PROG ${PROGRAMS_TO_BUILD})
+ add_executable("${PROG}" "${PROG}.cpp")
+- target_link_libraries("${PROG}" ${POCLU_LINK_OPTIONS})
++ target_link_libraries("${PROG}" ${POCLU_LINK_OPTIONS} "-Wl,--no-as-needed -lpthread -Wl,--as-needed")
+ endforeach()
+
+
diff --git a/debian/patches/series b/debian/patches/series
index 36a0e64..5f2e515 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ do-not-export-clang-symbols.patch
libstdc++-7-dev.patch
cmake-no-fno-rtti.patch
cmake-no-get_cpu_name.patch
+cmake-forcibly-link-regtests-with-pthread.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/pocl.git
More information about the Pkg-opencl-commits
mailing list