Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Initial attempt at the build infrastructure for FreeBSD.

  • Loading branch information...
commit 905034ce728e84b2a1652ac4b44a2d8a5147a0d1 1 parent 46ea106
Konstantin Belousov authored
View
6 configure.in
@@ -27,8 +27,8 @@ CHECK_ATOMIC_OPS
dnl Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS(asm/ptrace_offsets.h endian.h execinfo.h ia64intrin.h \
- sys/uc_access.h unistd.h signal.h)
+AC_CHECK_HEADERS(asm/ptrace_offsets.h endian.h sys/endian.h execinfo.h \
+ ia64intrin.h sys/uc_access.h unistd.h signal.h sys/types.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -80,6 +80,7 @@ get_arch() {
hppa*) echo hppa;;
mips*) echo mips;;
powerpc*) is_gcc_m64;;
+ amd64) echo x86_64;;
*) echo $1;;
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(OS_LINUX, expr x$target_os : xlinux >/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
libdir='${exec_prefix}/lib64'
View
4 include/libunwind_i.h
@@ -54,8 +54,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include <string.h>
#include <unistd.h>
-#ifdef HAVE_ENDIAN_H
+#if defined(HAVE_ENDIAN_H)
# include <endian.h>
+#elif defined(HAVE_SYS_ENDIAN_H)
+# include <sys/endian.h>
#else
# define __LITTLE_ENDIAN 1234
# define __BIG_ENDIAN 4321
View
2  include/tdep/dwarf-config.h
@@ -15,7 +15,7 @@
# include "tdep-ppc64/dwarf-config.h"
#elif defined __i386__
# include "tdep-x86/dwarf-config.h"
-#elif defined __x86_64__
+#elif defined __x86_64__ || defined __amd64__
# include "tdep-x86_64/dwarf-config.h"
#else
# error "Unsupported arch"
View
5 src/Makefile.am
@@ -351,6 +351,11 @@ if OS_HPUX
libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_hpux_local)
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
lib_LTLIBRARIES_arch = libunwind-arm.la
libunwind_la_SOURCES = $(libunwind_la_SOURCES_arm)
View
8 src/ptrace/_UPT_internal.h
@@ -26,6 +26,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#ifndef _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 <libunwind-ptrace.h>
#include <limits.h>
Please sign in to comment.
Something went wrong with that request. Please try again.