我安装了GNU ARM嵌入式工具链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
答案 0 :(得分:0)
GCC 4.8不支持同时启用LTO
和ggdb
。只需禁用一个或另一个。
尝试配置Makefile:
USE_LTO = no
或
USE_OPT = -O2 -fomit-frame-pointer -falign-functions=16
没有-ggdb标志