Compiler Optimisations
I would like to inquire about the method in which one passes compiler optimisations, when compiling large programs such as galeon. I edited a Makefile to reflect my prefrences which were:
Code:
-mcpu=athlon -march=athlon -g -O3 I have already come across a solution which involved setting environment variables and passing them to make but, the flags in the Makefiles also contain some custom arguements so compilation fails if I just set my optimisations in the shell and pass them to make. So my question is is there anyway to just append -mcpu=xxx -march=xxx and changing the default -O2 optimisation level to -O3 for multiple Makefiles ? Edit: spelling |
You have to pass appropriate parameter to make, read "install" info in source package carefully for detailed info.
If you want to use it permanently, add CFLAGS=.... and CXXFLAGS=.... variables to your /etc/profile |
...or you can simply use:
export CFLAGS='-march=athlon -g -O3' and/or other flags before running configure script. P.S.: I think -march option implies -mcpu. Check gcc info manual. |
All times are GMT -5. The time now is 04:31 AM. |