这个问题发生在clang上,在Ubuntu 16.04出现这个问题.
打开build/core/clang/HOST_x86_common.mk文件并找到CLANG_CONFIG_x86_LINUX_HOST_EXTRA_ASFLAGS,添加下面这一行参数进去~
-B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/bin
例如我的文件修改前
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_ASFLAGS := --gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG) --sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot -no-integrated-as -B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/bin