I've added a GNU toolchain in (modified) Eclipse and I'm having the issue of *.c files being compiled with g++ instead of gcc.
I've tried:
Tweaking the C/C++ General -> File Types project properties page. This establishes the connection file-extension -> file-type (e.g. *.c -> C Source File).
Tweaking the C/C++ General -> Language Mappings project properties page. This one continues the chain from file-type -> language-type (e.g. C Source File -> GNU C).
Resetting up the toolchain, a few times :)
So what I have now is *.c -> C Source File -> GNU C. I'm guessing somewhere (maybe toolchain settings which I couldn't find, configuration files?) there's also currently a GNU C -> g++.exe connection. I need to change that to GNU C -> gcc.exe:
I also see a duplicate entry of GNU C at C/C++ General -> Paths and Symbols -> Includes -> Languages.
I'm hoping someone has hit a similar issue and can give me some (highly appreciated) hints.
Update:
I've also noticed a tool-conflict issue when inspecting the toolchain tool-list:
I have no idea what weird Eclipse bug causes this, but found a workaround.
Use the MinGW GCC toolchain instead (ignore the benign warning in the image, yet another Eclipse CDT bug):
and set MINGW_HOME, MSYS_HOME and PATH manually to the wanted values: