Well something really strange is happening when i try to complile my 2.6 kernel with these flags
make CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer" CXXFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"
In file included from include/linux/kernel_stat.h:5, from init/main.c:33: include/asm/irq.h:16:25: irq_vectors.h: No such file or directory In file included from init/main.c:33: include/linux/kernel_stat.h:28: error: `NR_IRQS' undeclared here (not in a function) make: *** [init/main.o] Error 1 make: *** [init] Error 2
i really dont understand why i am getting this error.I believe that i must include some features to my kernel config since i am trying to get the best out of it.Any help?
Don't use -O3 to compile your kernel...
Thanks it worked!But why not using -o3 or -ox?
not sure perhaps there is ionfo on google.com/linux. likely it is the extra instructions that are added with -O3 are not compatable with the kernel code. as for -Ox i don't know if your "x" is refrring to a number or actual option but i do know that -O2 works just fine and is generally a better flag anyway.
I am not your friend
aha i get it now.a s for ox my mistake it should be -on where n=1 2 3.does anyone know any other hardcore optimizations for kernel?
Simply don't do hardcore optimalization for your kernel, it is already optimized by hand where needed, so it shouldn't make that much difference. Don't do much else than -march=cputype, and best you can do is compiling it with a newer GCC version. It's better to keep it small by choosing only the features you need than to make it unstable or break it with extreme optimalizations that only work counter-productive like -O3. If you want something big and important to attack, then take a look at glibc...