Add some flags by default to gcc (preferably using specs file)
g++, gcc
Solution
Run `strace gcc | grep specs` to see where it is searching for the specs file, then go there and run `gcc -dumpspecs > specs`. You now have a specs file ready for editing. Use this reference: https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html
Problem
I want to let my `gcc` always add some flags by default, is there a clean way to do this? Basically I have some flags I pass every time I invoke `gcc`, for example (but not limited to) `-g` (so that it has debug information). There are several workarounds but they are ugly: - `alias g++=...`, but I don't like this approach; - Write a script that wraps around the g++, similar to 1; - ... I would prefer just modifying the specs file so that everything is seamless.