This is generally an issue with gcc4. Not sure why, some people get it and others do not. BTW, with gcc4 you should make sure that stack smashing protection is not being run.
If you are using Debian or Ubuntu (or its siblings, Kubuntu, Xubuntu, etc)... then it will be enabled by default in the kernel somewhere. You can disable it in your makefile though using:
That flag is pretty useless for gaming as it just errors out during run-time. Most people want to debug their stuff at compile time. ;x
I use SCons
for my building now anyway, which uses gcc/g++ but its more efficient at being cross-platform and automake and what not just don't cut it for me. Plus python rocks for building configurations... I borrowed mine from the ETPub