Source: securefs
Version: 0.11.1+ds-4
Tags: patch upstream
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

securefs fails to cross build from source, because it uses
CHECK_CXX_SOURCE_RUNS in a few occasions. In none of them, the result of
execution is actually checked. The results of the relevant syscalls are
ignored. As such, merely compiling these examples is equivalent and
works with cross compilation. Please consider applying the attached
patch.

Helmut
--- securefs-0.11.1+ds.orig/CMakeLists.txt
+++ securefs-0.11.1+ds/CMakeLists.txt
@@ -84,10 +84,10 @@
 add_executable(securefs main.cpp)
 add_executable(securefs_test ${TEST_SOURCES})
 
-include(CheckCXXSourceRuns)
-CHECK_CXX_SOURCE_RUNS("int main() { thread_local int i = 0; return i; }" HAS_THREAD_LOCAL)
+include(CheckCXXSourceCompiles)
+CHECK_CXX_SOURCE_COMPILES("int main() { thread_local int i = 0; return i; }" HAS_THREAD_LOCAL)
 
-CHECK_CXX_SOURCE_RUNS("
+CHECK_CXX_SOURCE_COMPILES("
 #include <time.h>
 
 int main() {
@@ -97,7 +97,7 @@
 }
 " HAS_CLOCK_GETTIME)
 
-CHECK_CXX_SOURCE_RUNS("
+CHECK_CXX_SOURCE_COMPILES("
 #include <unistd.h>
 #include <sys/stat.h>
 
@@ -107,7 +107,7 @@
 }
 " HAS_FUTIMENS)
 
-CHECK_CXX_SOURCE_RUNS("
+CHECK_CXX_SOURCE_COMPILES("
 #include <unistd.h>
 #include <sys/stat.h>
 #include <fcntl.h>

Reply via email to