diff options
author | Michael Forney <mforney@mforney.org> | 2020-03-16 12:56:56 -0700 |
---|---|---|
committer | Mike Frysinger <vapier@chromium.org> | 2020-03-16 21:27:07 +0000 |
commit | e780d58fd7b6eda76065327a9921d6157e4a7964 (patch) | |
tree | 662e3c87fa98ed89d678e66405a63c7e1b3bb1c5 /configure | |
parent | convert_UTF: try to update xcode files (diff) | |
download | breakpad-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 'configure')
-rwxr-xr-x | configure | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -650,6 +650,8 @@ LINUX_HOST_FALSE LINUX_HOST_TRUE WARN_CXXFLAGS HAVE_CXX11 +HAVE_GETCONTEXT_FALSE +HAVE_GETCONTEXT_TRUE PTHREAD_CFLAGS PTHREAD_LIBS PTHREAD_CC @@ -6650,7 +6652,7 @@ fi done -for ac_func in arc4random getrandom +for ac_func in arc4random getcontext getrandom do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -6662,6 +6664,14 @@ _ACEOF fi done + if test "x$ac_cv_func_getcontext" = xyes; then + HAVE_GETCONTEXT_TRUE= + HAVE_GETCONTEXT_FALSE='#' +else + HAVE_GETCONTEXT_TRUE='#' + HAVE_GETCONTEXT_FALSE= +fi + ax_cxx_compile_cxx11_required=true @@ -7860,6 +7870,10 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_GETCONTEXT_TRUE}" && test -z "${HAVE_GETCONTEXT_FALSE}"; then + as_fn_error $? "conditional \"HAVE_GETCONTEXT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${LINUX_HOST_TRUE}" && test -z "${LINUX_HOST_FALSE}"; then as_fn_error $? "conditional \"LINUX_HOST\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 |