diff options
author | Ying Wang <wangying@google.com> | 2014-05-15 01:09:49 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-15 01:09:49 +0000 |
commit | 8200231ae1891fdb3bba8ff4cefbaea88dbbe61b (patch) | |
tree | c5723c19132194cdd6ba7075618b18988129f93b /core/clang | |
parent | 5772ce61307af9a02b0886357aa7acc1b6a3c76d (diff) | |
parent | e50f2d9f32a27d8290692dbf99ab8b247ef9d553 (diff) | |
download | build-8200231ae1891fdb3bba8ff4cefbaea88dbbe61b.zip build-8200231ae1891fdb3bba8ff4cefbaea88dbbe61b.tar.gz build-8200231ae1891fdb3bba8ff4cefbaea88dbbe61b.tar.bz2 |
am e50f2d9f: am 40b49d30: am a74ade94: Merge "Support host multilib build"
* commit 'e50f2d9f32a27d8290692dbf99ab8b247ef9d553':
Support host multilib build
Diffstat (limited to 'core/clang')
-rw-r--r-- | core/clang/HOST_x86.mk | 16 | ||||
-rw-r--r-- | core/clang/HOST_x86_64.mk | 2 | ||||
-rw-r--r-- | core/clang/HOST_x86_common.mk | 56 | ||||
-rw-r--r-- | core/clang/config.mk | 9 |
4 files changed, 71 insertions, 12 deletions
diff --git a/core/clang/HOST_x86.mk b/core/clang/HOST_x86.mk index ee61e5e..510a74d 100644 --- a/core/clang/HOST_x86.mk +++ b/core/clang/HOST_x86.mk @@ -1,6 +1,6 @@ include $(BUILD_SYSTEM)/clang/x86.mk -include $(BUILD_SYSTEM)/clang/x86_common.mk +include $(BUILD_SYSTEM)/clang/HOST_x86_common.mk ifeq ($(HOST_OS),linux) CLANG_CONFIG_x86_HOST_TRIPLE := i686-linux-gnu @@ -44,21 +44,21 @@ CLANG_CONFIG_x86_HOST_EXTRA_LDFLAGS := \ $(CLANG_CONFIG_x86_HOST_COMBO_EXTRA_LDFLAGS) \ -target $(CLANG_CONFIG_x86_HOST_TRIPLE) -define convert-to-host-clang-flags +define $(clang_2nd_arch_prefix)convert-to-host-clang-flags $(strip \ $(call subst-clang-incompatible-x86-flags,\ $(filter-out $(CLANG_CONFIG_x86_UNKNOWN_CFLAGS),\ $(1)))) endef -CLANG_HOST_GLOBAL_CFLAGS := \ - $(call convert-to-host-clang-flags,$(HOST_GLOBAL_CFLAGS)) \ +$(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)) \ $(CLANG_CONFIG_x86_HOST_EXTRA_CFLAGS) -CLANG_HOST_GLOBAL_CPPFLAGS := \ - $(call convert-to-host-clang-flags,$(HOST_GLOBAL_CPPFLAGS)) \ +$(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)) \ $(CLANG_CONFIG_x86_HOST_EXTRA_CPPFLAGS) -CLANG_HOST_GLOBAL_LDFLAGS := \ - $(call convert-to-host-clang-flags,$(HOST_GLOBAL_LDFLAGS)) \ +$(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)) \ $(CLANG_CONFIG_x86_HOST_EXTRA_LDFLAGS) diff --git a/core/clang/HOST_x86_64.mk b/core/clang/HOST_x86_64.mk index d60e15f..6b94525 100644 --- a/core/clang/HOST_x86_64.mk +++ b/core/clang/HOST_x86_64.mk @@ -1,6 +1,6 @@ include $(BUILD_SYSTEM)/clang/x86_64.mk -include $(BUILD_SYSTEM)/clang/x86_common.mk +include $(BUILD_SYSTEM)/clang/HOST_x86_common.mk ifeq ($(HOST_OS),linux) CLANG_CONFIG_x86_64_HOST_TRIPLE := x86_64-linux-gnu diff --git a/core/clang/HOST_x86_common.mk b/core/clang/HOST_x86_common.mk new file mode 100644 index 0000000..0241cb6 --- /dev/null +++ b/core/clang/HOST_x86_common.mk @@ -0,0 +1,56 @@ +# Shared by HOST_x86.mk and HOST_x86_64.mk. + +ifeq ($(HOST_OS),darwin) +# nothing required here yet +endif + +ifeq ($(HOST_OS),linux) +CLANG_CONFIG_x86_LINUX_HOST_EXTRA_ASFLAGS := \ + --gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG) \ + --sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot \ + -no-integrated-as + +CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CFLAGS := \ + --gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG) \ + -no-integrated-as + +ifneq ($(strip $($(clang_2nd_arch_prefix)HOST_IS_64_BIT)),) +CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CPPFLAGS := \ + --gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG) \ + --sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot \ + -isystem $($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/include/c++/4.6 \ + -isystem $($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/include/c++/4.6/x86_64-linux \ + -isystem $($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/include/c++/4.6/backward \ + -no-integrated-as + +CLANG_CONFIG_x86_LINUX_HOST_EXTRA_LDFLAGS := \ + --gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG) \ + --sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot \ + -B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/bin \ + -B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/lib/gcc/x86_64-linux/4.6 \ + -L$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/lib/gcc/x86_64-linux/4.6 \ + -L$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/lib64/ \ + -no-integrated-as +else +CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CPPFLAGS := \ + --gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG) \ + --sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot \ + -isystem $($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/include/c++/4.6 \ + -isystem $($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/include/c++/4.6/x86_64-linux/32 \ + -isystem $($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/include/c++/4.6/backward \ + -no-integrated-as + +CLANG_CONFIG_x86_LINUX_HOST_EXTRA_LDFLAGS := \ + --gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG) \ + --sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot \ + -B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/bin \ + -B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/lib/gcc/x86_64-linux/4.6/32 \ + -L$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/lib/gcc/x86_64-linux/4.6/32 \ + -L$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/lib32/ \ + -no-integrated-as +endif +endif # Linux + +ifeq ($(HOST_OS),windows) +# nothing required here yet +endif diff --git a/core/clang/config.mk b/core/clang/config.mk index c0be37a..4e6afd6 100644 --- a/core/clang/config.mk +++ b/core/clang/config.mk @@ -47,10 +47,13 @@ CLANG_CONFIG_TARGET_EXTRA_CPPFLAGS := -nostdlibinc CLANG_CONFIG_TARGET_EXTRA_LDFLAGS := # HOST config -ifneq ($(strip $(BUILD_HOST_64bit)),) -include $(BUILD_SYSTEM)/clang/HOST_x86_64.mk -else +clang_2nd_arch_prefix := include $(BUILD_SYSTEM)/clang/HOST_$(HOST_ARCH).mk + +# HOST_2ND_ARCH config +ifdef HOST_2ND_ARCH +clang_2nd_arch_prefix := $(HOST_2ND_ARCH_VAR_PREFIX) +include $(BUILD_SYSTEM)/clang/HOST_$(HOST_2ND_ARCH).mk endif # TARGET config |