Fix the Android/MIPS build.
This patch fixes the build for Android on MIPS when using the latest official Android NDK (r9): - Update src/common/android/include/elf.h to add a missing definition for SHT_MIPS_DWARF. - Add src/common/android/include/sgidefs.h required by LSS when compiling for MIPS. - Update android/run-checks.sh to work properly with the --abi=mips option. All tests were passed succesfully with an emulator system image running Android 4.2. - Update other Android-specific files. R=Petar.Jovanovic@imgtec.com, mark@chromium.org Review URL: https://breakpad.appspot.com/633002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1216 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
db877a13bb
commit
5bce3b4d77
9 changed files with 86 additions and 21 deletions
|
@ -337,9 +337,15 @@ endif
|
|||
if LINUX_HOST
|
||||
src_client_linux_linux_dumper_unittest_helper_SOURCES = \
|
||||
src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
|
||||
src_client_linux_linux_dumper_unittest_helper_CXXFLAGS=$(PTHREAD_CFLAGS)
|
||||
src_client_linux_linux_dumper_unittest_helper_LDFLAGS=$(PTHREAD_CFLAGS)
|
||||
src_client_linux_linux_dumper_unittest_helper_CC=$(PTHREAD_CC)
|
||||
if ANDROID_HOST
|
||||
# On Android PTHREAD_CFLAGS is empty, and adding src/common/android/include
|
||||
# to the include path is necessary to build this program.
|
||||
src_client_linux_linux_dumper_unittest_helper_CXXFLAGS=$(AM_CXXFLAGS)
|
||||
else
|
||||
src_client_linux_linux_dumper_unittest_helper_CXXFLAGS=$(PTHREAD_CFLAGS)
|
||||
endif
|
||||
|
||||
src_client_linux_linux_client_unittest_shlib_SOURCES = \
|
||||
src/client/linux/handler/exception_handler_unittest.cc \
|
||||
|
|
|
@ -1585,9 +1585,12 @@ TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
|
|||
@LINUX_HOST_TRUE@src_client_linux_linux_dumper_unittest_helper_SOURCES = \
|
||||
@LINUX_HOST_TRUE@ src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
|
||||
|
||||
@LINUX_HOST_TRUE@src_client_linux_linux_dumper_unittest_helper_CXXFLAGS = $(PTHREAD_CFLAGS)
|
||||
@LINUX_HOST_TRUE@src_client_linux_linux_dumper_unittest_helper_LDFLAGS = $(PTHREAD_CFLAGS)
|
||||
@LINUX_HOST_TRUE@src_client_linux_linux_dumper_unittest_helper_CC = $(PTHREAD_CC)
|
||||
@ANDROID_HOST_FALSE@@LINUX_HOST_TRUE@src_client_linux_linux_dumper_unittest_helper_CXXFLAGS = $(PTHREAD_CFLAGS)
|
||||
# On Android PTHREAD_CFLAGS is empty, and adding src/common/android/include
|
||||
# to the include path is necessary to build this program.
|
||||
@ANDROID_HOST_TRUE@@LINUX_HOST_TRUE@src_client_linux_linux_dumper_unittest_helper_CXXFLAGS = $(AM_CXXFLAGS)
|
||||
@LINUX_HOST_TRUE@src_client_linux_linux_client_unittest_shlib_SOURCES = src/client/linux/handler/exception_handler_unittest.cc \
|
||||
@LINUX_HOST_TRUE@ src/client/linux/minidump_writer/directory_reader_unittest.cc \
|
||||
@LINUX_HOST_TRUE@ src/client/linux/minidump_writer/cpu_set_unittest.cc \
|
||||
|
@ -3292,9 +3295,6 @@ src/testing/src/src_processor_stackwalker_arm_unittest-gmock-all.$(OBJEXT): \
|
|||
src/processor/stackwalker_arm_unittest$(EXEEXT): $(src_processor_stackwalker_arm_unittest_OBJECTS) $(src_processor_stackwalker_arm_unittest_DEPENDENCIES) $(EXTRA_src_processor_stackwalker_arm_unittest_DEPENDENCIES) src/processor/$(am__dirstamp)
|
||||
@rm -f src/processor/stackwalker_arm_unittest$(EXEEXT)
|
||||
$(CXXLINK) $(src_processor_stackwalker_arm_unittest_OBJECTS) $(src_processor_stackwalker_arm_unittest_LDADD) $(LIBS)
|
||||
src/processor/stackwalker_selftest.$(OBJEXT): \
|
||||
src/processor/$(am__dirstamp) \
|
||||
src/processor/$(DEPDIR)/$(am__dirstamp)
|
||||
src/common/src_processor_stackwalker_mips_unittest-test_assembler.$(OBJEXT): \
|
||||
src/common/$(am__dirstamp) \
|
||||
src/common/$(DEPDIR)/$(am__dirstamp)
|
||||
|
|
|
@ -5,8 +5,7 @@ This document explains how to use the Google Breakpad client library
|
|||
on Android, and later generate valid stack traces from the minidumps
|
||||
it generates.
|
||||
|
||||
This release supports ARM and x86 based Android systems. MIPS is not
|
||||
currently supported by Breakpad.
|
||||
This release supports ARM, x86 and MIPS based Android systems.
|
||||
|
||||
I. Building the client library:
|
||||
===============================
|
||||
|
|
|
@ -45,11 +45,6 @@
|
|||
# to select one in your Application.mk
|
||||
#
|
||||
|
||||
# Sanity check. We can only build for ARM for now.
|
||||
ifneq (,$(filter-out armeabi armeabi-v7a x86,$(TARGET_ARCH_ABI)))
|
||||
$(error Sorry, Google Breakpad only works on Android ARM and x86 for now!)
|
||||
endif
|
||||
|
||||
# The top Google Breakpad directory.
|
||||
# We assume this Android.mk to be under 'android/google_breakpad'
|
||||
|
||||
|
@ -85,7 +80,8 @@ LOCAL_SRC_FILES := \
|
|||
src/client/minidump_file_writer.cc \
|
||||
src/common/android/breakpad_getcontext.S \
|
||||
src/common/convert_UTF.c \
|
||||
src/common/md5.cc src/common/string_conversion.cc \
|
||||
src/common/md5.cc \
|
||||
src/common/string_conversion.cc \
|
||||
src/common/linux/elfutils.cc \
|
||||
src/common/linux/file_id.cc \
|
||||
src/common/linux/guid_creator.cc \
|
||||
|
|
|
@ -326,6 +326,9 @@ case $ARCH in
|
|||
x86)
|
||||
GNU_CONFIG=i686-linux-android
|
||||
;;
|
||||
mips)
|
||||
GNU_CONFIG=mipsel-linux-android
|
||||
;;
|
||||
*)
|
||||
GNU_CONFIG="$ARCH-linux-android"
|
||||
;;
|
||||
|
|
|
@ -28,4 +28,4 @@
|
|||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
APP_STL := stlport_static
|
||||
APP_ABI := armeabi armeabi-v7a
|
||||
APP_ABI := all
|
||||
|
|
20
configure
vendored
20
configure
vendored
|
@ -632,6 +632,7 @@ CCAS
|
|||
am__fastdepCC_FALSE
|
||||
am__fastdepCC_TRUE
|
||||
CCDEPMODE
|
||||
am__nodep
|
||||
AMDEPBACKSLASH
|
||||
AMDEP_FALSE
|
||||
AMDEP_TRUE
|
||||
|
@ -2698,9 +2699,9 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
|
|||
|
||||
# We need awk for the "check" target. The system "awk" is bad on
|
||||
# some platforms.
|
||||
# Always define AMTAR for backward compatibility.
|
||||
|
||||
AMTAR=${AMTAR-"${am_missing_run}tar"}
|
||||
# Always define AMTAR for backward compatibility. Yes, it's still used
|
||||
# in the wild :-( We should find a proper way to deprecate it ...
|
||||
AMTAR='$${TAR-tar}'
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
|
||||
|
@ -2844,6 +2845,7 @@ fi
|
|||
if test "x$enable_dependency_tracking" != xno; then
|
||||
am_depcomp="$ac_aux_dir/depcomp"
|
||||
AMDEPBACKSLASH='\'
|
||||
am__nodep='_no'
|
||||
fi
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
AMDEP_TRUE=
|
||||
|
@ -3658,6 +3660,7 @@ else
|
|||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
|
@ -3717,7 +3720,7 @@ else
|
|||
break
|
||||
fi
|
||||
;;
|
||||
msvisualcpp | msvcmsys)
|
||||
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
|
||||
# This compiler won't grok `-c -o', but also, the minuso test has
|
||||
# not run yet. These depmodes are late enough in the game, and
|
||||
# so weak that their functioning should not be impacted.
|
||||
|
@ -3792,6 +3795,7 @@ else
|
|||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
|
@ -3849,7 +3853,7 @@ else
|
|||
break
|
||||
fi
|
||||
;;
|
||||
msvisualcpp | msvcmsys)
|
||||
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
|
||||
# This compiler won't grok `-c -o', but also, the minuso test has
|
||||
# not run yet. These depmodes are late enough in the game, and
|
||||
# so weak that their functioning should not be impacted.
|
||||
|
@ -4457,6 +4461,7 @@ else
|
|||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
|
@ -4516,7 +4521,7 @@ else
|
|||
break
|
||||
fi
|
||||
;;
|
||||
msvisualcpp | msvcmsys)
|
||||
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
|
||||
# This compiler won't grok `-c -o', but also, the minuso test has
|
||||
# not run yet. These depmodes are late enough in the game, and
|
||||
# so weak that their functioning should not be impacted.
|
||||
|
@ -5104,6 +5109,7 @@ else
|
|||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
|
@ -5163,7 +5169,7 @@ else
|
|||
break
|
||||
fi
|
||||
;;
|
||||
msvisualcpp | msvcmsys)
|
||||
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
|
||||
# This compiler won't grok `-c -o', but also, the minuso test has
|
||||
# not run yet. These depmodes are late enough in the game, and
|
||||
# so weak that their functioning should not be impacted.
|
||||
|
|
|
@ -152,6 +152,10 @@ typedef struct {
|
|||
#define NT_FPREGSET 2
|
||||
#endif
|
||||
|
||||
#if !defined(SHT_MIPS_DWARF)
|
||||
#define SHT_MIPS_DWARF 0x7000001e
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
|
51
src/common/android/include/sgidefs.h
Normal file
51
src/common/android/include/sgidefs.h
Normal file
|
@ -0,0 +1,51 @@
|
|||
// Copyright (c) 2013, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef GOOGLE_BREAKPAD_ANDROID_INCLUDE_SGIDEFS_H
|
||||
#define GOOGLE_BREAKPAD_ANDROID_INCLUDE_SGIDEFS_H
|
||||
|
||||
#ifdef __mips__
|
||||
|
||||
#define _MIPS_SIM_ABI32 1
|
||||
#define _MIPS_SIM_NABI32 2
|
||||
#define _MIPS_SIM_ABI64 3
|
||||
|
||||
// The following should always be defined by the compiler,
|
||||
// Verified for Android with GCC 4.6 and Clang 3.1.
|
||||
#ifndef _MIPS_SIM
|
||||
#error "Toolchain should define _MIPS_SIM"
|
||||
#endif
|
||||
|
||||
#ifndef _MIPS_SZPTR
|
||||
#error "Toolchain should define _MIPS_PTR"
|
||||
#endif
|
||||
|
||||
#endif // __mips__
|
||||
|
||||
#endif // GOOGLE_BREAKPAD_ANDROID_INCLUDE_SGIDEFS_H
|
Loading…
Reference in a new issue