当编译一个ChibiOS-RT项目时,我在链接时得到了以下错误(使用arm-none eabi-gcc 4.8):
../../../../test/rt/test.c: In function 'TestThread':
../../../../test/rt/test.c:314:7: internal compiler error: Segmentation fault: 11
msg_t TestThread(void *p) {
^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: arm-none-eabi-gcc returned 1 exit status
/usr/gcc-arm-none-eabi-4_8-2013q4/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [build/ch.elf] Error 1在arm-none-eabi- 4.7中不会出现这种情况。
这是一个操作系统构建文件,所以我不想弄乱它--而且我从来没有见过gcc在构建时遇到分段错误。此外,在构建任何项目时都会发生这种情况,即使是在根ChibiOS存储库中完全不变的项目也是如此。
对诊断这个问题有什么建议吗?
发布于 2014-08-12 21:06:07
GCC 4.8不支持LTO和ggdb一起开启。只需禁用一个或另一个。
尝试配置您的Makefile:
USE_LTO = no或
USE_OPT = -O2 -fomit-frame-pointer -falign-functions=16不带-ggdb标志
https://stackoverflow.com/questions/23727587
复制相似问题