aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/minifi-cpp/files/fix-minifi-compile.patch
blob: d5b4449b8274672a5a7575e12b3e5cbc26d0559d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Upstream-Status: Pending

diff -urN -x .git orig/CMakeLists.txt patched/CMakeLists.txt
--- orig/CMakeLists.txt	2020-08-07 21:58:34.656773928 +0900
+++ patched/CMakeLists.txt	2020-08-10 15:08:31.800278357 +0900
@@ -119,13 +119,28 @@
 	endif()
 endif()
 
+include(CheckCXXSourceCompiles)
+CHECK_CXX_SOURCE_COMPILES("
+    #include <atomic>
+    int main(int argc, char **argv) {
+        uint8_t m;
+        __atomic_load_8(&m, 0);
+        __atomic_fetch_add_1(&m , 0, 0);
+        return 0;
+    }"
+    HAVE_ATOMIC
+)
+if(NOT HAVE_ATOMIC)
+    set(LIB_ATOMIC atomic)
+endif()
+
 # Use ccache if present
-find_program(CCACHE_FOUND ccache)
-if(CCACHE_FOUND)
-    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
-    set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
-    message("-- Found ccache: ${CCACHE_FOUND}")
-endif(CCACHE_FOUND)
+#find_program(CCACHE_FOUND ccache)
+#if(CCACHE_FOUND)
+#    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
+#    set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
+#    message("-- Found ccache: ${CCACHE_FOUND}")
+#endif(CCACHE_FOUND)
 
 if (UNIX AND USE_GOLD_LINKER AND NOT APPLE )
   execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE ld_version)
@@ -303,8 +318,10 @@
     GIT_TAG "f3294d9d86e6a7915a967efff2842089b8b0d071"  # Version 7.64.0
     SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/curl-src"
     LIST_SEPARATOR % # This is needed for passing semicolon-separated lists
+    TLS_VERIFY OFF
     CMAKE_ARGS ${PASSTHROUGH_CMAKE_ARGS}
                "-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/thirdparty/curl-install"
+               "-DCMAKE_INSTALL_LIBDIR=lib${LIBSUFFIX}"
                 -DCMAKE_POSITION_INDEPENDENT_CODE=ON
                 -DBUILD_CURL_EXE=OFF
                 -DBUILD_TESTING=OFF
diff -urN -x .git orig/libminifi/CMakeLists.txt patched/libminifi/CMakeLists.txt
--- orig/libminifi/CMakeLists.txt	2020-08-07 21:58:34.676773928 +0900
+++ patched/libminifi/CMakeLists.txt	2020-08-10 15:06:17.124278642 +0900
@@ -108,6 +108,7 @@
 add_library(spdlog STATIC ${SPD_SOURCES})
 add_library(core-minifi STATIC ${SOURCES})
 target_link_libraries(core-minifi ${CMAKE_DL_LIBS} yaml-cpp)
+target_link_libraries(core-minifi ${LIB_ATOMIC})
 
 #target_link_libraries(core-minifi  PRIVATE bsdiff )