1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-25 16:47:38 +01:00

Initial attempt at the build infrastructure for FreeBSD.

This commit is contained in:
Konstantin Belousov 2010-03-06 00:41:37 +02:00
parent 46ea10680d
commit 905034ce72
5 changed files with 21 additions and 4 deletions

View file

@ -27,8 +27,8 @@ CHECK_ATOMIC_OPS
dnl Checks for header files. dnl Checks for header files.
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS(asm/ptrace_offsets.h endian.h execinfo.h ia64intrin.h \ AC_CHECK_HEADERS(asm/ptrace_offsets.h endian.h sys/endian.h execinfo.h \
sys/uc_access.h unistd.h signal.h) ia64intrin.h sys/uc_access.h unistd.h signal.h sys/types.h)
dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST AC_C_CONST
@ -80,6 +80,7 @@ get_arch() {
hppa*) echo hppa;; hppa*) echo hppa;;
mips*) echo mips;; mips*) echo mips;;
powerpc*) is_gcc_m64;; powerpc*) is_gcc_m64;;
amd64) echo x86_64;;
*) echo $1;; *) echo $1;;
esac esac
} }
@ -99,6 +100,7 @@ AM_CONDITIONAL(ARCH_PPC32, test x$target_arch = xppc32)
AM_CONDITIONAL(ARCH_PPC64, test x$target_arch = xppc64) AM_CONDITIONAL(ARCH_PPC64, test x$target_arch = xppc64)
AM_CONDITIONAL(OS_LINUX, expr x$target_os : xlinux >/dev/null) AM_CONDITIONAL(OS_LINUX, expr x$target_os : xlinux >/dev/null)
AM_CONDITIONAL(OS_HPUX, expr x$target_os : xhpux >/dev/null) AM_CONDITIONAL(OS_HPUX, expr x$target_os : xhpux >/dev/null)
AM_CONDITIONAL(OS_FREEBSD, expr x$target_os : xfreebsd >/dev/null)
if test x$target_arch = xppc64; then if test x$target_arch = xppc64; then
libdir='${exec_prefix}/lib64' libdir='${exec_prefix}/lib64'

View file

@ -54,8 +54,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#ifdef HAVE_ENDIAN_H #if defined(HAVE_ENDIAN_H)
# include <endian.h> # include <endian.h>
#elif defined(HAVE_SYS_ENDIAN_H)
# include <sys/endian.h>
#else #else
# define __LITTLE_ENDIAN 1234 # define __LITTLE_ENDIAN 1234
# define __BIG_ENDIAN 4321 # define __BIG_ENDIAN 4321

View file

@ -15,7 +15,7 @@
# include "tdep-ppc64/dwarf-config.h" # include "tdep-ppc64/dwarf-config.h"
#elif defined __i386__ #elif defined __i386__
# include "tdep-x86/dwarf-config.h" # include "tdep-x86/dwarf-config.h"
#elif defined __x86_64__ #elif defined __x86_64__ || defined __amd64__
# include "tdep-x86_64/dwarf-config.h" # include "tdep-x86_64/dwarf-config.h"
#else #else
# error "Unsupported arch" # error "Unsupported arch"

View file

@ -351,6 +351,11 @@ if OS_HPUX
libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_hpux_local) libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_hpux_local)
endif endif
if OS_FREEBSD
libunwind_la_SOURCES_os = $(libunwind_la_SOURCES_os_freebsd)
libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_freebsd_local)
endif
if ARCH_ARM if ARCH_ARM
lib_LTLIBRARIES_arch = libunwind-arm.la lib_LTLIBRARIES_arch = libunwind-arm.la
libunwind_la_SOURCES = $(libunwind_la_SOURCES_arm) libunwind_la_SOURCES = $(libunwind_la_SOURCES_arm)

View file

@ -26,6 +26,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#ifndef _UPT_internal_h #ifndef _UPT_internal_h
#define _UPT_internal_h #define _UPT_internal_h
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <errno.h> #include <errno.h>
#include <libunwind-ptrace.h> #include <libunwind-ptrace.h>
#include <limits.h> #include <limits.h>