diff options
author | Matt Fischer <matt.fischer@garmin.com> | 2013-04-18 18:32:53 -0500 |
---|---|---|
committer | Matt Fischer <matt.fischer@garmin.com> | 2013-04-19 17:08:03 -0500 |
commit | 563b0ff3144c0e60a9aa63fdafb4dea66ecd3d50 (patch) | |
tree | 17978c623d70fb6675bf086a0e1d6cf39a869a8d | |
parent | abb0957198be8cb34c4dfa0dfd7e7eee13055f09 (diff) | |
download | libunwind-563b0ff3144c0e60a9aa63fdafb4dea66ecd3d50.tar.gz |
Added --enable-setjmp
Currently, libunwind-setjmp is built whenever local unwinding is
built. This patch adds an explicit flag to control it instead.
The default if not specified is to follow the old behavior.
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | src/Makefile.am | 8 | ||||
-rw-r--r-- | tests/Makefile.am | 8 |
3 files changed, 21 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index b68c1c22..f7e95ad7 100644 --- a/configure.ac +++ b/configure.ac @@ -118,6 +118,14 @@ AC_ARG_ENABLE(ptrace, AC_MSG_CHECKING([if we should build libunwind-ptrace]) AC_MSG_RESULT([$enable_ptrace]) +AC_ARG_ENABLE(setjmp, + AS_HELP_STRING([--enable-setjmp],[building libunwind-setjmp library]),, + [AS_IF([test x$target_arch == x$host_arch], [enable_setjmp=yes], [enable_setjmp=no])] +) + +AC_MSG_CHECKING([if we should build libunwind-setjmp]) +AC_MSG_RESULT([$enable_setjmp]) + AC_MSG_CHECKING([for build architecture]) AC_MSG_RESULT([$build_arch]) AC_MSG_CHECKING([for host architecture]) @@ -129,6 +137,7 @@ AC_MSG_RESULT([$target_os]) AM_CONDITIONAL(BUILD_COREDUMP, test x$enable_coredump = xyes) AM_CONDITIONAL(BUILD_PTRACE, test x$enable_ptrace = xyes) +AM_CONDITIONAL(BUILD_SETJMP, test x$enable_setjmp = 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 5bc4b3e0..30cb3967 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -25,13 +25,17 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libunwind-generic.pc if !REMOTE_ONLY -pkgconfig_DATA += unwind/libunwind.pc setjmp/libunwind-setjmp.pc +pkgconfig_DATA += unwind/libunwind.pc endif if BUILD_PTRACE pkgconfig_DATA += ptrace/libunwind-ptrace.pc endif +if BUILD_SETJMP +pkgconfig_DATA += setjmp/libunwind-setjmp.pc +endif + if BUILD_COREDUMP pkgconfig_DATA += coredump/libunwind-coredump.pc endif @@ -554,7 +558,7 @@ endif # ARCH_ARM # libunwind-setjmp depends on libunwind-$(arch). Therefore must be added # at the end. -if !REMOTE_ONLY +if BUILD_SETJMP lib_LTLIBRARIES += libunwind-setjmp.la endif diff --git a/tests/Makefile.am b/tests/Makefile.am index fc5529d9..87e74d03 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -45,8 +45,8 @@ endif #!ARCH_IA64 Gtest-dyn1 Ltest-dyn1 \ Gtest-trace Ltest-trace \ test-async-sig test-flush-cache test-init-remote \ - test-mem test-setjmp Ltest-varargs \ - Ltest-nomalloc Ltest-nocalloc Lrs-race + test-mem Ltest-varargs Ltest-nomalloc \ + Ltest-nocalloc Lrs-race noinst_PROGRAMS_cdep = forker crasher Gperf-simple Lperf-simple \ Gperf-trace Lperf-trace @@ -56,6 +56,10 @@ if BUILD_PTRACE noinst_PROGRAMS_cdep += mapper test-ptrace-misc endif +if BUILD_SETJMP + check_PROGRAMS_cdep += test-setjmp +endif + if SUPPORT_CXX_EXCEPTIONS check_PROGRAMS_cdep += Ltest-cxx-exceptions endif |