2014-02-07 10:08:44 +08:00
|
|
|
|
|
|
|
include $(BUILD_SYSTEM)/clang/x86.mk
|
|
|
|
|
|
|
|
CLANG_CONFIG_x86_TARGET_TRIPLE := i686-linux-android
|
2014-02-13 19:21:12 +08:00
|
|
|
# NOTE: There is no i686-linux-android prebuilt, so we must hardcode the
|
|
|
|
# x86_64 target instead.
|
2014-02-07 10:08:44 +08:00
|
|
|
CLANG_CONFIG_x86_TARGET_TOOLCHAIN_PREFIX := \
|
2014-02-12 04:47:52 +08:00
|
|
|
$($(clang_2nd_arch_prefix)TARGET_TOOLCHAIN_ROOT)/x86_64-linux-android/bin
|
2014-02-07 10:08:44 +08:00
|
|
|
|
|
|
|
CLANG_CONFIG_x86_TARGET_EXTRA_ASFLAGS := \
|
|
|
|
$(CLANG_CONFIG_EXTRA_ASFLAGS) \
|
|
|
|
$(CLANG_CONFIG_TARGET_EXTRA_ASFLAGS) \
|
|
|
|
$(CLANG_CONFIG_x86_EXTRA_ASFLAGS) \
|
|
|
|
-target $(CLANG_CONFIG_x86_TARGET_TRIPLE) \
|
|
|
|
-B$(CLANG_CONFIG_x86_TARGET_TOOLCHAIN_PREFIX)
|
|
|
|
|
|
|
|
CLANG_CONFIG_x86_TARGET_EXTRA_CFLAGS := \
|
|
|
|
$(CLANG_CONFIG_EXTRA_CFLAGS) \
|
|
|
|
$(CLANG_CONFIG_TARGET_EXTRA_CFLAGS) \
|
|
|
|
$(CLANG_CONFIG_x86_EXTRA_CFLAGS) \
|
2015-02-25 08:06:15 +08:00
|
|
|
$(CLANG_CONFIG_x86_TARGET_EXTRA_ASFLAGS) \
|
|
|
|
-fno-optimize-sibling-calls \
|
|
|
|
-mstackrealign
|
|
|
|
|
|
|
|
# http://llvm.org/bugs/show_bug.cgi?id=15086,
|
|
|
|
# llvm tail call optimization is wrong for x86.
|
|
|
|
# -mstackrealign is needed to realign stack in native code
|
|
|
|
# that could be called from JNI, so that movaps instruction
|
|
|
|
# will work on assumed stack aligned local variables.
|
2014-02-07 10:08:44 +08:00
|
|
|
|
2014-11-26 16:53:46 +08:00
|
|
|
CLANG_CONFIG_x86_TARGET_EXTRA_CONLYFLAGS := \
|
|
|
|
$(CLANG_CONFIG_EXTRA_CONLYFLAGS) \
|
|
|
|
$(CLANG_CONFIG_TARGET_EXTRA_CONLYFLAGS) \
|
|
|
|
$(CLANG_CONFIG_x86_EXTRA_CONLYFLAGS)
|
|
|
|
|
2014-02-07 10:08:44 +08:00
|
|
|
CLANG_CONFIG_x86_TARGET_EXTRA_CPPFLAGS := \
|
|
|
|
$(CLANG_CONFIG_EXTRA_CPPFLAGS) \
|
|
|
|
$(CLANG_CONFIG_TARGET_EXTRA_CPPFLAGS) \
|
|
|
|
$(CLANG_CONFIG_x86_EXTRA_CPPFLAGS) \
|
|
|
|
|
|
|
|
CLANG_CONFIG_x86_TARGET_EXTRA_LDFLAGS := \
|
|
|
|
$(CLANG_CONFIG_EXTRA_LDFLAGS) \
|
|
|
|
$(CLANG_CONFIG_TARGET_EXTRA_LDFLAGS) \
|
|
|
|
$(CLANG_CONFIG_x86_EXTRA_LDFLAGS) \
|
|
|
|
-target $(CLANG_CONFIG_x86_TARGET_TRIPLE) \
|
|
|
|
-B$(CLANG_CONFIG_x86_TARGET_TOOLCHAIN_PREFIX)
|
|
|
|
|
|
|
|
|
|
|
|
define $(clang_2nd_arch_prefix)convert-to-clang-flags
|
|
|
|
$(strip \
|
|
|
|
$(call subst-clang-incompatible-x86-flags,\
|
|
|
|
$(filter-out $(CLANG_CONFIG_x86_UNKNOWN_CFLAGS),\
|
|
|
|
$(1))))
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CFLAGS := \
|
|
|
|
$(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS)) \
|
|
|
|
$(CLANG_CONFIG_x86_TARGET_EXTRA_CFLAGS)
|
|
|
|
|
2014-11-26 16:53:46 +08:00
|
|
|
$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CONLYFLAGS := \
|
|
|
|
$(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CONLYFLAGS)) \
|
|
|
|
$(CLANG_CONFIG_x86_TARGET_EXTRA_CONLYFLAGS)
|
|
|
|
|
2014-02-07 10:08:44 +08:00
|
|
|
$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CPPFLAGS := \
|
|
|
|
$(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CPPFLAGS)) \
|
|
|
|
$(CLANG_CONFIG_x86_TARGET_EXTRA_CPPFLAGS)
|
|
|
|
|
|
|
|
$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_LDFLAGS := \
|
|
|
|
$(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS)) \
|
|
|
|
$(CLANG_CONFIG_x86_TARGET_EXTRA_LDFLAGS)
|
|
|
|
|
2014-08-30 05:43:53 +08:00
|
|
|
$(clang_2nd_arch_prefix)RS_TRIPLE := armv7-none-linux-gnueabi
|
|
|
|
$(clang_2nd_arch_prefix)RS_TRIPLE_CFLAGS := -D__i386__
|
2015-01-13 09:20:28 +08:00
|
|
|
$(clang_2nd_arch_prefix)RS_COMPAT_TRIPLE := i686-linux-android
|