1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-16 13:18:12 +01:00

build: make libunwind-coredump build optional

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.
This commit is contained in:
Cody P Schafer 2012-09-14 17:11:50 -07:00 committed by Arun Sharma
parent 92af07ee19
commit 3a5d7ff694
3 changed files with 20 additions and 3 deletions

View file

@ -102,6 +102,15 @@ build_arch=`get_arch $build_cpu`
host_arch=`get_arch $host_cpu` host_arch=`get_arch $host_cpu`
target_arch=`get_arch $target_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_CHECKING([for build architecture])
AC_MSG_RESULT([$build_arch]) AC_MSG_RESULT([$build_arch])
AC_MSG_CHECKING([for host architecture]) AC_MSG_CHECKING([for host architecture])
@ -111,6 +120,7 @@ AC_MSG_RESULT([$target_arch])
AC_MSG_CHECKING([for target operating system]) AC_MSG_CHECKING([for target operating system])
AC_MSG_RESULT([$target_os]) 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(REMOTE_ONLY, test x$target_arch != x$host_arch)
AM_CONDITIONAL(ARCH_ARM, test x$target_arch = xarm) AM_CONDITIONAL(ARCH_ARM, test x$target_arch = xarm)
AM_CONDITIONAL(ARCH_IA64, test x$target_arch = xia64) AM_CONDITIONAL(ARCH_IA64, test x$target_arch = xia64)

View file

@ -9,7 +9,10 @@ COMMON_SO_LDFLAGS = -XCClinker -nostartfiles
lib_LIBRARIES = lib_LIBRARIES =
lib_LTLIBRARIES = lib_LTLIBRARIES =
if !REMOTE_ONLY 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 endif
noinst_HEADERS = noinst_HEADERS =

View file

@ -60,13 +60,15 @@ if SUPPORT_CXX_EXCEPTIONS
endif endif
if OS_LINUX if OS_LINUX
if BUILD_COREDUMP
check_SCRIPTS_cdep += run-coredump-unwind check_SCRIPTS_cdep += run-coredump-unwind
noinst_PROGRAMS_cdep += test-coredump-unwind noinst_PROGRAMS_cdep += test-coredump-unwind
if HAVE_LZMA if HAVE_LZMA
check_SCRIPTS_cdep += run-coredump-unwind-mdi check_SCRIPTS_cdep += run-coredump-unwind-mdi
endif endif # HAVE_LZMA
endif endif # BUILD_COREDUMP
endif # OS_LINUX
perf: perf-startup Gperf-simple Lperf-simple Lperf-trace perf: perf-startup Gperf-simple Lperf-simple Lperf-trace
@echo "########## Basic performance of generic libunwind:" @echo "########## Basic performance of generic libunwind:"
@ -177,7 +179,9 @@ Lperf_trace_LDADD = $(LIBUNWIND_local)
test_setjmp_LDADD = $(LIBUNWIND_setjmp) test_setjmp_LDADD = $(LIBUNWIND_setjmp)
ia64_test_setjmp_LDADD = $(LIBUNWIND_setjmp) ia64_test_setjmp_LDADD = $(LIBUNWIND_setjmp)
if BUILD_COREDUMP
test_coredump_unwind_LDADD = $(LIBUNWIND_coredump) $(LIBUNWIND) test_coredump_unwind_LDADD = $(LIBUNWIND_coredump) $(LIBUNWIND)
endif
Gia64_test_nat_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) Gia64_test_nat_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
Gia64_test_stack_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) Gia64_test_stack_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)