glog: fixed the build for mips and other platforms
PATCH v3 1/1 glog: fixed the build for mips and other platforms
From: Vyacheslav Yurkov <[email protected]>
According to build log http://errors.yoctoproject.org/Errors/Details/201286/
FindLibunwind wokred only for x86, arm, and x86_64. This patch extends the cmake module to work with mips, ia64, ppc(64) and other architectures supported by libunwind
--- ...0002-Find-Libunwind-during-configure.patch | 53 +++++++++++-------- 1 file changed, 30 insertions(+), 23 deletions(-)
meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patch +30 -23
@@ -1,11 +1,11 @@ diff -uNr a/cmake/FindLibunwind.cmake b/cmake/FindLibunwind.cmake --- a/cmake/FindLibunwind.cmake 1970-01-01 01:00:00.000000000 +0100 -+++ b/cmake/FindLibunwind.cmake 2018-11-02 14:04:35.460437058 +0100 -@@ -0,0 +1,37 @@ ++++ b/cmake/FindLibunwind.cmake 2018-11-20 15:53:48.799078114 +0100 +@@ -0,0 +1,54 @@ +# - Try to find libunwind +# Once done this will define +# -+# LIBUNWIND_FOUND - system has libunwind ++# Libunwind_FOUND - system has libunwind +# unwind - cmake target for libunwind + +find_library (UNWIND_LIBRARY NAMES unwind DOC "unwind library")
@@ -15,11 +15,24 @@ diff -uNr a/cmake/FindLibunwind.cmake b/cmake/FindLibunwind.cmake + +if (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm") + set(LIBUNWIND_ARCH "arm") ++elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64") ++ set(LIBUNWIND_ARCH "aarch64") +elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR -+ CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64") ++ CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64" OR ++ CMAKE_SYSTEM_PROCESSOR STREQUAL "corei7-64") + set(LIBUNWIND_ARCH "x86_64") +elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$") + set(LIBUNWIND_ARCH "x86") ++elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64") ++ set(LIBUNWIND_ARCH "ppc64") ++elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc") ++ set(LIBUNWIND_ARCH "ppc32") ++elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^mips") ++ set(LIBUNWIND_ARCH "mips") ++elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^hppa") ++ set(LIBUNWIND_ARCH "hppa") ++elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^ia64") ++ set(LIBUNWIND_ARCH "ia64") +endif() + +find_library (UNWIND_LIBRARY_PLATFORM NAMES "unwind-${LIBUNWIND_ARCH}" DOC "unwind library platform")
@@ -35,13 +48,17 @@ diff -uNr a/cmake/FindLibunwind.cmake b/cmake/FindLibunwind.cmake + +mark_as_advanced (UNWIND_LIBRARY UNWIND_LIBRARY_PLATFORM) + -+add_library(unwind INTERFACE IMPORTED) -+set_target_properties(unwind PROPERTIES -+ INTERFACE_LINK_LIBRARIES "${UNWIND_LIBRARY};${UNWIND_LIBRARY_PLATFORM}" -+) ++if (Libunwind_FOUND) ++ add_library(unwind INTERFACE IMPORTED) ++ set_target_properties(unwind PROPERTIES ++ INTERFACE_LINK_LIBRARIES "${UNWIND_LIBRARY};${UNWIND_LIBRARY_PLATFORM}" ++ ) ++else() ++ message("Can't find libunwind library") ++endif() diff -uNr a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt 2018-11-02 14:02:21.784835854 +0100 -+++ b/CMakeLists.txt 2018-11-02 14:03:16.796935594 +0100 +--- a/CMakeLists.txt 2018-11-20 15:49:07.576278417 +0100 ++++ b/CMakeLists.txt 2018-11-20 15:49:32.106819928 +0100 @@ -58,7 +58,6 @@ check_include_file (execinfo.h HAVE_EXECINFO_H) check_include_file (glob.h HAVE_GLOB_H)
@@ -91,23 +108,13 @@ diff -uNr a/CMakeLists.txt b/CMakeLists.txt DESTINATION lib/cmake/glog) install (EXPORT glog-targets NAMESPACE glog:: DESTINATION lib/cmake/glog) -Binary files a/.git/index and b/.git/index differ diff -uNr a/glog-config.cmake.in b/glog-config.cmake.in ---- a/glog-config.cmake.in 2018-11-02 14:02:21.784835854 +0100 -+++ b/glog-config.cmake.in 2018-11-02 14:03:16.796935594 +0100 -@@ -4,4 +4,15 @@ +--- a/glog-config.cmake.in 2018-11-20 15:49:07.576278417 +0100 ++++ b/glog-config.cmake.in 2018-11-20 15:52:32.330418489 +0100 +@@ -4,4 +4,6 @@ @gflags_DEPENDENCY@ -+# Record the state of the CMake module path when this script was -+# called so that we can ensure that we leave it in the same state on -+# exit as it was on entry, but modify it locally. -+set(UNWIND_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) -+ -+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") +find_dependency (Libunwind) -+ -+# Restore original module path -+set(CMAKE_MODULE_PATH "${UNWIND_CMAKE_MODULE_PATH}") + include ("${CMAKE_CURRENT_LIST_DIR}/glog-targets.cmake")
Signature · 1 line
2.19.1
Hi,
there is one more issue when multilib is enabled.
ERROR: QA Issue: glog: Files/directories were installed but not shipped in any package:
/usr/lib/libglog.so.0.3.5
/usr/lib/libglog.so.0
/usr/lib/libglog.so
/usr/lib/cmake
/usr/lib/cmake/glog /usr/lib/cmake/glog/glog-config-version.cmake /usr/lib/cmake/glog/FindLibunwind.cmake /usr/lib/cmake/glog/glog-targets-noconfig.cmake /usr/lib/cmake/glog/glog-config.cmake /usr/lib/cmake/glog/glog-targets.cmake
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
glog: 10 installed and not shipped files. [installed-vs-shipped]
It shouldn't hardcode "lib" directory and it should respect libdir from OE environment instead (in this case /usr/lib64).
Quoted 128 lines · Vyacheslav Yurkov
From: Vyacheslav Yurkov <[email protected]>
According to build log
http://errors.yoctoproject.org/Errors/Details/201286/
FindLibunwind wokred only for x86, arm, andx86_64. This patch extends the cmake module to work with mips, ia64, ppc(64) and other architectures supported
by libunwindSigned-off-by Vyacheslav Yurkov <[email protected]>--- ...0002-Find-Libunwind-during-configure.patch | 53 +++++++++++-------- 1 file changed, 30 insertions(+), 23 deletions(-)diff --git
a/meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patchb/meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patchindex3a6f824ea..15cf67fd2100644
---a/meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patch
+++b/meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patchmeta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patch +3
-3@@ -1,11 +1,11 @@ diff -uNr a/cmake/FindLibunwind.cmake b/cmake/FindLibunwind.cmake --- a/cmake/FindLibunwind.cmake 1970-01-01 01:00:00.000000000 +0100 -+++ b/cmake/FindLibunwind.cmake 2018-11-02 14:04:35.460437058 +0100 -@@ -0,0 +1,37 @@ ++++ b/cmake/FindLibunwind.cmake 2018-11-20 15:53:48.799078114 +0100 +@@ -0,0 +1,54 @@ +# - Try to find libunwind +# Once done this will define +# -+# LIBUNWIND_FOUND - system has libunwind ++# Libunwind_FOUND - system has libunwind +# unwind - cmake target for libunwind + +find_library (UNWIND_LIBRARY NAMES unwind DOC "unwind library")@@ -15,11 +15,24 @@ diff -uNr a/cmake/FindLibunwind.cmakeb/cmake/FindLibunwind.cmake
+
+if (CMAKE_SYSTEM_PROCESSORMATCHES "^arm")
+set(LIBUNWIND_ARCH "arm")
++elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^aarch64")
++set(LIBUNWIND_ARCH "aarch64")
+elseif (CMAKE_SYSTEM_PROCESSORSTREQUAL "x86_64" OR-+ CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64") ++ CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64" OR ++ CMAKE_SYSTEM_PROCESSOR STREQUAL "corei7-64")+
set(LIBUNWIND_ARCH "x86_64")
+elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^i.86$")
+set(LIBUNWIND_ARCH "x86")
++elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^ppc64")
++set(LIBUNWIND_ARCH "ppc64")
++elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^ppc")
++set(LIBUNWIND_ARCH "ppc32")
++elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^mips")
++set(LIBUNWIND_ARCH "mips")
++elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^hppa")
++set(LIBUNWIND_ARCH "hppa")
++elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^ia64")
++set(LIBUNWIND_ARCH "ia64")
+endif()
+
+find_library (UNWIND_LIBRARY_PLATFORMNAMES "unwind-${LIBUNWIND_ARCH}"
DOC "unwind library platform")(quoted diff) +0
-0@@ -35,13 +48,17 @@ diff -uNr a/cmake/FindLibunwind.cmakeb/cmake/FindLibunwind.cmake
+
+mark_as_advanced (UNWIND_LIBRARYUNWIND_LIBRARY_PLATFORM) +
-+add_library(unwind INTERFACE IMPORTED) -+set_target_properties(unwind PROPERTIES
-+INTERFACE_LINK_LIBRARIES
"${UNWIND_LIBRARY};${UNWIND_LIBRARY_PLATFORM}"
-+)
++if (Libunwind_FOUND)
++add_library(unwind INTERFACE IMPORTED)
++ set_target_properties(unwind PROPERTIES
++INTERFACE_LINK_LIBRARIES
"${UNWIND_LIBRARY};${UNWIND_LIBRARY_PLATFORM}"
++ )
++else()
++message("Can't find libunwind library")
++endif()
diff -uNra/CMakeLists.txtb/CMakeLists.txt---- a/CMakeLists.txt 2018-11-02 14:02:21.784835854 +0100 -+++ b/CMakeLists.txt 2018-11-02 14:03:16.796935594 +0100 +--- a/CMakeLists.txt 2018-11-20 15:49:07.576278417 +0100 ++++ b/CMakeLists.txt 2018-11-20 15:49:32.106819928 +0100@@ -58,7 +58,6 @@
check_include_file(execinfo.hHAVE_EXECINFO_H)
check_include_file(glob.hHAVE_GLOB_H)meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patch +3
-14@@ -91,23 +108,13 @@ diff -uNr a/CMakeLists.txt b/CMakeLists.txt DESTINATION lib/cmake/glog) install (EXPORT glog-targets NAMESPACE glog:: DESTINATION lib/cmake/glog) -Binary files a/.git/index and b/.git/index differ diff -uNr a/glog-config.cmake.in b/glog-config.cmake.in ---- a/glog-config.cmake.in 2018-11-02 14:02:21.784835854 +0100 -+++ b/glog-config.cmake.in 2018-11-02 14:03:16.796935594 +0100 -@@ -4,4 +4,15 @@ +--- a/glog-config.cmake.in 2018-11-20 15:49:07.576278417 +0100 ++++ b/glog-config.cmake.in 2018-11-20 15:52:32.330418489 +0100 +@@ -4,4 +4,6 @@ @gflags_DEPENDENCY@ -+# Record the state of the CMake module path when this script was -+# called so that we can ensure that we leave it in the same state on -+# exit as it was on entry, but modify it locally. -+set(UNWIND_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) -+ -+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") +find_dependency (Libunwind) -+ -+# Restore original module path -+set(CMAKE_MODULE_PATH "${UNWIND_CMAKE_MODULE_PATH}") + include ("${CMAKE_CURRENT_LIST_DIR}/glog-targets.cmake") --2.19.1
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Hi Martin,
I guess this issue is supposed to be fixed in glog master already, because it uses ${CMAKE_INSTALL_LIBDIR}, not hard-coded "lib". I will backport a patch for that
Regards,
Vyacheslav
Quoted 159 lines · Martin Jansa
Hi,
there is one more issue when multilib is enabled.
ERROR: QA Issue: glog: Files/directories were installed but not shipped in any package:
/usr/lib/libglog.so.0.3.5
/usr/lib/libglog.so.0
/usr/lib/libglog.so
/usr/lib/cmake
/usr/lib/cmake/glog/usr/lib/cmake/glog/glog-config-version.cmake/usr/lib/cmake/glog/FindLibunwind.cmake/usr/lib/cmake/glog/glog-targets-noconfig.cmake/usr/lib/cmake/glog/glog-config.cmake/usr/lib/cmake/glog/glog-targets.cmake
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them withindo_install.
glog: 10 installed and not shipped files. [installed-vs-shipped]It shouldn't hardcode "lib" directory and it should respect libdir from OE environment instead (in this case
/usr/lib64).Quoted 132 lines · Vyacheslav Yurkov
From: Vyacheslav Yurkov <[email protected]>
According to build log
http://errors.yoctoproject.org/Errors/Details/201286/
FindLibunwind wokred only for x86, arm, andx86_64. This patch extends the cmake module to work with mips, ia64, ppc(64) and other architectures supported
by libunwindSigned-off-by Vyacheslav Yurkov <[email protected]>--- ...0002-Find-Libunwind-during-configure.patch | 53 +++++++++++-------- 1 file changed, 30 insertions(+), 23 deletions(-)diff --git
a/meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patchb/meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patchindex3a6f824ea..15cf67fd2100644
---a/meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patch
+++b/meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patchmeta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patch +6
-3@@ -1,11 +1,11 @@ diff -uNr a/cmake/FindLibunwind.cmake b/cmake/FindLibunwind.cmake --- a/cmake/FindLibunwind.cmake 1970-01-01 01:00:00.000000000 +0100 -+++ b/cmake/FindLibunwind.cmake 2018-11-02 14:04:35.460437058 +0100 -@@ -0,0 +1,37 @@ ++++ b/cmake/FindLibunwind.cmake 2018-11-20 15:53:48.799078114 +0100 +@@ -0,0 +1,54 @@ +# - Try to find libunwind +# Once done this will define +# -+# LIBUNWIND_FOUND - system has libunwind ++# Libunwind_FOUND - system has libunwind +# unwind - cmake target for libunwind + +find_library (UNWIND_LIBRARY NAMES unwind DOC "unwind library")@@ -15,11 +15,24 @@ diff -uNr a/cmake/FindLibunwind.cmakeb/cmake/FindLibunwind.cmake
+
+if (CMAKE_SYSTEM_PROCESSORMATCHES "^arm")
+set(LIBUNWIND_ARCH "arm")
++elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^aarch64")
++set(LIBUNWIND_ARCH "aarch64")
+elseif (CMAKE_SYSTEM_PROCESSORSTREQUAL "x86_64" OR-+ CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64") ++ CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64" OR ++ CMAKE_SYSTEM_PROCESSOR STREQUAL "corei7-64")+
set(LIBUNWIND_ARCH "x86_64")
+elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^i.86$")
+set(LIBUNWIND_ARCH "x86")
++elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^ppc64")
++set(LIBUNWIND_ARCH "ppc64")
++elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^ppc")
++set(LIBUNWIND_ARCH "ppc32")
++elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^mips")
++set(LIBUNWIND_ARCH "mips")
++elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^hppa")
++set(LIBUNWIND_ARCH "hppa")
++elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^ia64")
++set(LIBUNWIND_ARCH "ia64")
+endif()
+
+find_library (UNWIND_LIBRARY_PLATFORMNAMES "unwind-${LIBUNWIND_ARCH}"
DOC "unwind library platform")(quoted diff) +0
-0@@ -35,13 +48,17 @@ diff -uNr a/cmake/FindLibunwind.cmakeb/cmake/FindLibunwind.cmake
+
+mark_as_advanced (UNWIND_LIBRARYUNWIND_LIBRARY_PLATFORM) +
-+add_library(unwind INTERFACE IMPORTED) -+set_target_properties(unwind PROPERTIES
-+INTERFACE_LINK_LIBRARIES
"${UNWIND_LIBRARY};${UNWIND_LIBRARY_PLATFORM}"
-+)
++if (Libunwind_FOUND)
++add_library(unwind INTERFACE IMPORTED)
++ set_target_properties(unwind PROPERTIES
++INTERFACE_LINK_LIBRARIES
"${UNWIND_LIBRARY};${UNWIND_LIBRARY_PLATFORM}"
++ )
++else()
++message("Can't find libunwind library")
++endif()
diff -uNra/CMakeLists.txtb/CMakeLists.txt---- a/CMakeLists.txt 2018-11-02 14:02:21.784835854 +0100 -+++ b/CMakeLists.txt 2018-11-02 14:03:16.796935594 +0100 +--- a/CMakeLists.txt 2018-11-20 15:49:07.576278417 +0100 ++++ b/CMakeLists.txt 2018-11-20 15:49:32.106819928 +0100@@ -58,7 +58,6 @@
check_include_file(execinfo.hHAVE_EXECINFO_H)
check_include_file(glob.hHAVE_GLOB_H)meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patch +3
-13@@ -91,23 +108,13 @@ diff -uNr a/CMakeLists.txt b/CMakeLists.txt DESTINATION lib/cmake/glog) install (EXPORT glog-targets NAMESPACE glog:: DESTINATION lib/cmake/glog) -Binary files a/.git/index and b/.git/index differ diff -uNr a/glog-config.cmake.in b/glog-config.cmake.in ---- a/glog-config.cmake.in 2018-11-02 14:02:21.784835854 +0100 -+++ b/glog-config.cmake.in 2018-11-02 14:03:16.796935594 +0100 -@@ -4,4 +4,15 @@ +--- a/glog-config.cmake.in 2018-11-20 15:49:07.576278417 +0100 ++++ b/glog-config.cmake.in 2018-11-20 15:52:32.330418489 +0100 +@@ -4,4 +4,6 @@ @gflags_DEPENDENCY@ -+# Record the state of the CMake module path when this script was -+# called so that we can ensure that we leave it in the same state on -+# exit as it was on entry, but modify it locally. -+set(UNWIND_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) -+ -+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") +find_dependency (Libunwind) -+ -+# Restore original module path -+set(CMAKE_MODULE_PATH "${UNWIND_CMAKE_MODULE_PATH}") +include ("${CMAKE_CURRENT_LIST_DIR}/glog-targets.cmake")
--
2.19.1--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Thanks, if you don't have mulitib build ready, I can test it as soon as you send it to ML.
Quoted 172 lines · Vyacheslav Yurkov
Hi Martin,
I guess this issue is supposed to be fixed in glog master already, because it uses ${CMAKE_INSTALL_LIBDIR}, not hard-coded "lib". I will backport a patch for thatRegards,
VyacheslavQuoted 160 lines · Martin Jansa
Hi,
there is one more issue when multilib is enabled.
ERROR: QA Issue: glog: Files/directories were installed but not shipped in any package:
/usr/lib/libglog.so.0.3.5
/usr/lib/libglog.so.0
/usr/lib/libglog.so
/usr/lib/cmake
/usr/lib/cmake/glog/usr/lib/cmake/glog/glog-config-version.cmake/usr/lib/cmake/glog/FindLibunwind.cmake/usr/lib/cmake/glog/glog-targets-noconfig.cmake/usr/lib/cmake/glog/glog-config.cmake/usr/lib/cmake/glog/glog-targets.cmake
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them withindo_install.
glog: 10 installed and not shipped files. [installed-vs-shipped]It shouldn't hardcode "lib" directory and it should respect libdir from OE environment instead (in this case
/usr/lib64).Quoted 133 lines · Vyacheslav Yurkov
From: Vyacheslav Yurkov <[email protected]>
According to build log
http://errors.yoctoproject.org/Errors/Details/201286/
FindLibunwind wokred only for x86, arm, andx86_64. This patch extends the
cmake module to work with mips, ia64, ppc(64) and other architectures supported
by libunwindSigned-off-by Vyacheslav Yurkov <[email protected]>--- ...0002-Find-Libunwind-during-configure.patch | 53 +++++++++++-------- 1 file changed, 30 insertions(+), 23 deletions(-)diff --git
a/meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patchb/meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patchindex3a6f824ea..15cf67fd2100644
---a/meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patch
+++b/meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patchmeta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patch +6
-3@@ -1,11 +1,11 @@ diff -uNr a/cmake/FindLibunwind.cmake b/cmake/FindLibunwind.cmake --- a/cmake/FindLibunwind.cmake 1970-01-01 01:00:00.000000000 +0100 -+++ b/cmake/FindLibunwind.cmake 2018-11-02 14:04:35.460437058 +0100 -@@ -0,0 +1,37 @@ ++++ b/cmake/FindLibunwind.cmake 2018-11-20 15:53:48.799078114 +0100 +@@ -0,0 +1,54 @@ +# - Try to find libunwind +# Once done this will define +# -+# LIBUNWIND_FOUND - system has libunwind ++# Libunwind_FOUND - system has libunwind +# unwind - cmake target for libunwind + +find_library (UNWIND_LIBRARY NAMES unwind DOC "unwind library")@@ -15,11 +15,24 @@ diff -uNr a/cmake/FindLibunwind.cmakeb/cmake/FindLibunwind.cmake
+
+if (CMAKE_SYSTEM_PROCESSORMATCHES "^arm")
+set(LIBUNWIND_ARCH "arm")
++elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^aarch64")
++set(LIBUNWIND_ARCH "aarch64")
+elseif (CMAKE_SYSTEM_PROCESSORSTREQUAL "x86_64" OR-+ CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64") ++ CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64" OR ++ CMAKE_SYSTEM_PROCESSOR STREQUAL "corei7-64")+
set(LIBUNWIND_ARCH "x86_64")
+elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^i.86$")
+set(LIBUNWIND_ARCH "x86")
++elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^ppc64")
++set(LIBUNWIND_ARCH "ppc64")
++elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^ppc")
++set(LIBUNWIND_ARCH "ppc32")
++elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^mips")
++set(LIBUNWIND_ARCH "mips")
++elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^hppa")
++set(LIBUNWIND_ARCH "hppa")
++elseif (CMAKE_SYSTEM_PROCESSORMATCHES "^ia64")
++set(LIBUNWIND_ARCH "ia64")
+endif()
+
+find_library (UNWIND_LIBRARY_PLATFORMNAMES "unwind-${LIBUNWIND_ARCH}"
DOC "unwind library platform")(quoted diff) +0
-0@@ -35,13 +48,17 @@ diff -uNr a/cmake/FindLibunwind.cmakeb/cmake/FindLibunwind.cmake
+
+mark_as_advanced (UNWIND_LIBRARYUNWIND_LIBRARY_PLATFORM) +
-+add_library(unwind INTERFACE IMPORTED) -+set_target_properties(unwind PROPERTIES
-+INTERFACE_LINK_LIBRARIES
"${UNWIND_LIBRARY};${UNWIND_LIBRARY_PLATFORM}"
-+)
++if (Libunwind_FOUND)
++add_library(unwind INTERFACE IMPORTED)
++ set_target_properties(unwind PROPERTIES
++INTERFACE_LINK_LIBRARIES
"${UNWIND_LIBRARY};${UNWIND_LIBRARY_PLATFORM}"
++ )
++else()
++message("Can't find libunwind library")
++endif()
diff -uNra/CMakeLists.txtb/CMakeLists.txt---- a/CMakeLists.txt 2018-11-02 14:02:21.784835854 +0100 -+++ b/CMakeLists.txt 2018-11-02 14:03:16.796935594 +0100 +--- a/CMakeLists.txt 2018-11-20 15:49:07.576278417 +0100 ++++ b/CMakeLists.txt 2018-11-20 15:49:32.106819928 +0100@@ -58,7 +58,6 @@
check_include_file(execinfo.hHAVE_EXECINFO_H)
check_include_file(glob.hHAVE_GLOB_H)meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patch +3
-13@@ -91,23 +108,13 @@ diff -uNr a/CMakeLists.txt b/CMakeLists.txt DESTINATION lib/cmake/glog) install (EXPORT glog-targets NAMESPACE glog:: DESTINATION lib/cmake/glog) -Binary files a/.git/index and b/.git/index differ diff -uNr a/glog-config.cmake.in b/glog-config.cmake.in ---- a/glog-config.cmake.in 2018-11-02 14:02:21.784835854 +0100 -+++ b/glog-config.cmake.in 2018-11-02 14:03:16.796935594 +0100 -@@ -4,4 +4,15 @@ +--- a/glog-config.cmake.in 2018-11-20 15:49:07.576278417 +0100 ++++ b/glog-config.cmake.in 2018-11-20 15:52:32.330418489 +0100 +@@ -4,4 +4,6 @@ @gflags_DEPENDENCY@ -+# Record the state of the CMake module path when this script was -+# called so that we can ensure that we leave it in the same state on -+# exit as it was on entry, but modify it locally. -+set(UNWIND_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) -+ -+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") +find_dependency (Libunwind) -+ -+# Restore original module path -+set(CMAKE_MODULE_PATH "${UNWIND_CMAKE_MODULE_PATH}") +include ("${CMAKE_CURRENT_LIST_DIR}/glog-targets.cmake")
--
2.19.1--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel