arm-none-eabi-gcc 4.8分段故障(ChibiOS-RT)

时间:2014-05-18 22:38:08

标签: c gcc arm

编译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-gcc 4.7不会发生这种情况。

这是操作系统构建文件之一,所以我不想搞砸它 - 我从未见过gcc本身在构建时遇到分段错误。此外,它在构建任何项目时发生,甚至是从根ChibiOS存储库完全不变的项目。

有关诊断此问题的建议吗?

1 个答案:

答案 0 :(得分:4)

GCC 4.8不支持同时启用LTOggdb。只需禁用一个或另一个。

尝试配置Makefile:

USE_LTO = no

USE_OPT = -O2 -fomit-frame-pointer -falign-functions=16

没有-ggdb标志