Reputation: 63
When compiling a ChibiOS-RT project, I get the following error at link time (with 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
This does NOT occur with arm-none-eabi-gcc 4.7.
This is one of the OS build files, so I don't want to mess with it -- and I've never seen gcc itself encounter a segmentation fault while building. Additionally, it occurs when building any of project, even ones entirely unchanged from the root ChibiOS repository.
Any advice on diagnosing this problem?
Upvotes: 5
Views: 1057
Reputation: 3269
GCC 4.8 does not support LTO
and ggdb
enabled together. Just disable one or another.
Try to configure your Makefile:
USE_LTO = no
or
USE_OPT = -O2 -fomit-frame-pointer -falign-functions=16
without -ggdb flag
Upvotes: 4