mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-25 08:37:38 +01:00
Added --enable-ptrace
This change adds a manual override to control building of the ptrace library, similar to the existing --enable-coredump option. The default is set based on the existence of sys/ptrace.h, allowing it to be automatically disabled for platforms that do not have ptrace.
This commit is contained in:
parent
becfc23123
commit
abb0957198
3 changed files with 27 additions and 8 deletions
|
@ -110,6 +110,14 @@ AC_ARG_ENABLE(coredump,
|
|||
AC_MSG_CHECKING([if we should build libunwind-coredump])
|
||||
AC_MSG_RESULT([$enable_coredump])
|
||||
|
||||
AC_ARG_ENABLE(ptrace,
|
||||
AS_HELP_STRING([--enable-ptrace],[building libunwind-ptrace library]),,
|
||||
[AC_CHECK_HEADER([sys/ptrace.h], [enable_ptrace=yes], [enable_ptrace=no])]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING([if we should build libunwind-ptrace])
|
||||
AC_MSG_RESULT([$enable_ptrace])
|
||||
|
||||
AC_MSG_CHECKING([for build architecture])
|
||||
AC_MSG_RESULT([$build_arch])
|
||||
AC_MSG_CHECKING([for host architecture])
|
||||
|
@ -120,6 +128,7 @@ AC_MSG_CHECKING([for target operating system])
|
|||
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(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)
|
||||
|
|
|
@ -9,7 +9,10 @@ COMMON_SO_LDFLAGS = -XCClinker -nostartfiles
|
|||
lib_LIBRARIES =
|
||||
lib_LTLIBRARIES =
|
||||
if !REMOTE_ONLY
|
||||
lib_LTLIBRARIES += libunwind.la libunwind-ptrace.la
|
||||
lib_LTLIBRARIES += libunwind.la
|
||||
if BUILD_PTRACE
|
||||
lib_LTLIBRARIES += libunwind-ptrace.la
|
||||
endif
|
||||
if BUILD_COREDUMP
|
||||
lib_LTLIBRARIES += libunwind-coredump.la
|
||||
endif
|
||||
|
@ -22,8 +25,11 @@ pkgconfigdir = $(libdir)/pkgconfig
|
|||
pkgconfig_DATA = libunwind-generic.pc
|
||||
|
||||
if !REMOTE_ONLY
|
||||
pkgconfig_DATA += unwind/libunwind.pc ptrace/libunwind-ptrace.pc \
|
||||
setjmp/libunwind-setjmp.pc
|
||||
pkgconfig_DATA += unwind/libunwind.pc setjmp/libunwind-setjmp.pc
|
||||
endif
|
||||
|
||||
if BUILD_PTRACE
|
||||
pkgconfig_DATA += ptrace/libunwind-ptrace.pc
|
||||
endif
|
||||
|
||||
if BUILD_COREDUMP
|
||||
|
|
|
@ -36,7 +36,7 @@ if USE_ALTIVEC
|
|||
endif #USE_ALTIVEC
|
||||
endif #ARCH_PPC64
|
||||
endif #!ARCH_IA64
|
||||
check_SCRIPTS_cdep = run-ptrace-mapper run-ptrace-misc
|
||||
check_SCRIPTS_cdep =
|
||||
check_PROGRAMS_cdep = Gtest-bt Ltest-bt Gtest-exc Ltest-exc \
|
||||
Gtest-init Ltest-init \
|
||||
Gtest-concurrent Ltest-concurrent \
|
||||
|
@ -45,12 +45,16 @@ endif #!ARCH_IA64
|
|||
Gtest-dyn1 Ltest-dyn1 \
|
||||
Gtest-trace Ltest-trace \
|
||||
test-async-sig test-flush-cache test-init-remote \
|
||||
test-mem test-setjmp test-ptrace Ltest-varargs \
|
||||
test-mem test-setjmp Ltest-varargs \
|
||||
Ltest-nomalloc Ltest-nocalloc Lrs-race
|
||||
noinst_PROGRAMS_cdep = forker crasher mapper test-ptrace-misc \
|
||||
Gperf-simple Lperf-simple
|
||||
noinst_PROGRAMS_cdep = forker crasher Gperf-simple Lperf-simple \
|
||||
Gperf-trace Lperf-trace
|
||||
|
||||
noinst_PROGRAMS_cdep += Gperf-trace Lperf-trace
|
||||
if BUILD_PTRACE
|
||||
check_SCRIPTS_cdep += run-ptrace-mapper run-ptrace-misc
|
||||
check_PROGRAMS_cdep += test-ptrace
|
||||
noinst_PROGRAMS_cdep += mapper test-ptrace-misc
|
||||
endif
|
||||
|
||||
if SUPPORT_CXX_EXCEPTIONS
|
||||
check_PROGRAMS_cdep += Ltest-cxx-exceptions
|
||||
|
|
Loading…
Reference in a new issue