Add sigaction and ucontext support to Mac crashlog
This commit is contained in:
25
config.lib
25
config.lib
@@ -1908,6 +1908,31 @@ EOL
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.ucontext -x c++ - -ldl"
|
||||
"$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.ucontext -x c++ - -ldl 2> /dev/null << EOL
|
||||
#include <sys/ucontext.h>
|
||||
int main() {
|
||||
ucontext_t context;
|
||||
#if defined(__x86_64__)
|
||||
void *ptr = (void *) context.uc_mcontext->__ss.__rip;
|
||||
#elif defined(__i386)
|
||||
void *ptr = (void *) context.uc_mcontext->__ss.__rip;
|
||||
#else
|
||||
#error Unknown arch
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOL
|
||||
ret=$?
|
||||
rm -f tmp.config.ucontext
|
||||
log 2 " exit code $ret"
|
||||
if [ $ret -ne 0 ]; then
|
||||
log 1 "checking ucontext... no"
|
||||
else
|
||||
log 1 "checking ucontext... found"
|
||||
CFLAGS="$CFLAGS -DWITH_UCONTEXT"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$os" = "HAIKU" ]; then
|
||||
|
||||
Reference in New Issue
Block a user