aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak Kundra <deepakkundra@gmail.com>2016-08-19 17:54:04 (GMT)
committerDeepak Kundra <deepakkundra@gmail.com>2016-08-19 17:54:04 (GMT)
commitf5d4085fdd74137b6d416d42dc266d0e10013b42 (patch)
treefb1535d9305302af3d86350b428de7242fa8bc25
parenta3583b8004a9d37875ab2657b9ca434a66c3a5aa (diff)
downloadandroid_build-staging/caf/LA.BR.1.2.6.c1-01200-8x09.0.zip
android_build-staging/caf/LA.BR.1.2.6.c1-01200-8x09.0.tar.gz
android_build-staging/caf/LA.BR.1.2.6.c1-01200-8x09.0.tar.bz2
Avoid accidentally using the host's native 'as' command.staging/caf/LA.BR.1.2.6.c1-01200-8x09.0
When invoking clang for the host to assemble .S files, the -B flag would not be provided, which allowed the host prebuilt clang to use an 'as' from the native environment. Most of the time this "just works", but some newer 'as' versions cause problems with the older prebuilt toolchain, for example by generating unsupported relocation types. To avoid this problem, simply use the -B flag to tell clang to invoke the assembler from the correct prebuilt gcc prefix. Change-Id: I560ba91ecca723b19637f3d96269c8ddd0c79e00
-rw-r--r--core/clang/HOST_x86_common.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/clang/HOST_x86_common.mk b/core/clang/HOST_x86_common.mk
index 74b5a69..d151e99 100644
--- a/core/clang/HOST_x86_common.mk
+++ b/core/clang/HOST_x86_common.mk
@@ -11,7 +11,8 @@ 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
+ --sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot \
+ -B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/bin
CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CFLAGS := \
--gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)