2014-02-07 10:08:44 +08:00
|
|
|
|
|
|
|
include $(BUILD_SYSTEM)/clang/x86.mk
|
2014-04-18 01:03:35 +08:00
|
|
|
include $(BUILD_SYSTEM)/clang/HOST_x86_common.mk
|
2014-02-07 10:08:44 +08:00
|
|
|
|
|
|
|
ifeq ($(HOST_OS),linux)
|
|
|
|
CLANG_CONFIG_x86_HOST_TRIPLE := i686-linux-gnu
|
2014-03-21 04:48:35 +08:00
|
|
|
CLANG_CONFIG_x86_HOST_COMBO_EXTRA_ASFLAGS := $(CLANG_CONFIG_x86_LINUX_HOST_EXTRA_ASFLAGS)
|
|
|
|
CLANG_CONFIG_x86_HOST_COMBO_EXTRA_CFLAGS := $(CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CFLAGS)
|
|
|
|
CLANG_CONFIG_x86_HOST_COMBO_EXTRA_CPPFLAGS := $(CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CPPFLAGS)
|
|
|
|
CLANG_CONFIG_x86_HOST_COMBO_EXTRA_LDFLAGS := $(CLANG_CONFIG_x86_LINUX_HOST_EXTRA_LDFLAGS)
|
2014-02-07 10:08:44 +08:00
|
|
|
endif
|
|
|
|
ifeq ($(HOST_OS),darwin)
|
|
|
|
CLANG_CONFIG_x86_HOST_TRIPLE := i686-apple-darwin
|
2014-04-05 05:38:29 +08:00
|
|
|
CLANG_CONFIG_x86_HOST_COMBO_EXTRA_ASFLAGS := $(CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_ASFLAGS)
|
|
|
|
CLANG_CONFIG_x86_HOST_COMBO_EXTRA_CFLAGS := $(CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_CFLAGS)
|
|
|
|
CLANG_CONFIG_x86_HOST_COMBO_EXTRA_CPPFLAGS := $(CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_CPPFLAGS)
|
|
|
|
CLANG_CONFIG_x86_HOST_COMBO_EXTRA_LDFLAGS := $(CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_LDFLAGS)
|
2014-02-07 10:08:44 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
CLANG_CONFIG_x86_HOST_EXTRA_ASFLAGS := \
|
|
|
|
$(CLANG_CONFIG_EXTRA_ASFLAGS) \
|
|
|
|
$(CLANG_CONFIG_HOST_EXTRA_ASFLAGS) \
|
|
|
|
$(CLANG_CONFIG_x86_EXTRA_ASFLAGS) \
|
2014-03-21 04:48:35 +08:00
|
|
|
$(CLANG_CONFIG_x86_HOST_COMBO_EXTRA_ASFLAGS) \
|
|
|
|
-target $(CLANG_CONFIG_x86_HOST_TRIPLE)
|
2014-02-07 10:08:44 +08:00
|
|
|
|
|
|
|
CLANG_CONFIG_x86_HOST_EXTRA_CFLAGS := \
|
|
|
|
$(CLANG_CONFIG_EXTRA_CFLAGS) \
|
|
|
|
$(CLANG_CONFIG_HOST_EXTRA_CFLAGS) \
|
|
|
|
$(CLANG_CONFIG_x86_EXTRA_CFLAGS) \
|
2014-03-21 04:48:35 +08:00
|
|
|
$(CLANG_CONFIG_x86_HOST_COMBO_EXTRA_CFLAGS) \
|
2014-02-07 10:08:44 +08:00
|
|
|
$(CLANG_CONFIG_x86_HOST_EXTRA_ASFLAGS)
|
|
|
|
|
2014-11-26 16:53:46 +08:00
|
|
|
CLANG_CONFIG_x86_HOST_EXTRA_CONLYFLAGS := \
|
|
|
|
$(CLANG_CONFIG_EXTRA_CONLYFLAGS) \
|
|
|
|
$(CLANG_CONFIG_HOST_EXTRA_CONLYFLAGS) \
|
|
|
|
$(CLANG_CONFIG_x86_EXTRA_CONLYFLAGS) \
|
|
|
|
$(CLANG_CONFIG_x86_HOST_COMBO_EXTRA_CONLYFLAGS)
|
|
|
|
|
2014-02-07 10:08:44 +08:00
|
|
|
CLANG_CONFIG_x86_HOST_EXTRA_CPPFLAGS := \
|
|
|
|
$(CLANG_CONFIG_EXTRA_CPPFLAGS) \
|
|
|
|
$(CLANG_CONFIG_HOST_EXTRA_CPPFLAGS) \
|
|
|
|
$(CLANG_CONFIG_x86_EXTRA_CPPFLAGS) \
|
2014-03-21 04:48:35 +08:00
|
|
|
$(CLANG_CONFIG_x86_HOST_COMBO_EXTRA_CPPFLAGS) \
|
|
|
|
-target $(CLANG_CONFIG_x86_HOST_TRIPLE)
|
2014-02-07 10:08:44 +08:00
|
|
|
|
|
|
|
CLANG_CONFIG_x86_HOST_EXTRA_LDFLAGS := \
|
|
|
|
$(CLANG_CONFIG_EXTRA_LDFLAGS) \
|
|
|
|
$(CLANG_CONFIG_HOST_EXTRA_LDFLAGS) \
|
|
|
|
$(CLANG_CONFIG_x86_EXTRA_LDFLAGS) \
|
2014-03-21 04:48:35 +08:00
|
|
|
$(CLANG_CONFIG_x86_HOST_COMBO_EXTRA_LDFLAGS) \
|
|
|
|
-target $(CLANG_CONFIG_x86_HOST_TRIPLE)
|
2014-02-07 10:08:44 +08:00
|
|
|
|
2014-04-18 01:03:35 +08:00
|
|
|
define $(clang_2nd_arch_prefix)convert-to-host-clang-flags
|
2014-02-07 10:08:44 +08:00
|
|
|
$(strip \
|
|
|
|
$(call subst-clang-incompatible-x86-flags,\
|
|
|
|
$(filter-out $(CLANG_CONFIG_x86_UNKNOWN_CFLAGS),\
|
|
|
|
$(1))))
|
|
|
|
endef
|
|
|
|
|
2014-04-18 01:03:35 +08:00
|
|
|
$(clang_2nd_arch_prefix)CLANG_HOST_GLOBAL_CFLAGS := \
|
|
|
|
$(call $(clang_2nd_arch_prefix)convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_GLOBAL_CFLAGS)) \
|
2014-02-07 10:08:44 +08:00
|
|
|
$(CLANG_CONFIG_x86_HOST_EXTRA_CFLAGS)
|
|
|
|
|
2014-11-26 16:53:46 +08:00
|
|
|
$(clang_2nd_arch_prefix)CLANG_HOST_GLOBAL_CONLYFLAGS := \
|
|
|
|
$(call $(clang_2nd_arch_prefix)convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_GLOBAL_CONLYFLAGS)) \
|
|
|
|
$(CLANG_CONFIG_x86_HOST_EXTRA_CONLYFLAGS)
|
|
|
|
|
2014-04-18 01:03:35 +08:00
|
|
|
$(clang_2nd_arch_prefix)CLANG_HOST_GLOBAL_CPPFLAGS := \
|
|
|
|
$(call $(clang_2nd_arch_prefix)convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_GLOBAL_CPPFLAGS)) \
|
2014-02-07 10:08:44 +08:00
|
|
|
$(CLANG_CONFIG_x86_HOST_EXTRA_CPPFLAGS)
|
|
|
|
|
2014-04-18 01:03:35 +08:00
|
|
|
$(clang_2nd_arch_prefix)CLANG_HOST_GLOBAL_LDFLAGS := \
|
|
|
|
$(call $(clang_2nd_arch_prefix)convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_GLOBAL_LDFLAGS)) \
|
2014-02-07 10:08:44 +08:00
|
|
|
$(CLANG_CONFIG_x86_HOST_EXTRA_LDFLAGS)
|
2015-01-26 08:20:57 +08:00
|
|
|
|
|
|
|
$(clang_2nd_arch_prefix)HOST_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-i686.a
|