[Mesa-dev] [PATCH 1/1] Fixes uclibc build as uclibc does not include backtrace functionality
Bernd Kuhls
bernd.kuhls at t-online.de
Sun Oct 19 10:42:23 PDT 2014
Signed-off-by: Bernd Kuhls <bernd.kuhls at t-online.de>
---
configure.ac | 3 +++
src/mapi/glapi/gen/gl_gentable.py | 2 +-
src/mesa/drivers/dri/i915/intel_regions.c | 2 ++
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 0ed9325..1594cfe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -554,6 +554,9 @@ esac
dnl See if posix_memalign is available
AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
+dnl Check for backtrace support
+AC_CHECK_HEADER([execinfo.h], [DEFINES="$DEFINES -DHAVE_EXECINFO_H"])
+
dnl Check for pthreads
case "$host_os" in
mingw*)
diff --git a/src/mapi/glapi/gen/gl_gentable.py b/src/mapi/glapi/gen/gl_gentable.py
index deffcee..f7a07bc 100644
--- a/src/mapi/glapi/gen/gl_gentable.py
+++ b/src/mapi/glapi/gen/gl_gentable.py
@@ -42,7 +42,7 @@ header = """/* GLXEXT is the define used in the xserver when the GLX extension i
#endif
#if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\
- || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__))
+ || (!defined(GLXEXT) && defined(DEBUG) && defined(HAVE_EXECINFO_H) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__))
#define USE_BACKTRACE
#endif
diff --git a/src/mesa/drivers/dri/i915/intel_regions.c b/src/mesa/drivers/dri/i915/intel_regions.c
index ff27d7f..92b91cb 100644
--- a/src/mesa/drivers/dri/i915/intel_regions.c
+++ b/src/mesa/drivers/dri/i915/intel_regions.c
@@ -65,7 +65,9 @@
#define _DBG(...) {debug_backtrace(); DBG(__VA_ARGS__);}
/* Backtracing debug support */
+#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
+#endif
static void
debug_backtrace(void)
--
1.7.10.4
More information about the mesa-dev
mailing list