依赖工具termcap编译
下载地址:
https://mirrors.sjtug.sjtu.edu.cn/gnu/termcap/termcap-1.3.1.tar.gz
交叉编译:
./configure --host=xxxx --target=xxx --prefix=xxxx//install
交叉编译且install后,可以在编译gdb时指定外部连接库,也可以直接放进交叉工具链路径
cp -r install/include/termcap/*.h /xxxxx/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include/
cp install/lib/*.a /xxxx/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib/
gdb交叉编译
源码下载自行百度,不同的平台可能有些版本难编译过,此时可以多换几个版本编译,笔者用过7.10/7.6.1/7.8.1
./configure --target=xxx --host=xxx --prefix=$(pwd)/../gdb_out/ CC="xxx-gcc --sysroot=libc路径" CFLAG