aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeun-young Park <keunyoung@google.com>2013-03-26 22:47:34 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-03-26 22:47:34 +0000
commit4886329fd53290061515485e7cf3ce497fc1b5b9 (patch)
tree79508df9b15cf7ebf0a9aea8c1d4eb7b6e44a680
parentdfc755a789a02c9b990e111bd0cb9a75d3a5e8e6 (diff)
parent935b17dd32d856eff6cdacecaee0b66cd00af69d (diff)
downloadoprofile-4886329fd53290061515485e7cf3ce497fc1b5b9.tar.gz
-rw-r--r--common.mk9
-rw-r--r--pp/Android.mk2
-rw-r--r--pp/opannotate.cpp4
3 files changed, 13 insertions, 2 deletions
diff --git a/common.mk b/common.mk
index f5578b1..f6b1de3 100644
--- a/common.mk
+++ b/common.mk
@@ -36,6 +36,15 @@ HAVE_LIBBFD := false
ifeq ($(TARGET_ARCH),arm)
toolchain := prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6
+common_host_extra_flags := -DANDROID_TARGET_ARM
+endif
+
+ifeq ($(TARGET_ARCH),mips)
+toolchain := prebuilts/gcc/$(HOST_PREBUILT_TAG)/mips/mipsel-linux-android-4.6
+common_host_extra_flags := -DANDROID_TARGET_MIPS
+endif
+
+ifneq ($(filter arm mips,$(TARGET_ARCH)),)
common_host_c_includes := $(common_c_includes) $(toolchain)/include
common_host_cflags := $(common_cflags) -fexceptions -DANDROID_HOST -DHAVE_XCALLOC
common_host_ldlibs_libiconv :=
diff --git a/pp/Android.mk b/pp/Android.mk
index fa1cf6e..36f2b03 100644
--- a/pp/Android.mk
+++ b/pp/Android.mk
@@ -62,7 +62,7 @@ LOCAL_SRC_FILES:= \
LOCAL_STATIC_LIBRARIES := $(common_libs)
LOCAL_C_INCLUDES := $(common_host_c_includes)
-LOCAL_CFLAGS := $(common_host_cflags)
+LOCAL_CFLAGS := $(common_host_cflags) $(common_host_extra_flags)
LOCAL_LDLIBS := $(common_ldlibs)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE:= opannotate
diff --git a/pp/opannotate.cpp b/pp/opannotate.cpp
index 8df841b..ddfd8b4 100644
--- a/pp/opannotate.cpp
+++ b/pp/opannotate.cpp
@@ -417,8 +417,10 @@ void do_one_output_objdump(symbol_collection const & symbols,
}
args.push_back(image_name);
-#if defined(ANDROID)
+#if defined(ANDROID_TARGET_ARM)
child_reader reader("arm-eabi-objdump", args);
+#elif defined(ANDROID_TARGET_MIPS)
+ child_reader reader("mipsel-linux-android-objdump", args);
#else
child_reader reader("objdump", args);
#endif