StephenChong / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

Android Clang & arm64-v8a support #617

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When trying to build the android sample using the clang toolchain via:

APP_ABI := arm64-v8a
NDK_TOOLCHAIN_VERSION := clang

in the Application.mk file, compiling the assembly produces an error:

breakpad/android/sample_app $ ndk-build
[arm64-v8a] Compile++      : test_google_breakpad <= test_breakpad.cpp
[arm64-v8a] Compile++      : breakpad_client <= crash_generation_client.cc
[arm64-v8a] Compile++      : breakpad_client <= exception_handler.cc
[arm64-v8a] Compile++      : breakpad_client <= minidump_descriptor.cc
[arm64-v8a] Compile++      : breakpad_client <= log.cc
[arm64-v8a] Compile++      : breakpad_client <= linux_dumper.cc
[arm64-v8a] Compile++      : breakpad_client <= linux_ptrace_dumper.cc
[arm64-v8a] Compile++      : breakpad_client <= minidump_writer.cc
jni/../../google_breakpad/../../src/client/linux/minidump_writer/minidump_writer
.cc:1079:19: warning: comparison of unsigned expression < 0 is always false 
[-Wtautological-compare]
                i < sizeof(cpu_features_entries)/
                ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
[arm64-v8a] Compile++      : breakpad_client <= minidump_file_writer.cc
[arm64-v8a] Compile        : breakpad_client <= breakpad_getcontext.S
jni/../../google_breakpad/../../src/common/android/breakpad_getcontext.S:167:16:
 error: expected ')' in parentheses expression
  mov x3, #(64 / 8)
               ^
make: *** 
[obj/local/arm64-v8a/objs/breakpad_client/src/common/android/breakpad_getcontext
.o] Error 1

It can be fixed by changing the offending line to 

  mov x3, #(64 >> 3)

although I'm not really sure what I'm doing, and I can't test due to issue 616 
(https://code.google.com/p/google-breakpad/issues/detail?id=616).

This issue only happens with arm64-v8a, other ABIs are fine.

Original issue reported on code.google.com by vol...@limbic.com on 6 Nov 2014 at 9:51

GoogleCodeExporter commented 9 years ago
The "fixed" line is actually

  mov     x3, #(_NSIG >> 3)

Original comment by vol...@limbic.com on 6 Nov 2014 at 9:53