Skip to content

Commit

Permalink
add VxWorks support
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Lagergren <[email protected]>
  • Loading branch information
elagergren-spideroak committed Mar 10, 2023
1 parent ad106d5 commit 55c3c45
Show file tree
Hide file tree
Showing 9 changed files with 147 additions and 64 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
*.lo
*.a
*.la

autom4te.cache/
9 changes: 9 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@
ACLOCAL_AMFLAGS = -I config

AM_CPPFLAGS =
if LIBBACKTRACE_IS_VXWORKS
AM_CPPFLAGS += -mrtp
endif

AM_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) $(PIC_FLAG)
if LIBBACKTRACE_IS_VXWORKS
AM_CFLAGS += -mrtp
endif

include_HEADERS = backtrace.h backtrace-supported.h

Expand Down Expand Up @@ -106,6 +112,9 @@ check_DATA =

# Flags to use when compiling test programs.
libbacktrace_TEST_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) -g
if LIBBACKTRACE_IS_VXWORKS
libbacktrace_TEST_CFLAGS += -mrtp
endif

if USE_DSYMUTIL

Expand Down
109 changes: 57 additions & 52 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -121,52 +121,55 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
@LIBBACKTRACE_IS_VXWORKS_TRUE@am__append_1 = -mrtp
@LIBBACKTRACE_IS_VXWORKS_TRUE@am__append_2 = -mrtp
check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
$(am__EXEEXT_16)
TESTS = $(am__append_4) $(MAKETESTS) $(am__EXEEXT_16)
@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_1 = libbacktrace_elf_for_test.la
@NATIVE_TRUE@am__append_2 = test_elf_32 test_elf_64 test_macho \
TESTS = $(am__append_7) $(MAKETESTS) $(am__EXEEXT_16)
@LIBBACKTRACE_IS_VXWORKS_TRUE@am__append_3 = -mrtp
@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_4 = libbacktrace_elf_for_test.la
@NATIVE_TRUE@am__append_5 = test_elf_32 test_elf_64 test_macho \
@NATIVE_TRUE@ test_xcoff_32 test_xcoff_64 test_pecoff \
@NATIVE_TRUE@ test_unknown unittest unittest_alloc btest
@NATIVE_TRUE@am__append_3 = allocfail
@NATIVE_TRUE@am__append_4 = allocfail.sh
@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@am__append_5 = allocfail.dSYM \
@NATIVE_TRUE@am__append_6 = allocfail
@NATIVE_TRUE@am__append_7 = allocfail.sh
@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@am__append_8 = allocfail.dSYM \
@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@ btest.dSYM btest_alloc.dSYM \
@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@ stest.dSYM stest_alloc.dSYM \
@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@ edtest.dSYM edtest_alloc.dSYM
@HAVE_BUILDID_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_6 = b2test
@HAVE_BUILDID_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_7 = b2test_buildid
@HAVE_BUILDID_TRUE@@HAVE_DWZ_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_8 = b3test
@HAVE_BUILDID_TRUE@@HAVE_DWZ_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_9 = b3test_dwz_buildid
@HAVE_ELF_TRUE@@NATIVE_TRUE@am__append_10 = btest_lto
@NATIVE_TRUE@am__append_11 = btest_alloc stest stest_alloc
@HAVE_DWZ_TRUE@@NATIVE_TRUE@am__append_12 = btest_dwz
@HAVE_DWZ_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_13 = btest_dwz_gnudebuglink
@HAVE_ELF_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_TRUE@am__append_14 = -lz
@HAVE_ELF_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_TRUE@am__append_15 = -lz
@HAVE_ELF_TRUE@@NATIVE_TRUE@am__append_16 = ztest ztest_alloc zstdtest \
@HAVE_BUILDID_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_9 = b2test
@HAVE_BUILDID_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_10 = b2test_buildid
@HAVE_BUILDID_TRUE@@HAVE_DWZ_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_11 = b3test
@HAVE_BUILDID_TRUE@@HAVE_DWZ_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_12 = b3test_dwz_buildid
@HAVE_ELF_TRUE@@NATIVE_TRUE@am__append_13 = btest_lto
@NATIVE_TRUE@am__append_14 = btest_alloc stest stest_alloc
@HAVE_DWZ_TRUE@@NATIVE_TRUE@am__append_15 = btest_dwz
@HAVE_DWZ_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_16 = btest_dwz_gnudebuglink
@HAVE_ELF_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_TRUE@am__append_17 = -lz
@HAVE_ELF_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_TRUE@am__append_18 = -lz
@HAVE_ELF_TRUE@@NATIVE_TRUE@am__append_19 = ztest ztest_alloc zstdtest \
@HAVE_ELF_TRUE@@NATIVE_TRUE@ zstdtest_alloc
@HAVE_ELF_TRUE@@HAVE_ZSTD_TRUE@@NATIVE_TRUE@am__append_17 = -lzstd
@HAVE_ELF_TRUE@@HAVE_ZSTD_TRUE@@NATIVE_TRUE@am__append_18 = -lzstd
@NATIVE_TRUE@am__append_19 = edtest edtest_alloc
@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__append_20 = ttest ttest_alloc
@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@am__append_21 = \
@HAVE_ELF_TRUE@@HAVE_ZSTD_TRUE@@NATIVE_TRUE@am__append_20 = -lzstd
@HAVE_ELF_TRUE@@HAVE_ZSTD_TRUE@@NATIVE_TRUE@am__append_21 = -lzstd
@NATIVE_TRUE@am__append_22 = edtest edtest_alloc
@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__append_23 = ttest ttest_alloc
@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@am__append_24 = \
@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@ ttest.dSYM \
@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@ ttest_alloc.dSYM
@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_22 = btest_gnudebuglink
@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__append_23 = ctestg ctesta
@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_COMPRESSED_DEBUG_ZSTD_TRUE@@NATIVE_TRUE@am__append_24 = ctestzstd
@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__append_25 = ctestg_alloc ctesta_alloc
@HAVE_DWARF5_TRUE@@NATIVE_TRUE@am__append_26 = dwarf5 dwarf5_alloc
@HAVE_DWARF5_TRUE@@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@am__append_27 = \
@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_25 = btest_gnudebuglink
@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__append_26 = ctestg ctesta
@HAVE_COMPRESSED_DEBUG_TRUE@@HAVE_COMPRESSED_DEBUG_ZSTD_TRUE@@NATIVE_TRUE@am__append_27 = ctestzstd
@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__append_28 = ctestg_alloc ctesta_alloc
@HAVE_DWARF5_TRUE@@NATIVE_TRUE@am__append_29 = dwarf5 dwarf5_alloc
@HAVE_DWARF5_TRUE@@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@am__append_30 = \
@HAVE_DWARF5_TRUE@@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@ dwarf5.dSYM \
@HAVE_DWARF5_TRUE@@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@ dwarf5_alloc.dSYM
@NATIVE_TRUE@am__append_28 = mtest
@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@am__append_29 = mtest.dSYM
@HAVE_MINIDEBUG_TRUE@@NATIVE_TRUE@am__append_30 = mtest_minidebug
@HAVE_ELF_TRUE@@HAVE_LIBLZMA_TRUE@am__append_31 = -llzma
@HAVE_ELF_TRUE@@HAVE_LIBLZMA_TRUE@am__append_32 = -llzma
@HAVE_ELF_TRUE@am__append_33 = xztest xztest_alloc
@NATIVE_TRUE@am__append_31 = mtest
@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@am__append_32 = mtest.dSYM
@HAVE_MINIDEBUG_TRUE@@NATIVE_TRUE@am__append_33 = mtest_minidebug
@HAVE_ELF_TRUE@@HAVE_LIBLZMA_TRUE@am__append_34 = -llzma
@HAVE_ELF_TRUE@@HAVE_LIBLZMA_TRUE@am__append_35 = -llzma
@HAVE_ELF_TRUE@am__append_36 = xztest xztest_alloc
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/lead-dot.m4 \
Expand Down Expand Up @@ -961,6 +964,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
Expand All @@ -974,8 +978,8 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I config
AM_CPPFLAGS =
AM_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) $(PIC_FLAG)
AM_CPPFLAGS = $(am__append_1)
AM_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) $(PIC_FLAG) $(am__append_2)
include_HEADERS = backtrace.h backtrace-supported.h
lib_LTLIBRARIES = libbacktrace.la
libbacktrace_la_SOURCES = \
Expand Down Expand Up @@ -1025,24 +1029,25 @@ libbacktrace_la_DEPENDENCIES = $(libbacktrace_la_LIBADD)

# Add a test to this variable if you want it to be built as a Makefile
# target and run.
MAKETESTS = $(am__append_7) $(am__append_9) $(am__append_12) \
$(am__append_13) $(am__append_22) $(am__append_30)
MAKETESTS = $(am__append_10) $(am__append_12) $(am__append_15) \
$(am__append_16) $(am__append_25) $(am__append_33)

# Add a test to this variable if you want it to be built as a program,
# with SOURCES, etc., and run.
BUILDTESTS = $(am__append_2) $(am__append_10) $(am__append_11) \
$(am__append_16) $(am__append_19) $(am__append_20) \
$(am__append_23) $(am__append_24) $(am__append_25) \
$(am__append_26) $(am__append_28) $(am__append_33)
BUILDTESTS = $(am__append_5) $(am__append_13) $(am__append_14) \
$(am__append_19) $(am__append_22) $(am__append_23) \
$(am__append_26) $(am__append_27) $(am__append_28) \
$(am__append_29) $(am__append_31) $(am__append_36)

# Add a file to this variable if you want it to be built for testing.
check_DATA = $(am__append_5) $(am__append_21) $(am__append_27) \
$(am__append_29)
check_DATA = $(am__append_8) $(am__append_24) $(am__append_30) \
$(am__append_32)

# Flags to use when compiling test programs.
libbacktrace_TEST_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) -g
libbacktrace_TEST_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) -g \
$(am__append_3)
@NATIVE_TRUE@check_LTLIBRARIES = libbacktrace_alloc.la \
@NATIVE_TRUE@ libbacktrace_noformat.la $(am__append_1) \
@NATIVE_TRUE@ libbacktrace_noformat.la $(am__append_4) \
@NATIVE_TRUE@ libbacktrace_instrumented_alloc.la
@NATIVE_TRUE@libbacktrace_alloc_la_SOURCES = $(libbacktrace_la_SOURCES)
@NATIVE_TRUE@libbacktrace_alloc_la_LIBADD = $(BACKTRACE_FILE) $(FORMAT_FILE) read.lo alloc.lo
Expand Down Expand Up @@ -1118,21 +1123,21 @@ libbacktrace_TEST_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) -g
@HAVE_ELF_TRUE@@NATIVE_TRUE@ztest_SOURCES = ztest.c testlib.c
@HAVE_ELF_TRUE@@NATIVE_TRUE@ztest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -DSRCDIR=\"$(srcdir)\"
@HAVE_ELF_TRUE@@NATIVE_TRUE@ztest_LDADD = libbacktrace.la \
@HAVE_ELF_TRUE@@NATIVE_TRUE@ $(am__append_14) \
@HAVE_ELF_TRUE@@NATIVE_TRUE@ $(am__append_17) \
@HAVE_ELF_TRUE@@NATIVE_TRUE@ $(CLOCK_GETTIME_LINK)
@HAVE_ELF_TRUE@@NATIVE_TRUE@ztest_alloc_LDADD = libbacktrace_alloc.la \
@HAVE_ELF_TRUE@@NATIVE_TRUE@ $(am__append_15) \
@HAVE_ELF_TRUE@@NATIVE_TRUE@ $(am__append_18) \
@HAVE_ELF_TRUE@@NATIVE_TRUE@ $(CLOCK_GETTIME_LINK)
@HAVE_ELF_TRUE@@NATIVE_TRUE@ztest_alloc_SOURCES = $(ztest_SOURCES)
@HAVE_ELF_TRUE@@NATIVE_TRUE@ztest_alloc_CFLAGS = $(ztest_CFLAGS)
@HAVE_ELF_TRUE@@NATIVE_TRUE@zstdtest_SOURCES = zstdtest.c testlib.c
@HAVE_ELF_TRUE@@NATIVE_TRUE@zstdtest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -DSRCDIR=\"$(srcdir)\"
@HAVE_ELF_TRUE@@NATIVE_TRUE@zstdtest_LDADD = libbacktrace.la \
@HAVE_ELF_TRUE@@NATIVE_TRUE@ $(am__append_17) \
@HAVE_ELF_TRUE@@NATIVE_TRUE@ $(am__append_20) \
@HAVE_ELF_TRUE@@NATIVE_TRUE@ $(CLOCK_GETTIME_LINK)
@HAVE_ELF_TRUE@@NATIVE_TRUE@zstdtest_alloc_LDADD = \
@HAVE_ELF_TRUE@@NATIVE_TRUE@ libbacktrace_alloc.la \
@HAVE_ELF_TRUE@@NATIVE_TRUE@ $(am__append_18) \
@HAVE_ELF_TRUE@@NATIVE_TRUE@ $(am__append_21) \
@HAVE_ELF_TRUE@@NATIVE_TRUE@ $(CLOCK_GETTIME_LINK)
@HAVE_ELF_TRUE@@NATIVE_TRUE@zstdtest_alloc_SOURCES = $(zstdtest_SOURCES)
@HAVE_ELF_TRUE@@NATIVE_TRUE@zstdtest_alloc_CFLAGS = $(zstdtest_CFLAGS)
Expand Down Expand Up @@ -1179,12 +1184,12 @@ libbacktrace_TEST_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) -g
@NATIVE_TRUE@mtest_LDADD = libbacktrace.la
@HAVE_ELF_TRUE@xztest_SOURCES = xztest.c testlib.c
@HAVE_ELF_TRUE@xztest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -DSRCDIR=\"$(srcdir)\"
@HAVE_ELF_TRUE@xztest_LDADD = libbacktrace.la $(am__append_31) \
@HAVE_ELF_TRUE@xztest_LDADD = libbacktrace.la $(am__append_34) \
@HAVE_ELF_TRUE@ $(CLOCK_GETTIME_LINK)
@HAVE_ELF_TRUE@xztest_alloc_SOURCES = $(xztest_SOURCES)
@HAVE_ELF_TRUE@xztest_alloc_CFLAGS = $(xztest_CFLAGS)
@HAVE_ELF_TRUE@xztest_alloc_LDADD = libbacktrace_alloc.la \
@HAVE_ELF_TRUE@ $(am__append_32) $(CLOCK_GETTIME_LINK)
@HAVE_ELF_TRUE@ $(am__append_35) $(CLOCK_GETTIME_LINK)
CLEANFILES = \
$(MAKETESTS) $(BUILDTESTS) *.debug elf_for_test.c edtest2_build.c \
gen_edtest2_build \
Expand Down
4 changes: 4 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
don't. */
#undef HAVE_DECL_STRNLEN

/* Define to 1 if you have the declaration of `sysconf', and to 0 if you
don't. */
#undef HAVE_DECL_SYSCONF

/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H

Expand Down
Loading

0 comments on commit 55c3c45

Please sign in to comment.