[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH 05/17] build: make libunwind-coredump build opt
From: |
Cody P Schafer |
Subject: |
[Libunwind-devel] [PATCH 05/17] build: make libunwind-coredump build optional |
Date: |
Fri, 14 Sep 2012 17:11:50 -0700 |
Disable the building of libunwind-coredump except on x86_64 and x86
(where implimentations exsist).
Allow overriding of this autodetection via --enable-coredump and
--disable-coredump.
---
configure.in | 10 ++++++++++
src/Makefile.am | 5 ++++-
tests/Makefile.am | 8 ++++++--
3 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/configure.in b/configure.in
index c2bf259..e601ecc 100644
--- a/configure.in
+++ b/configure.in
@@ -102,6 +102,15 @@ build_arch=`get_arch $build_cpu`
host_arch=`get_arch $host_cpu`
target_arch=`get_arch $target_cpu`
+AC_ARG_ENABLE(coredump,
+ AS_HELP_STRING([--enable-coredump],[building libunwind-coredump
library]),
+ [enable_coredump=$enableval],
+ [AS_CASE([$host_arch], [x86*], [enable_coredump=yes],
[enable_coredump=no])]
+)
+
+AC_MSG_CHECKING([if we should build libunwind-coredump])
+AC_MSG_RESULT([$enable_coredump])
+
AC_MSG_CHECKING([for build architecture])
AC_MSG_RESULT([$build_arch])
AC_MSG_CHECKING([for host architecture])
@@ -111,6 +120,7 @@ AC_MSG_RESULT([$target_arch])
AC_MSG_CHECKING([for target operating system])
AC_MSG_RESULT([$target_os])
+AM_CONDITIONAL(BUILD_COREDUMP, test x$enable_coredump = xyes)
AM_CONDITIONAL(REMOTE_ONLY, test x$target_arch != x$host_arch)
AM_CONDITIONAL(ARCH_ARM, test x$target_arch = xarm)
AM_CONDITIONAL(ARCH_IA64, test x$target_arch = xia64)
diff --git a/src/Makefile.am b/src/Makefile.am
index f5414d0..6860977 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -9,7 +9,10 @@ COMMON_SO_LDFLAGS = -XCClinker -nostartfiles
lib_LIBRARIES =
lib_LTLIBRARIES =
if !REMOTE_ONLY
-lib_LTLIBRARIES += libunwind.la libunwind-coredump.la libunwind-ptrace.la
+lib_LTLIBRARIES += libunwind.la libunwind-ptrace.la
+if BUILD_COREDUMP
+lib_LTLIBRARIES += libunwind-coredump.la
+endif
endif
noinst_HEADERS =
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c96d8a5..9902d55 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -60,13 +60,15 @@ if SUPPORT_CXX_EXCEPTIONS
endif
if OS_LINUX
+if BUILD_COREDUMP
check_SCRIPTS_cdep += run-coredump-unwind
noinst_PROGRAMS_cdep += test-coredump-unwind
if HAVE_LZMA
check_SCRIPTS_cdep += run-coredump-unwind-mdi
-endif
-endif
+endif # HAVE_LZMA
+endif # BUILD_COREDUMP
+endif # OS_LINUX
perf: perf-startup Gperf-simple Lperf-simple Lperf-trace
@echo "########## Basic performance of generic libunwind:"
@@ -177,7 +179,9 @@ Lperf_trace_LDADD = $(LIBUNWIND_local)
test_setjmp_LDADD = $(LIBUNWIND_setjmp)
ia64_test_setjmp_LDADD = $(LIBUNWIND_setjmp)
+if BUILD_COREDUMP
test_coredump_unwind_LDADD = $(LIBUNWIND_coredump) $(LIBUNWIND)
+endif
Gia64_test_nat_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
Gia64_test_stack_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
--
1.7.11.3
- [Libunwind-devel] [PATCH v3 00/17] Fixup the PowerPC (64 & 32 bit) builds & clean up configure, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 01/17] ppc32: ppc64: use AC_COMPILE_IFELSE to test __powerpc64__ macro for ppc64, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 02/17] ppc32: remove unused dmy_vrregset, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 05/17] build: make libunwind-coredump build optional,
Cody P Schafer <=
- [Libunwind-devel] [PATCH 04/17] ppc32: ppc64: test altivec support by running the compiler., Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 06/17] configure: use AS_HELP_STRING for configure args instead of manual formating, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 07/17] ppc64: remove tests/ppc64-test-wchar, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 08/17] configure: avoid using a shell function in autoconf, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 16/17] ptrace: check for NULL arg., Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 14/17] configure: rename configure.in to configure.ac, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 11/17] UPT: Add reg offsets for ppc32/64, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 12/17] ppc64: be explicit in access_reg range check, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 17/17] ptrace: add more Debug to access_reg, Cody P Schafer, 2012/09/14