C++ - Boost arm (aarch64) 交叉编译问题

ISherry
  • 881

I've tried ver. 1.64.0. Cross-compilation for aarch64
boost采用1.64.0版本;交叉编译的使用平台式centos 7,目标平台是aarch64;交叉编译工具

第一步:

./bootstrap.sh

第二步:

修改 project-config.jam 如下:

...
if ! gcc in [ feature.values <toolset> ]
{
    using gcc : arm : /home/xxx/arm/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc ; 
}
...
# These settings are equivivalent to corresponding command-line
# options.
option.set prefix : /home/xxx/arm/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu ;
option.set exec-prefix : /home/xxx/arm/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/bin ;
option.set libdir : /home/xxx/arm/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/lib ;
option.set includedir : /home/xxx/arm/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/include ;
...

错误信息:

./b2 link=static --without-python --without-context --without-coroutine --no-samples --no-tests --stagedir=stage-aarch64 -j4 stage

This gives me an error like:

gcc.compile.c++ bin.v2/libs/context/build/gcc-arm/release/link-static/threading-multi/unsupported.o
libs/context/src/unsupported.cpp:7:2: error: #error "platform not supported"
 #error "platform not supported"
  ^~~~~

    "/home/xxx/arm/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread  -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE -DBOOST_DISABLE_ASSERTS -DNDEBUG  -I"." -c -o "bin.v2/libs/context/build/gcc-arm/release/link-static/threading-multi/unsupported.o" "libs/context/src/unsupported.cpp"

...failed gcc.compile.c++ bin.v2/libs/context/build/gcc-arm/release/link-static/threading-multi/unsupported.o...

尝试过采用bjam 替代b2,也没有用

请问谁有遇到过类似问题

回复
阅读 6.4k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏