2

我安装了 GNU ARM Embedded Toolchain gcc-arm-none-eabi

当我在https://github.com/ChibiOS/ChibiOS-RT的一个演示项目上运行 make 时

我收到此链接器错误

main.c: In function 'Thread1':
main.c:36:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
main.c: In function 'Thread2':
main.c:53:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
Linking build/ch.elf
main.c: In function 'main':
main.c:58:5: internal compiler error: Segmentation fault
 int main(void) {
     ^
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/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
4

1 回答 1

0

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

尝试配置您的 Makefile:

USE_LTO = no

或者

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

没有 -ggdb 标志

于 2014-08-12T13:12:07.377 回答