[vlc-devel] [PATCH] cmake: backport backtrace API fix to release 2.8

Sean McGovern gseanmcg at gmail.com
Thu Oct 30 04:50:36 CET 2014


---
This fixes building cmake-2.8.x on Solaris. It is already present in cmake 3.0.x.
---
 extras/tools/cmake-2.8-backtrace-api.patch | 57 ++++++++++++++++++++++++++++++
 extras/tools/tools.mak                     |  1 +
 2 files changed, 58 insertions(+)
 create mode 100644 extras/tools/cmake-2.8-backtrace-api.patch

diff --git a/extras/tools/cmake-2.8-backtrace-api.patch b/extras/tools/cmake-2.8-backtrace-api.patch
new file mode 100644
index 0000000..eb8b086
--- /dev/null
+++ b/extras/tools/cmake-2.8-backtrace-api.patch
@@ -0,0 +1,57 @@
+--- cmake/Source/kwsys/SystemInformation.cxx	Thu Jan 16 12:15:08 2014
++++ cmake/Source/kwsys/SystemInformation.cxx.new	Wed Oct 29 23:22:27 2014
+@@ -117,16 +117,8 @@
+ #  include <ifaddrs.h>
+ #  define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
+ # endif
+-# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0 >= 1050
+-#  if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
+-#   include <execinfo.h>
+-#   if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
+-#     include <cxxabi.h>
+-#   endif
+-#   if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
+-#     include <dlfcn.h>
+-#   endif
+-#  endif
++# if !(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0 >= 1050)
++#  undef KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE
+ # endif
+ #endif
+ 
+@@ -141,15 +133,6 @@
+ #   define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
+ #  endif
+ # endif
+-# if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
+-#  include <execinfo.h>
+-#  if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
+-#    include <cxxabi.h>
+-#  endif
+-#  if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
+-#    include <dlfcn.h>
+-#  endif
+-# endif
+ # if defined(KWSYS_CXX_HAS_RLIMIT64)
+ typedef struct rlimit64 ResourceLimitType;
+ #  define GetResourceLimit getrlimit64
+@@ -169,6 +152,19 @@
+ # include <OS.h>
+ #endif
+ 
++#if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
++# include <execinfo.h>
++# if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
++#  include <cxxabi.h>
++# endif
++# if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
++#  include <dlfcn.h>
++# endif
++#else
++# undef KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE
++# undef KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP
++#endif
++
+ #include <memory.h>
+ #include <stdlib.h>
+ #include <stdio.h>
diff --git a/extras/tools/tools.mak b/extras/tools/tools.mak
index 33486e6..ef8a5a2 100644
--- a/extras/tools/tools.mak
+++ b/extras/tools/tools.mak
@@ -65,6 +65,7 @@ cmake-$(CMAKE_VERSION).tar.gz:
 
 cmake: cmake-$(CMAKE_VERSION).tar.gz
 	$(UNPACK)
+	$(APPLY) cmake-2.8-backtrace-api.patch
 	$(MOVE)
 
 .cmake: cmake
-- 
1.9.3 (Apple Git-50)




More information about the vlc-devel mailing list