On Thu, Aug 08, 2002 at 09:01:01PM +0300, Shachar Shemesh wrote: > >>My question is, can I compile in the same command line some files under > >>-O1 and some under -O3? > > > >If they're going to be linked together, that's a very bad > >idea. Otherwise, you could probably do it with some Makefile hackery. > > > Baking powder?
Sorry, missed the reference? > If I can compile different files with different compilers and then link, > can't I compile them with different optimizations of the same compiler? > Do you know of any funky wierd stuff the gcc does in -O3 that break > linker compatibility? The biggest difference between O1 and O3 that I'm aware of is that inline functions will not necessarily be inlined in O1. However, I have to admit that my "don't do that" remark was off the cuff, and I can not not easily justify it now. I was thinking of kernel compilation, which requires -O2 (force inlining) and thus would break horribly if you compile some of the files with O1. -- "Hmm.. Cache shrink failed - time to kill something? Mhwahahhaha! This is the part I really like. Giggle." -- linux/mm/vmscan.c http://vipe.technion.ac.il/~mulix/ http://syscalltrack.sf.net
msg20886/pgp00000.pgp
Description: PGP signature