зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1428182 - 6b. Support unified headers in Breakpad code; r=ted
Fix several problems when building Breakpad with new NDK unified headers. - Unified headers define its own tgkill wrapper, so rename our own wrapper to __tgkill. - Unified headers define user_fpxregs_struct for all API levels, so don't redefine it. - Only the target sources under google-breakpad/src/common/linux should use custom Android headers, so change the includes line in moz.build to use OS_INCLUDES. MozReview-Commit-ID: HGnUMu5vDUM --HG-- extra : rebase_source : f5c29c9949a48a8376f84dcc676e5f8df886f130
This commit is contained in:
Родитель
e0003b10ba
Коммит
3daaf655bf
|
@ -1050,6 +1050,7 @@ system_headers = [
|
|||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
||||
system_headers += [
|
||||
'android/api-level.h',
|
||||
'android/ashmem.h',
|
||||
'android_audio/AudioSystem.h',
|
||||
'android/log.h',
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
#endif
|
||||
|
||||
// A wrapper for the tgkill syscall: send a signal to a specific thread.
|
||||
static int tgkill(pid_t tgid, pid_t tid, int sig) {
|
||||
static int _tgkill(pid_t tgid, pid_t tid, int sig) {
|
||||
return syscall(__NR_tgkill, tgid, tid, sig);
|
||||
return 0;
|
||||
}
|
||||
|
@ -387,7 +387,7 @@ void ExceptionHandler::SignalHandler(int sig, siginfo_t* info, void* uc) {
|
|||
// In order to retrigger it, we have to queue a new signal by calling
|
||||
// kill() ourselves. The special case (si_pid == 0 && sig == SIGABRT) is
|
||||
// due to the kernel sending a SIGABRT from a user request via SysRQ.
|
||||
if (tgkill(getpid(), syscall(__NR_gettid), sig) < 0) {
|
||||
if (_tgkill(getpid(), syscall(__NR_gettid), sig) < 0) {
|
||||
// If we failed to kill ourselves (e.g. because a sandbox disallows us
|
||||
// to do so), we instead resort to terminating our process. This will
|
||||
// result in an incorrect exit code.
|
||||
|
|
|
@ -35,8 +35,4 @@ AllowCompilerWarnings()
|
|||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
if CONFIG['OS_TARGET'] == 'Android' and CONFIG['CPU_ARCH'] == 'x86':
|
||||
# The NDK's user.h defines this struct with a different name.
|
||||
DEFINES['user_fpxregs_struct'] = 'user_fxsr_struct'
|
||||
|
||||
include('/toolkit/crashreporter/crashreporter.mozbuild')
|
||||
|
|
|
@ -40,8 +40,8 @@ HOST_CXXFLAGS += [
|
|||
if CONFIG['OS_TARGET'] == 'Android':
|
||||
DEFINES['ANDROID_NDK_MAJOR_VERSION'] = CONFIG['ANDROID_NDK_MAJOR_VERSION']
|
||||
DEFINES['ANDROID_NDK_MINOR_VERSION'] = CONFIG['ANDROID_NDK_MINOR_VERSION']
|
||||
LOCAL_INCLUDES += [
|
||||
'/toolkit/crashreporter/google-breakpad/src/common/android/include',
|
||||
COMPILE_FLAGS['OS_INCLUDES'] += [
|
||||
'-I%s/toolkit/crashreporter/google-breakpad/src/common/android/include' % TOPSRCDIR,
|
||||
]
|
||||
|
||||
Library('breakpad_linux_common_s')
|
||||
|
|
Загрузка…
Ссылка в новой задаче