aboutsummaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2020-03-16 12:56:56 -0700
committerMike Frysinger <vapier@chromium.org>2020-03-16 21:27:07 +0000
commite780d58fd7b6eda76065327a9921d6157e4a7964 (patch)
tree662e3c87fa98ed89d678e66405a63c7e1b3bb1c5 /Makefile.am
parentconvert_UTF: try to update xcode files (diff)
downloadbreakpad-e780d58fd7b6eda76065327a9921d6157e4a7964.tar.xz
Use breakpad_getcontext on all Linux platforms missing getcontext
getcontext is also not available on musl libc, so generalize breakpad_getcontext so it can be used as a fallback for non-Android platforms as well. On x86_64 and i386, ucontext_t uses an Android-specific offset for storage of FP registers, since its sigset_t differs in size. So, make the definition of MCONTEXT_FPREGS_MEM and UCONTEXT_FPREGS_MEM_OFFSET conditional on whether we are building for Android. On glibc and musl, signal.h and asm/sigcontext.h can't be included together, so in breakpad_context_unittest.cc, only compare the libc and kernel _fpstate when on Android. Bug: google-breakpad:631 Change-Id: If81d73c4101bae946e9a3655b8d1c40a34ab6c38 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2102135 Reviewed-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am14
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index cc9f2e90..9a25d9d4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -186,9 +186,9 @@ src_client_linux_libbreakpad_client_a_SOURCES = \
src/common/linux/linux_libc_support.cc \
src/common/linux/memory_mapped_file.cc \
src/common/linux/safe_readlink.cc
-if ANDROID_HOST
+if !HAVE_GETCONTEXT
src_client_linux_libbreakpad_client_a_SOURCES += \
- src/common/android/breakpad_getcontext.S
+ src/common/linux/breakpad_getcontext.S
endif
endif LINUX_HOST
@@ -498,9 +498,9 @@ src_client_linux_linux_client_unittest_shlib_SOURCES = \
src/processor/minidump.cc \
src/processor/pathname_stripper.cc \
src/processor/proc_maps_linux.cc
-if ANDROID_HOST
+if !HAVE_GETCONTEXT
src_client_linux_linux_client_unittest_shlib_SOURCES += \
- src/common/android/breakpad_getcontext.S
+ src/common/linux/breakpad_getcontext.S
endif
src_client_linux_linux_client_unittest_shlib_CPPFLAGS = \
@@ -531,9 +531,11 @@ src_client_linux_linux_client_unittest_shlib_LDADD = \
src/common/string_conversion.o \
$(TEST_LIBS) \
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
-if ANDROID_HOST
+if !HAVE_GETCONTEXT
src_client_linux_linux_client_unittest_shlib_SOURCES += \
- src/common/android/breakpad_getcontext_unittest.cc
+ src/common/linux/breakpad_getcontext_unittest.cc
+endif
+if ANDROID_HOST
src_client_linux_linux_client_unittest_shlib_LDFLAGS += \
-llog -lm
endif