I'm trying to get together a bunch of executables that have different optimizations run on them. My only question is, should gcc commands with -c also be able to use -O flags as well? I ask this, because I realize when I only place the optimization flag in the gcc command to make the exe, the sizes do not differ between files at all, which doesn't seem right.
For example, I have something like this:
g++ -c cat.cpp g++ -c dog.cpp g++ cat.o dog.o -o catdog Would I use the flags on everything like this:
g++ -c -O2 sobol.cpp g++ -c -O2 sobol_prb.cpp g++ sobol.o sobol_prb.o -O2 -o catdog02 If anyone could help me out, I'd greatly appreciate it.
Thank you.