linux 交叉编译(CC)开源库
--host:
arm-linux/arm-qnx
./configure --host=arm-linux --prefix=/your_workspace/install CC=/release_version/toolchains/aarch64--glibc--stable/bin/aarch64-linux-gcc
make && make install
--boost
./b2 install link=static toolset=qcc cxxflags="-Vgcc_ntoaarch64le" target-os=qnxnto --prefix=/your_install_path
gcc/5.3.0,gcc_ntoaarch64le; -Vgcc/8.3.0,gcc_ntoaarch64le
ARM:
1. ./bootstrap.sh
2. 修改project-config.jam
3. ./b2 install link=static toolset=gcc --no-samples --no-tests --prefix=/home/yexf/Downloads/boost_1_76_0/install
# B2 Configuration
# Automatically generated by bootstrap.sh
import option ;
import feature ;
# Compiler configuration. This definition will be used unless
# you already have defined some toolsets in your user-config.jam
# file.
if ! gcc in [ feature.values <toolset> ]
{
# using gcc ;
using gcc : : /work/sdk/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-gcc ;
}
project : default-build <toolset>gcc ;
# Python configuration
import python ;
if ! [ python.configured ]
{
using python : 2.7 : "/usr" ;
}
path-constant ICU_PATH : /usr ;
# List of --with-<library> and --without-<library>
# options. If left empty, all libraries will be built.
# Options specified on the command line completely
# override this variable.
libraries = ;
# These settings are equivalent to corresponding command-line
# options.
option.set prefix : /usr/local ;
option.set exec-prefix : /usr/local ;
option.set libdir : /usr/local/lib ;
option.set includedir : /usr/local/include ;
# Stop on first error
option.set keep-going : false ;
QNX7.1:
1. ./bootstrap.sh
2. 修改project-config.jam
3. ./b2 install toolset=qcc cxxflags="-Vgcc/8.3.0,gcc_ntoaarch64le" --without-python --without-context target-os=qnxnto --prefix=/home/yexf/Downloads/boost_1_76_0/install
using qcc : : /work/sdk/qnx7.1/host/linux/x86_64/usr/bin/qcc ;
上面指令如果无法对应可以指定architeure/address-model
./b2 install link=shared toolset=qcc cxxflags="-Vgcc/8.3.0,gcc_ntoaarch64le" linkflags="-Vgcc/8.3.0,gcc_ntoaarch64le" target-os=qnxnto architecture=arm address-model=64 --without-python
STRACE(aarch64) as follows:
1. bootstrap
2. ./configure CC=/work/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-gcc LD=/work/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-ld --host=aarch64-linux --target=aarch64-linux --prefix=/work/software/strace/strace/install --enable-mpers=no
3. make
4. make install
GCC(aarch64) as follows:
./configure CC=/work/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-gcc CXX=/work/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-g++ AR=/work/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-ar LD=/work/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-ld --host=aarch64-linux --target=aarch64-linux --prefix=/work/software/gdb/gdb-13.2/install
configure: error: GMP is missing or unusable
如果提示缺少GMP,则需要重新编译GMP,再用--with-libgmp-prefix=/your_gmp_install_path, 这个path里面包括include和lib
指定gmp路径:
./configure CC=/work/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-gcc CXX=/work/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-g++ AR=/work/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-ar LD=/work/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-ld --host=aarch64-linux --target=aarch64-linux --prefix=/work/software/gdb/gdb-13.2/install --with-libgmp-prefix=/work/software/gmp/gmp-6.3.0/install
GMP(aarch64) as follows:
./configure CC=/work//toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-gcc CXX=/work/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-g++ AR=/work/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-ar LD=/work/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-ld --host=aarch64-linux --target=aarch64-linux --prefix=/work/software/gmp/gmp-6.3.0/install
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现