Reputation: 764
I try to include a file, I've defined in cmake.
-DUNINSTD_INC=$ENV{TARGET_FS}/usr/include/unistd.h
I checked this define and UNINSTD_INC is the correct filepath.
The code-snipped, which causes the segmentation fault is the following:
#define SURROUND(x) QUOTE(x)
#define QUOTE(x) #x
#include SURROUND(UNINSTD_INC)
If I compile the code, I get the following error:
unistd.h:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate.
Does somebody have an idea to fix this problem?
Or an other way to include a predefined file?
gcc version: gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
Upvotes: 8
Views: 9176
Reputation: 52548
The fix is easy: Write a bug report, find out who to send it to, and wait for a compiler version that fixes it, as suggested by the error message.
Upvotes: -5