You are not logged in.

#1 2004-02-17 13:47:02

malakas
Member
Registered: 2004-02-08
Posts: 28

kernel compile fail with CFLAGS

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[1]: *** [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?

Offline

#2 2004-02-17 15:59:44

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: kernel compile fail with CFLAGS

Don't use -O3 to compile your kernel...

Offline

#3 2004-02-17 19:44:47

malakas
Member
Registered: 2004-02-08
Posts: 28

Re: kernel compile fail with CFLAGS

Thanks it worked!But why not using -o3 or -ox?

Offline

#4 2004-02-17 21:24:35

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: kernel compile fail with CFLAGS

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.


AKA uknowme

I am not your friend

Offline

#5 2004-02-17 23:55:59

malakas
Member
Registered: 2004-02-08
Posts: 28

Re: kernel compile fail with CFLAGS

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?

Offline

#6 2004-02-18 03:12:32

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: kernel compile fail with CFLAGS

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...

Offline

Board footer

Powered by FluxBB