1 2include $(BUILD_SYSTEM)/clang/mips.mk 3 4CLANG_CONFIG_mips_TARGET_TRIPLE := mipsel-linux-android 5CLANG_CONFIG_mips_TARGET_TOOLCHAIN_PREFIX := \ 6 $($(clang_2nd_arch_prefix)TARGET_TOOLCHAIN_ROOT)/mips64el-linux-android/bin 7 8CLANG_CONFIG_mips_TARGET_EXTRA_ASFLAGS := \ 9 $(CLANG_CONFIG_EXTRA_ASFLAGS) \ 10 $(CLANG_CONFIG_TARGET_EXTRA_ASFLAGS) \ 11 $(CLANG_CONFIG_mips_EXTRA_ASFLAGS) \ 12 -fPIC \ 13 -target $(CLANG_CONFIG_mips_TARGET_TRIPLE) \ 14 -B$(CLANG_CONFIG_mips_TARGET_TOOLCHAIN_PREFIX) 15 16CLANG_CONFIG_mips_TARGET_EXTRA_CFLAGS := \ 17 $(CLANG_CONFIG_EXTRA_CFLAGS) \ 18 $(CLANG_CONFIG_TARGET_EXTRA_CFLAGS) \ 19 $(CLANG_CONFIG_mips_EXTRA_CFLAGS) \ 20 $(CLANG_CONFIG_mips_TARGET_EXTRA_ASFLAGS) 21 22CLANG_CONFIG_mips_TARGET_EXTRA_CONLYFLAGS := \ 23 $(CLANG_CONFIG_EXTRA_CONLYFLAGS) \ 24 $(CLANG_CONFIG_TARGET_EXTRA_CONLYFLAGS) \ 25 $(CLANG_CONFIG_mips_EXTRA_CONLYFLAGS) 26 27CLANG_CONFIG_mips_TARGET_EXTRA_CPPFLAGS := \ 28 $(CLANG_CONFIG_EXTRA_CPPFLAGS) \ 29 $(CLANG_CONFIG_TARGET_EXTRA_CPPFLAGS) \ 30 $(CLANG_CONFIG_mips_EXTRA_CPPFLAGS) \ 31 32CLANG_CONFIG_mips_TARGET_EXTRA_LDFLAGS := \ 33 $(CLANG_CONFIG_EXTRA_LDFLAGS) \ 34 $(CLANG_CONFIG_TARGET_EXTRA_LDFLAGS) \ 35 $(CLANG_CONFIG_mips_EXTRA_LDFLAGS) \ 36 -target $(CLANG_CONFIG_mips_TARGET_TRIPLE) \ 37 -B$(CLANG_CONFIG_mips_TARGET_TOOLCHAIN_PREFIX) 38 39 40define $(clang_2nd_arch_prefix)convert-to-clang-flags 41 $(strip \ 42 $(call subst-clang-incompatible-mips-flags,\ 43 $(filter-out $(CLANG_CONFIG_mips_UNKNOWN_CFLAGS),\ 44 $(1)))) 45endef 46 47$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CFLAGS := \ 48 $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS)) \ 49 $(CLANG_CONFIG_mips_TARGET_EXTRA_CFLAGS) 50 51$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CONLYFLAGS := \ 52 $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CONLYFLAGS)) \ 53 $(CLANG_CONFIG_mips_TARGET_EXTRA_CONLYFLAGS) 54 55$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CPPFLAGS := \ 56 $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CPPFLAGS)) \ 57 $(CLANG_CONFIG_mips_TARGET_EXTRA_CPPFLAGS) 58 59$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_LDFLAGS := \ 60 $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS)) \ 61 $(CLANG_CONFIG_mips_TARGET_EXTRA_LDFLAGS) 62 63$(clang_2nd_arch_prefix)RS_TRIPLE := armv7-none-linux-gnueabi 64$(clang_2nd_arch_prefix)RS_TRIPLE_CFLAGS := 65RS_COMPAT_TRIPLE := mipsel-linux-android 66 67$(clang_2nd_arch_prefix)TARGET_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-mipsel-android.a 68