android sdk linux 16.04 编译 兼容性出问题 x86_64

编译出现的错误:
/home/elinksoft/code/8163/alps/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/bin/../lib/gcc/x86_64-linux/4.6/../../../../x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/STATIC_LIBRARIES/libcompiler_rt_intermediates/libcompiler_rt.a(eprintf.o): unsupported reloc 43 against global symbol stderr
external/compiler-rt/lib/builtins/eprintf.c:32: error: unsupported reloc 43
collect2: ld returned 1 exit status
build/core/host_shared_library_internal.mk:44: recipe for target 'out/host/linux-x86/obj32/lib/libcompiler_rt.so' failed
make: *** [out/host/linux-x86/obj32/lib/libcompiler_rt.so] Error 1
make: *** Waiting for unfinished jobs....
host C++: libnativehelper_32 <= libnativehelper/JNIHelp.cpp
make: *** wait: No child processes. Stop.

#### make failed to build some targets (34:11 (mm:ss)) ####

解决办法:
修改:
在build/core/clang/Host_x86_common.mk
在第7 - 11行左右位置
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 \
-B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/bin \
-no-integrated-as
添加 -B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/bin \ 这行

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试