Skip to content
Browse files

Add oprofile host tool support for mips.

Provides general build support, and fixes one arm-specific change
in opannotate.

Change-Id: Ib4f8145719fb6b2a1e292b72c2bed044497c55c2
  • Loading branch information...
1 parent 8b82b79 commit 935b17dd32d856eff6cdacecaee0b66cd00af69d Paul Lind committed Mar 4, 2013
Showing with 13 additions and 2 deletions.
  1. +9 −0 common.mk
  2. +1 −1 pp/Android.mk
  3. +3 −1 pp/opannotate.cpp
View
9 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 :=
View
2 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
View
4 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

0 comments on commit 935b17d

Please sign in to comment.
Something went wrong with that request. Please try again.