arm-linux-gnueabihf-gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0交叉编译工具链版本 应该选择那个版本号的arm-linux-gnueabihf-gdb
时间: 2023-07-31 13:13:20 浏览: 61
你应该选择与交叉编译工具链版本相同的 arm-linux-gnueabihf-gdb 版本号。这可以确保编译和调试工具的兼容性。如果你使用的是 Ubuntu 20.04.1,那么你应该选择相应的 arm-linux-gnueabihf-gdb 版本。可以使用以下命令来查看可用的版本:
```
apt list -a gdb-multiarch
```
然后安装相应版本的 gdb-multiarch:
```
sudo apt-get install gdb-multiarch=版本号
```
请将“版本号”替换为你想要安装的版本号。
相关问题
arm-linux-gnueabihf-gcc --version arm-linux-gnueabihf-gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
根据你提供的信息,你使用的是Ubuntu 20.04版本的arm-linux-gnueabihf-gcc交叉编译工具链,版本号为9.4.0。这个版本的交叉编译工具链应该是支持硬浮点运算的。
至于为什么ledtest文件还是共享对象文件,需要检查编译命令是否正确。你可以尝试使用如下命令重新编译:
```
arm-linux-gnueabihf-gcc -o ledtest ledtest.c
```
如果你想生成带调试信息的可执行文件,可以使用如下命令:
```
arm-linux-gnueabihf-gcc -g -o ledtest ledtest.c
```
如果以上命令都不能解决问题,可以尝试重新配置交叉编译工具链,或使用其他交叉编译工具链进行编译。
我交叉编译链为arm-none-linux-gnueabihf-gcc,应该怎么配置呢
如果你的交叉编译工具链的前缀为 `arm-none-linux-gnueabihf-`,则可以将 `--host` 参数设置为 `arm-none-linux-gnueabihf`,将 `--with-cross-prefix` 参数设置为 `arm-none-linux-gnueabihf-`,如下所示:
```
./configure --host=arm-none-linux-gnueabihf --prefix=/usr/local \
--with-cross-prefix=arm-none-linux-gnueabihf- \
--enable-static --disable-shared
```
这样,`configure` 脚本就会使用你的交叉编译工具链来编译 `stressapptest`,并生成针对 ARM 架构的目标代码。