-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#22629) libdwarf: Add 0.9.0 and 0.9.1
* Add libdwarf 0.9.0 and 0.9.1 * Correction for the test package * Try to fix 0.9.0 * comment out remaining 0.9.1 references temporarily * Patch off_t * Try to get 0.9.1 good to go * Update recipes/libdwarf/all/conanfile.py Co-authored-by: Uilian Ries <uilianries@gmail.com> * Remove libdwarf 20191104 * Handle dwarfdump license * Update patches to use lowercasae zstd --------- Co-authored-by: Uilian Ries <uilianries@gmail.com>
- Loading branch information
1 parent
e6d41d3
commit 04f9866
Showing
8 changed files
with
236 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index f444af27..5c9390d1 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -181,14 +181,20 @@ endif() | ||
|
||
# Zlib and ZSTD need to be found otherwise disable it | ||
find_package(ZLIB) | ||
-find_package(ZSTD) | ||
-if (ZLIB_FOUND AND ZSTD_FOUND ) | ||
+find_package(zstd) | ||
+if (ZLIB_FOUND AND zstd_FOUND ) | ||
set(HAVE_ZLIB TRUE) | ||
set(HAVE_ZLIB_H TRUE) | ||
set(HAVE_ZSTD TRUE) | ||
set(HAVE_ZSTD_H TRUE) | ||
endif() | ||
|
||
+if(TARGET zstd::libzstd_shared) | ||
+ set(ZSTD_LIB zstd::libzstd_shared) | ||
+else() | ||
+ set(ZSTD_LIB zstd::libzstd_static) | ||
+endif() | ||
+ | ||
message(STATUS "CMAKE_SIZEOF_VOID_P ... " ${CMAKE_SIZEOF_VOID_P} ) | ||
|
||
# DW_FWALLXX are gnu C++ options. | ||
diff --git a/src/bin/dwarfdump/CMakeLists.txt b/src/bin/dwarfdump/CMakeLists.txt | ||
index 6d2c328b..bc105813 100644 | ||
--- a/src/bin/dwarfdump/CMakeLists.txt | ||
+++ b/src/bin/dwarfdump/CMakeLists.txt | ||
@@ -68,7 +68,7 @@ target_compile_options(dwarfdump PRIVATE ${DW_FWALL}) | ||
|
||
target_link_libraries(dwarfdump PRIVATE dwarf) | ||
|
||
-if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) | ||
+if(0) | ||
set(SUFFIX 64) | ||
endif() | ||
set(LIBDIR lib${SUFFIX}) | ||
diff --git a/src/lib/libdwarf/CMakeLists.txt b/src/lib/libdwarf/CMakeLists.txt | ||
index 4ad5c4fb..052208a1 100644 | ||
--- a/src/lib/libdwarf/CMakeLists.txt | ||
+++ b/src/lib/libdwarf/CMakeLists.txt | ||
@@ -107,11 +107,10 @@ target_include_directories(dwarf PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> | ||
) | ||
-if(ZLIB_FOUND AND ZSTD_FOUND) | ||
- target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ZSTD::ZSTD ) | ||
+if(ZLIB_FOUND AND zstd_FOUND) | ||
+ target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ${ZSTD_LIB} ) | ||
endif() | ||
|
||
-set(SUFFIX $<$<EQUAL:${CMAKE_SIZEOF_VOID_P},8>:64>) | ||
set(LIBDIR lib${SUFFIX}) | ||
set(BINDIR bin${SUFFIX}) | ||
|
||
@@ -120,7 +119,7 @@ install(TARGETS dwarf | ||
LIBRARY DESTINATION ${LIBDIR} | ||
ARCHIVE DESTINATION ${LIBDIR}) | ||
|
||
-configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY ) | ||
+# configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY ) | ||
|
||
# The install has to be here, not in | ||
# another CMakeLists.txt to make install work properly | ||
@@ -145,6 +144,8 @@ install( | ||
install( | ||
FILES ${CMAKE_CURRENT_SOURCE_DIR}/dwarf.h | ||
DESTINATION include/libdwarf) | ||
+if(0) | ||
install( FILES ${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc | ||
DESTINATION lib/pkgconfig | ||
) | ||
+endif() | ||
diff --git a/src/lib/libdwarf/libdwarf.h b/src/lib/libdwarf/libdwarf.h | ||
index ed3d1d0b..91f2fd8b 100644 | ||
--- a/src/lib/libdwarf/libdwarf.h | ||
+++ b/src/lib/libdwarf/libdwarf.h | ||
@@ -51,7 +51,7 @@ | ||
#endif /* DW_API */ | ||
|
||
#ifndef LIBDWARF_STATIC | ||
-# if defined(_WIN32) || defined(__CYGWIN__) | ||
+# if defined(LIBDWARF_SHARED) && (defined(_WIN32) || defined(__CYGWIN__)) | ||
# ifdef LIBDWARF_BUILD | ||
# define DW_API __declspec(dllexport) | ||
# else /* !LIBDWARF_BUILD */ | ||
diff --git a/src/lib/libdwarf/libdwarf_private.h b/src/lib/libdwarf/libdwarf_private.h | ||
index b37ae994..7fa89256 100644 | ||
--- a/src/lib/libdwarf/libdwarf_private.h | ||
+++ b/src/lib/libdwarf/libdwarf_private.h | ||
@@ -26,11 +26,7 @@ | ||
#ifdef _MSC_VER /* Macro to select VS compiler */ | ||
#include <windows.h> | ||
typedef SSIZE_T ssize_t; | ||
-#ifdef _WIN64 | ||
-typedef long long off_t; | ||
-#else | ||
typedef long off_t; | ||
-#endif | ||
#endif /* _MSC_VER */ | ||
|
||
#ifndef TRUE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 70839abd..972a2b9e 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -188,14 +188,20 @@ if (ENABLE_DECOMPRESSION) | ||
find_package(ZLIB) | ||
endif() | ||
if(NOT TARGET ZSTD::ZSTD) | ||
- find_package(ZSTD) | ||
+ find_package(zstd) | ||
endif() | ||
- if (ZLIB_FOUND AND ZSTD_FOUND ) | ||
+ if (ZLIB_FOUND AND zstd_FOUND ) | ||
set(HAVE_ZLIB TRUE) | ||
set(HAVE_ZLIB_H TRUE) | ||
set(HAVE_ZSTD TRUE) | ||
set(HAVE_ZSTD_H TRUE) | ||
endif() | ||
+ find_package(zstd CONFIG REQUIRED) | ||
+ if(TARGET zstd::libzstd_shared) | ||
+ set(ZSTD_LIB zstd::libzstd_shared) | ||
+ else() | ||
+ set(ZSTD_LIB zstd::libzstd_static) | ||
+ endif() | ||
endif () | ||
|
||
message(STATUS "CMAKE_SIZEOF_VOID_P ... " ${CMAKE_SIZEOF_VOID_P} ) | ||
diff --git a/src/lib/libdwarf/CMakeLists.txt b/src/lib/libdwarf/CMakeLists.txt | ||
index 7500c9f4..ce1461fb 100644 | ||
--- a/src/lib/libdwarf/CMakeLists.txt | ||
+++ b/src/lib/libdwarf/CMakeLists.txt | ||
@@ -104,8 +104,8 @@ target_include_directories(dwarf PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> | ||
) | ||
-if(ZLIB_FOUND AND ZSTD_FOUND) | ||
- target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ZSTD::ZSTD ) | ||
+if(ZLIB_FOUND AND zstd_FOUND) | ||
+ target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ${ZSTD_LIB} ) | ||
endif() | ||
set_target_properties(dwarf PROPERTIES PUBLIC_HEADER "libdwarf.h;dwarf.h") | ||
|
||
@@ -116,7 +116,7 @@ install(TARGETS dwarf | ||
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" | ||
) | ||
|
||
-configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY) | ||
+# configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY) | ||
|
||
# The install has to be here, not in | ||
# another CMakeLists.txt to make install work properly | ||
@@ -131,4 +131,4 @@ install(EXPORT libdwarfTargets | ||
NAMESPACE libdwarf:: | ||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libdwarf") | ||
install(FILES cmake/libdwarf-config.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libdwarf") | ||
-install(FILES "${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") | ||
+# install(FILES "${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") | ||
diff --git a/src/lib/libdwarf/libdwarf.h b/src/lib/libdwarf/libdwarf.h | ||
index 380d2ef7..8c62ee7e 100644 | ||
--- a/src/lib/libdwarf/libdwarf.h | ||
+++ b/src/lib/libdwarf/libdwarf.h | ||
@@ -51,7 +51,7 @@ | ||
#endif /* DW_API */ | ||
|
||
#ifndef LIBDWARF_STATIC | ||
-# if defined(_WIN32) || defined(__CYGWIN__) | ||
+# if defined(LIBDWARF_SHARED) && (defined(_WIN32) || defined(__CYGWIN__)) | ||
# ifdef LIBDWARF_BUILD | ||
# define DW_API __declspec(dllexport) | ||
# else /* !LIBDWARF_BUILD */ | ||
diff --git a/src/lib/libdwarf/libdwarf_private.h b/src/lib/libdwarf/libdwarf_private.h | ||
index b37ae994..7fa89256 100644 | ||
--- a/src/lib/libdwarf/libdwarf_private.h | ||
+++ b/src/lib/libdwarf/libdwarf_private.h | ||
@@ -26,11 +26,7 @@ | ||
#ifdef _MSC_VER /* Macro to select VS compiler */ | ||
#include <windows.h> | ||
typedef SSIZE_T ssize_t; | ||
-#ifdef _WIN64 | ||
-typedef long long off_t; | ||
-#else | ||
typedef long off_t; | ||
-#endif | ||
#endif /* _MSC_VER */ | ||
|
||
#ifndef TRUE |
Oops, something went wrong.