1 2include $(BUILD_SYSTEM)/clang/x86.mk 3 4CLANG_CONFIG_x86_TARGET_TRIPLE := i686-linux-android 5# NOTE: There is no i686-linux-android prebuilt, so we must hardcode the 6# x86_64 target instead. 7CLANG_CONFIG_x86_TARGET_TOOLCHAIN_PREFIX := \ 8 $($(clang_2nd_arch_prefix)TARGET_TOOLCHAIN_ROOT)/x86_64-linux-android/bin 9 10CLANG_CONFIG_x86_TARGET_EXTRA_ASFLAGS := \ 11 $(CLANG_CONFIG_EXTRA_ASFLAGS) \ 12 $(CLANG_CONFIG_TARGET_EXTRA_ASFLAGS) \ 13 $(CLANG_CONFIG_x86_EXTRA_ASFLAGS) \ 14 -target $(CLANG_CONFIG_x86_TARGET_TRIPLE) \ 15 -B$(CLANG_CONFIG_x86_TARGET_TOOLCHAIN_PREFIX) 16 17CLANG_CONFIG_x86_TARGET_EXTRA_CFLAGS := \ 18 $(CLANG_CONFIG_EXTRA_CFLAGS) \ 19 $(CLANG_CONFIG_TARGET_EXTRA_CFLAGS) \ 20 $(CLANG_CONFIG_x86_EXTRA_CFLAGS) \ 21 $(CLANG_CONFIG_x86_TARGET_EXTRA_ASFLAGS) 22 23CLANG_CONFIG_x86_TARGET_EXTRA_CPPFLAGS := \ 24 $(CLANG_CONFIG_EXTRA_CPPFLAGS) \ 25 $(CLANG_CONFIG_TARGET_EXTRA_CPPFLAGS) \ 26 $(CLANG_CONFIG_x86_EXTRA_CPPFLAGS) \ 27 28CLANG_CONFIG_x86_TARGET_EXTRA_LDFLAGS := \ 29 $(CLANG_CONFIG_EXTRA_LDFLAGS) \ 30 $(CLANG_CONFIG_TARGET_EXTRA_LDFLAGS) \ 31 $(CLANG_CONFIG_x86_EXTRA_LDFLAGS) \ 32 -target $(CLANG_CONFIG_x86_TARGET_TRIPLE) \ 33 -B$(CLANG_CONFIG_x86_TARGET_TOOLCHAIN_PREFIX) 34 35 36define $(clang_2nd_arch_prefix)convert-to-clang-flags 37 $(strip \ 38 $(call subst-clang-incompatible-x86-flags,\ 39 $(filter-out $(CLANG_CONFIG_x86_UNKNOWN_CFLAGS),\ 40 $(1)))) 41endef 42 43$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CFLAGS := \ 44 $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS)) \ 45 $(CLANG_CONFIG_x86_TARGET_EXTRA_CFLAGS) 46 47$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CPPFLAGS := \ 48 $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CPPFLAGS)) \ 49 $(CLANG_CONFIG_x86_TARGET_EXTRA_CPPFLAGS) 50 51$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_LDFLAGS := \ 52 $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS)) \ 53 $(CLANG_CONFIG_x86_TARGET_EXTRA_LDFLAGS) 54 55$(clang_2nd_arch_prefix)RS_TRIPLE := armv7-none-linux-gnueabi 56$(clang_2nd_arch_prefix)RS_TRIPLE_CFLAGS := -D__i386__ 57RS_COMPAT_TRIPLE := i686-linux-android 58