1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2025-01-06 01:23:41 +01:00

libunwind configuration is implemented

This commit is contained in:
Alexander Esilevich 2010-07-28 02:35:11 +07:00
parent aa4b723f2b
commit cac775a482
3 changed files with 65 additions and 30 deletions

View file

@ -1,5 +1,7 @@
include(config.cmake)
set(libunwind_sources_common
os-linux.c
mi/init.c
@ -116,12 +118,6 @@ include_directories(.
)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/include/config.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libunwind-common.h.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/include/libunwind-common.h)
# TODO: add checks for all platforms
if("${CMAKE_C_FLAGS}" MATCHES "-m32")
set(target "x8664_32")

40
src/config.cmake Normal file
View file

@ -0,0 +1,40 @@
# libunwind configuration
include(CheckIncludeFile)
include(CheckFunctionExists)
include(CheckSymbolExists)
include(CheckStructHasMember)
include(CheckTypeSize)
check_include_file(asm/ptrace_offsets.h HAVE_ASM_PTRACE_OFFSETS_H)
check_include_file(atomic_ops.h HAVE_ATOMIC_OPS_H)
check_include_file(dlfcn.h HAVE_DLFCN_H)
check_symbol_exists(dlmodinfo "dlfcn.h" HAVE_DLMODINFO)
check_function_exists(dl_iterate_phdr HAVE_DL_ITERATE_PHDR)
check_function_exists(dl_phdr_removals_counter HAVE_DL_PHDR_REMOVALS_COUNTER)
check_include_file(endian.h HAVE_ENDIAN_H)
check_include_file(execinfo.h HAVE_EXECINFO_H)
check_function_exists(getunwind HAVE_GETUNWIND)
check_include_file(ia64intrin.h HAVE_IA64INTRIN_H)
check_include_file(inttypes.h HAVE_INTTYPES_H)
check_include_file(memory.h HAVE_MEMORY_H)
check_include_file(stdint.h HAVE_STDINT_H)
check_include_file(stdlib.h HAVE_STDLIB_H)
check_include_file(strings.h HAVE_STRINGS_H)
check_include_file(string.h HAVE_STRING_H)
check_struct_has_member("struct dl_phdr_info" dlpi_subs link.h HAVE_STRUCT_DL_PHDR_INFO_DLPI_SUBS)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
check_include_file(sys/uc_access.h HAVE_SYS_UC_ACCESS_H)
check_function_exists(ttrace HAVE_TTRACE)
check_include_file(unistd.h HAVE_UNISTD_H)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/include/config.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libunwind-common.h.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/include/libunwind-common.h)

View file

@ -1,47 +1,46 @@
/* include/config.h. Generated from config.h.in by configure. */
/* include/config.h.in. Generated from configure.in by autoheader. */
/* include/config.h. Generated from config.h.cmake.in by cmake. */
/* Enable Debug Frame */
/* #undef CONFIG_DEBUG_FRAME */
/* Define to 1 if you have the <asm/ptrace_offsets.h> header file. */
/* #undef HAVE_ASM_PTRACE_OFFSETS_H */
#cmakedefine HAVE_ASM_PTRACE_OFFSETS_H
/* Define to 1 if you have the <atomic_ops.h> header file. */
/* #undef HAVE_ATOMIC_OPS_H */
#cmakedefine HAVE_ATOMIC_OPS_H
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
#cmakedefine HAVE_DLFCN_H
/* Define to 1 if you have the `dlmodinfo' function. */
/* #undef HAVE_DLMODINFO */
#cmakedefine HAVE_DLMODINFO
/* Define to 1 if you have the `dl_iterate_phdr' function. */
#define HAVE_DL_ITERATE_PHDR 1
#cmakedefine HAVE_DL_ITERATE_PHDR
/* Define to 1 if you have the `dl_phdr_removals_counter' function. */
/* #undef HAVE_DL_PHDR_REMOVALS_COUNTER */
#cmakedefine HAVE_DL_PHDR_REMOVALS_COUNTER
/* Define to 1 if you have the <endian.h> header file. */
#define HAVE_ENDIAN_H 1
#cmakedefine HAVE_ENDIAN_H
/* Define to 1 if you have the <execinfo.h> header file. */
#define HAVE_EXECINFO_H 1
#cmakedefine HAVE_EXECINFO_H
/* Define to 1 if you have the `getunwind' function. */
/* #undef HAVE_GETUNWIND */
#cmakedefine HAVE_GETUNWIND
/* Define to 1 if you have the <ia64intrin.h> header file. */
/* #undef HAVE_IA64INTRIN_H */
#cmakedefine HAVE_IA64INTRIN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
#cmakedefine HAVE_INTTYPES_H
/* Define to 1 if you have the `uca' library (-luca). */
/* #undef HAVE_LIBUCA */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
#cmakedefine HAVE_MEMORY_H
/* Define to 1 if the system has the type `sighandler_t'. */
#define HAVE_SIGHANDLER_T 1
@ -50,34 +49,34 @@
#define HAVE_SIGNAL_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
#cmakedefine HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
#cmakedefine HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
#cmakedefine HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
#cmakedefine HAVE_STRING_H
/* Define to 1 if `dlpi_subs' is member of `struct dl_phdr_info'. */
#define HAVE_STRUCT_DL_PHDR_INFO_DLPI_SUBS 1
#cmakedefine HAVE_STRUCT_DL_PHDR_INFO_DLPI_SUBS
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
#cmakedefine HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
#cmakedefine HAVE_SYS_TYPES_H
/* Define to 1 if you have the <sys/uc_access.h> header file. */
/* #undef HAVE_SYS_UC_ACCESS_H */
#cmakedefine HAVE_SYS_UC_ACCESS_H
/* Define to 1 if you have the `ttrace' function. */
/* #undef HAVE_TTRACE */
#cmakedefine HAVE_TTRACE
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
#cmakedefine HAVE_UNISTD_H
/* Define to 1 if __thread keyword is supported by the C compiler. */
#define HAVE___THREAD 1