diff options
-rw-r--r-- | meta-oe/recipes-support/glog/glog/0001-Find-Libunwind-during-configure.patch | 119 | ||||
-rw-r--r-- | meta-oe/recipes-support/glog/glog/libexecinfo.patch | 14 | ||||
-rw-r--r-- | meta-oe/recipes-support/glog/glog_0.5.0.bb (renamed from meta-oe/recipes-support/glog/glog_0.4.0.bb) | 3 |
3 files changed, 8 insertions, 128 deletions
diff --git a/meta-oe/recipes-support/glog/glog/0001-Find-Libunwind-during-configure.patch b/meta-oe/recipes-support/glog/glog/0001-Find-Libunwind-during-configure.patch deleted file mode 100644 index 4c0861cca1..0000000000 --- a/meta-oe/recipes-support/glog/glog/0001-Find-Libunwind-during-configure.patch +++ /dev/null | |||
@@ -1,119 +0,0 @@ | |||
1 | --- /dev/null | ||
2 | +++ b/cmake/FindLibunwind.cmake | ||
3 | @@ -0,0 +1,54 @@ | ||
4 | +# - Try to find libunwind | ||
5 | +# Once done this will define | ||
6 | +# | ||
7 | +# Libunwind_FOUND - system has libunwind | ||
8 | +# unwind - cmake target for libunwind | ||
9 | + | ||
10 | +find_library (UNWIND_LIBRARY NAMES unwind DOC "unwind library") | ||
11 | +include (CheckIncludeFile) | ||
12 | +check_include_file (libunwind.h HAVE_LIBUNWIND_H) | ||
13 | +check_include_file (unwind.h HAVE_UNWIND_H) | ||
14 | + | ||
15 | +if (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm") | ||
16 | + set(LIBUNWIND_ARCH "arm") | ||
17 | +elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64") | ||
18 | + set(LIBUNWIND_ARCH "aarch64") | ||
19 | +elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR | ||
20 | + CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64" OR | ||
21 | + CMAKE_SYSTEM_PROCESSOR STREQUAL "corei7-64") | ||
22 | + set(LIBUNWIND_ARCH "x86_64") | ||
23 | +elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$") | ||
24 | + set(LIBUNWIND_ARCH "x86") | ||
25 | +elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64") | ||
26 | + set(LIBUNWIND_ARCH "ppc64") | ||
27 | +elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc") | ||
28 | + set(LIBUNWIND_ARCH "ppc32") | ||
29 | +elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^mips") | ||
30 | + set(LIBUNWIND_ARCH "mips") | ||
31 | +elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^hppa") | ||
32 | + set(LIBUNWIND_ARCH "hppa") | ||
33 | +elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^ia64") | ||
34 | + set(LIBUNWIND_ARCH "ia64") | ||
35 | +endif() | ||
36 | + | ||
37 | +find_library (UNWIND_LIBRARY_PLATFORM NAMES "unwind-${LIBUNWIND_ARCH}" DOC "unwind library platform") | ||
38 | +if (UNWIND_LIBRARY_PLATFORM) | ||
39 | + set(HAVE_LIB_UNWIND "1") | ||
40 | +endif() | ||
41 | + | ||
42 | +include(FindPackageHandleStandardArgs) | ||
43 | +# handle the QUIETLY and REQUIRED arguments and set Libunwind_FOUND to TRUE | ||
44 | +# if all listed variables are TRUE | ||
45 | +find_package_handle_standard_args(Libunwind DEFAULT_MSG | ||
46 | + UNWIND_LIBRARY HAVE_LIBUNWIND_H HAVE_UNWIND_H HAVE_LIB_UNWIND) | ||
47 | + | ||
48 | +mark_as_advanced (UNWIND_LIBRARY UNWIND_LIBRARY_PLATFORM) | ||
49 | + | ||
50 | +if (Libunwind_FOUND) | ||
51 | + add_library(unwind INTERFACE IMPORTED) | ||
52 | + set_target_properties(unwind PROPERTIES | ||
53 | + INTERFACE_LINK_LIBRARIES "${UNWIND_LIBRARY};${UNWIND_LIBRARY_PLATFORM}" | ||
54 | + ) | ||
55 | +else() | ||
56 | + message("Can't find libunwind library") | ||
57 | +endif() | ||
58 | --- a/CMakeLists.txt | ||
59 | +++ b/CMakeLists.txt | ||
60 | @@ -64,7 +64,6 @@ check_include_file (dlfcn.h HAVE_DLFCN_H | ||
61 | check_include_file (execinfo.h HAVE_EXECINFO_H) | ||
62 | check_include_file (glob.h HAVE_GLOB_H) | ||
63 | check_include_file (inttypes.h HAVE_INTTYPES_H) | ||
64 | -check_include_file (libunwind.h HAVE_LIBUNWIND_H) | ||
65 | check_include_file (memory.h HAVE_MEMORY_H) | ||
66 | check_include_file (pwd.h HAVE_PWD_H) | ||
67 | check_include_file (stdint.h HAVE_STDINT_H) | ||
68 | @@ -80,7 +79,6 @@ check_include_file (syscall.h HAVE_SYSCA | ||
69 | check_include_file (syslog.h HAVE_SYSLOG_H) | ||
70 | check_include_file (ucontext.h HAVE_UCONTEXT_H) | ||
71 | check_include_file (unistd.h HAVE_UNISTD_H) | ||
72 | -check_include_file (unwind.h HAVE_UNWIND_H) | ||
73 | check_include_file (pwd.h HAVE_PWD_H) | ||
74 | |||
75 | check_include_file_cxx ("ext/hash_map" HAVE_EXT_HASH_MAP) | ||
76 | @@ -116,11 +114,9 @@ check_cxx_compiler_flag (-Wunnamed-type- | ||
77 | # snprintf as an inline function | ||
78 | check_symbol_exists (snprintf stdio.h HAVE_SNPRINTF) | ||
79 | |||
80 | -check_library_exists (unwind get_static_proc_name "" HAVE_LIB_UNWIND) | ||
81 | check_library_exists (dbghelp UnDecorateSymbolName "" HAVE_DBGHELP) | ||
82 | |||
83 | -find_library (UNWIND_LIBRARY NAMES unwind DOC "unwind library") | ||
84 | -mark_as_advanced (UNWIND_LIBRARY) | ||
85 | +find_package(Libunwind) | ||
86 | |||
87 | check_c_source_compiles (" | ||
88 | #include <stdlib.h> | ||
89 | @@ -471,9 +467,9 @@ add_library(glog::glog ALIAS glog) | ||
90 | |||
91 | set_target_properties (glog PROPERTIES POSITION_INDEPENDENT_CODE ON) | ||
92 | |||
93 | -if (UNWIND_LIBRARY) | ||
94 | - target_link_libraries (glog PUBLIC ${UNWIND_LIBRARY}) | ||
95 | -endif (UNWIND_LIBRARY) | ||
96 | +if (Libunwind_FOUND) | ||
97 | + target_link_libraries (glog PUBLIC unwind) | ||
98 | +endif (Libunwind_FOUND) | ||
99 | |||
100 | if (HAVE_DBGHELP) | ||
101 | target_link_libraries (glog PUBLIC dbghelp) | ||
102 | @@ -678,6 +674,7 @@ export (PACKAGE glog) | ||
103 | install (FILES | ||
104 | ${CMAKE_CURRENT_BINARY_DIR}/glog-config.cmake | ||
105 | ${CMAKE_CURRENT_BINARY_DIR}/glog-config-version.cmake | ||
106 | + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindLibunwind.cmake | ||
107 | DESTINATION ${_glog_CMake_INSTALLDIR}) | ||
108 | |||
109 | install (EXPORT glog-targets NAMESPACE glog:: DESTINATION | ||
110 | --- a/glog-config.cmake.in | ||
111 | +++ b/glog-config.cmake.in | ||
112 | @@ -8,4 +8,7 @@ include (CMakeFindDependencyMacro) | ||
113 | |||
114 | @gflags_DEPENDENCY@ | ||
115 | |||
116 | +list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") | ||
117 | +find_dependency (Libunwind) | ||
118 | + | ||
119 | include ("${CMAKE_CURRENT_LIST_DIR}/glog-targets.cmake") | ||
diff --git a/meta-oe/recipes-support/glog/glog/libexecinfo.patch b/meta-oe/recipes-support/glog/glog/libexecinfo.patch index ae46d3274f..927c269a6a 100644 --- a/meta-oe/recipes-support/glog/glog/libexecinfo.patch +++ b/meta-oe/recipes-support/glog/glog/libexecinfo.patch | |||
@@ -8,17 +8,17 @@ Upstream-Status: Pending | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
9 | --- a/CMakeLists.txt | 9 | --- a/CMakeLists.txt |
10 | +++ b/CMakeLists.txt | 10 | +++ b/CMakeLists.txt |
11 | @@ -115,6 +115,7 @@ check_cxx_compiler_flag (-Wunnamed-type- | 11 | @@ -144,6 +144,7 @@ check_cxx_compiler_flag (-Wunnamed-type- |
12 | check_symbol_exists (snprintf stdio.h HAVE_SNPRINTF) | 12 | check_symbol_exists (snprintf cstdio HAVE_SNPRINTF) |
13 | 13 | ||
14 | check_library_exists (dbghelp UnDecorateSymbolName "" HAVE_DBGHELP) | 14 | check_library_exists (dbghelp UnDecorateSymbolName "" HAVE_DBGHELP) |
15 | +check_library_exists (execinfo backtrace "" HAVE_EXECINFO) | 15 | +check_library_exists (execinfo backtrace "" HAVE_EXECINFO) |
16 | 16 | ||
17 | find_package(Libunwind) | 17 | check_cxx_source_compiles (" |
18 | 18 | #include <cstdlib> | |
19 | @@ -471,6 +472,10 @@ if (Libunwind_FOUND) | 19 | @@ -584,6 +585,10 @@ if (Unwind_FOUND) |
20 | target_link_libraries (glog PUBLIC unwind) | 20 | set (Unwind_DEPENDENCY "find_dependency (Unwind ${Unwind_VERSION})") |
21 | endif (Libunwind_FOUND) | 21 | endif (Unwind_FOUND) |
22 | 22 | ||
23 | +if (HAVE_EXECINFO) | 23 | +if (HAVE_EXECINFO) |
24 | + target_link_libraries (glog PUBLIC execinfo) | 24 | + target_link_libraries (glog PUBLIC execinfo) |
diff --git a/meta-oe/recipes-support/glog/glog_0.4.0.bb b/meta-oe/recipes-support/glog/glog_0.5.0.bb index 6b101ef676..c4ba9f244f 100644 --- a/meta-oe/recipes-support/glog/glog_0.4.0.bb +++ b/meta-oe/recipes-support/glog/glog_0.5.0.bb | |||
@@ -8,11 +8,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=dc9db360e0bbd4e46672f3fd91dd6c4b" | |||
8 | 8 | ||
9 | SRC_URI = " \ | 9 | SRC_URI = " \ |
10 | git://github.com/google/glog.git;nobranch=1 \ | 10 | git://github.com/google/glog.git;nobranch=1 \ |
11 | file://0001-Find-Libunwind-during-configure.patch \ | ||
12 | file://libexecinfo.patch \ | 11 | file://libexecinfo.patch \ |
13 | " | 12 | " |
14 | 13 | ||
15 | SRCREV = "96a2f23dca4cc7180821ca5f32e526314395d26a" | 14 | SRCREV = "8f9ccfe770add9e4c64e9b25c102658e3c763b73" |
16 | 15 | ||
17 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |
18 | 17 | ||