how do i pass my CFLAGS when compiling the Kernel?
Hi,
I have my CFLAGS="-blabla" and CXXFLAGS="-blabla" setted in my .bashrc file, and i can see that the optimizations are applied every time i compile some application (i actually see them printed many times among the lines scrolling in the console..) When i compile a Kernel, on the other hand, i have no feedback if the CFLAGS that are set in my .bashrc are taken in consideration or not... what can you tell me about this..? THX! Tomm |
Quote:
Code:
make V=1 ... |
THanks!!
great tip, i'll try it soon! but by the way, is .bashrc the right way to set the CFLAGS (i use Slackware 13) or are there better methods? Searching on google i saw someone putting the CFLAGS argument just after the make bzImage command... |
Quote:
Code:
export CFLAGS='-flag' Code:
make CFLAGS='-flag' As for if there are 'better' methods, I personally prefer to set CFLAGS on the make command-line, or manually in the environment before a particular compilation, and not in any configuration files. This is simply because I might forget about it and have it infest a compilation I don't want to. Oh, and just in case you're wanting to compile the kernel with `-O3' (I'm getting that feeling from you :p), you should definitely make sure you can compile a kernel AND get it working without setting any `-O*' CFLAGS - the Linux kernel is a big system, and if I remember correctly, compiling with `-O3' is basically guaranteed to break it. By all means try it, but make sure you can do it without -O3 first, so if it does fail to build/run, you know why. John G |
Thx JohnGraham, it worked fine!
bythe way my kernel compiled with -O3 and works! |
Quote:
John G |
All times are GMT -5. The time now is 10:50 PM. |