aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-02-05 16:58:24 +0000
committerJo-Philipp Wich <jow@openwrt.org>2015-02-05 16:58:24 +0000
commit7954f31e2f2add726bad2563fd31022397c2b9ee (patch)
tree59c457c7189053928334db5f9e4cefdbcac9ab07 /tools
parent3e095d851acac78ce33a8a4b642b2224082bc959 (diff)
downloadupstream-7954f31e2f2add726bad2563fd31022397c2b9ee.tar.gz
upstream-7954f31e2f2add726bad2563fd31022397c2b9ee.tar.bz2
upstream-7954f31e2f2add726bad2563fd31022397c2b9ee.zip
tools: Fix cmake build on FreeBSD 10.1
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44281 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools')
-rw-r--r--tools/cmake/patches/110-freebsd-compat.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/tools/cmake/patches/110-freebsd-compat.patch b/tools/cmake/patches/110-freebsd-compat.patch
new file mode 100644
index 0000000000..d4133b9049
--- /dev/null
+++ b/tools/cmake/patches/110-freebsd-compat.patch
@@ -0,0 +1,44 @@
+From 6eab64c3adc7a38c322cd4d9a1a1881f2d49cb9c Mon Sep 17 00:00:00 2001
+From: Raphael Kubo da Costa <rakuco@FreeBSD.org>
+Date: Tue, 15 Oct 2013 00:10:56 +0300
+Subject: [PATCH] SystemInformation: Include backtrace-related headers on
+ FreeBSD
+
+This was probably broken for a long while, but the problem was not apparent
+because the check for execinfo.h would fail by default because
+-I/usr/local/include was not being passed to the compiler when making the
+checks for the header's existence.
+
+Now that very recent FreeBSD versions (ie. 10-CURRENT) have NetBSD's
+libexecinfo in base (and it is thus installed into /usr), the
+backtrace-related checks would pass, but the required headers were not being
+included in SystemInformation.cxx.
+
+Change-Id: I3b91ed7ac0e6878035aee202b3336c536cc6d2ff
+---
+ Source/kwsys/SystemInformation.cxx | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
+index 7c31f3a..2672730 100644
+--- a/Source/kwsys/SystemInformation.cxx
++++ b/Source/kwsys/SystemInformation.cxx
+@@ -88,6 +88,15 @@ typedef int siginfo_t;
+ # include <ifaddrs.h>
+ # define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
+ # 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
+ #endif
+
+ #if defined(__OpenBSD__) || defined(__NetBSD__)
+--
+1.7.10.4
+