# Has anyone Managed to Build a kernel with icc?

## eldiablo

I wonder if anyone has managed to compile a kernel with ICC?

----------

## stonent

It can't be done from what I've read on some newsgroups.  ICC is not fully interchangable with GCC.  A newer version of ICC is in the works that will be more compatable with GCC and may work

----------

## discomfitor

interesting you should ask that.  a while back, I had a morbid fascination with icc and tried compiling just about everything with it.  if I recall correctly, I was using the 2.4 kernel and it either errored at something with xfs (which I can't live without) so I couldn't use it, or I may actually have wrangled it into working.  It's hard to remember because I also had my stage of too-much-optimization with gcc where I compiled the kernel with flags that were far too agressive for my own good.  One of them failed and one of them succeeded.

----------

## goanuj

I am in the process of trying this out right now.... the 2.6 make menuconfig looks a bit more mature than 2.4 but it is still a beast to manually select everything!  

I'll update you on the successes/failures that I encounter.

----------

## Moled

the mm patchset has had a load of stuff to make it work with gcc 3.4 and 3.5 so that probably would be your best bet

----------

## goanuj

Thanks for the notice, I will try it out.... unfortunately I found out that you need access to /sbin/depmod cuz the 2.6 kernel needs it to build modules properly.....  :Confused: 

----------

## goanuj

well i failed miserably  :Smile: 

```
the linux-2.6.1 # make

  CHK     include/linux/version.h

  HOSTCC  scripts/fixdep

icpcbin: Command line warning: ignoring option '-W'; no argument required

icpcbin: Command line warning: ignoring unknown option '-fomit-frame-pointer'

scripts/fixdep.c(143): warning #556: a value of type "void *" cannot be assigned                                            

 to an entity of type "char *"

                str_config = realloc(str_config, size_config *= 2);

                           ^

scripts/fixdep.c(277): warning #167: argument of type "void *" is incompatible w                                            

ith parameter of type "char *"

        parse_config_file(map, st.st_size);

                          ^

scripts/fixdep.c(286): warning #144: a value of type "void *" cannot be used to                                             

initialize an entity of type "char *"

        char *m = map;

                  ^

ld: unrecognized option '--compile_dependencies'

ld: use the --help option for usage information

make[1]: *** [scripts/fixdep] Error 1

make: *** [scripts] Error 2
```

maybe someone could help me out? I will try to update this with a link to my Makefile and icpc and icc (intel C compiler and Intel C++ compiler respectively) versions.  I also need help mapping gcc command line options to icpc (Intel C Compiler)

well folks, I just haven't been able to figure this one out, I posted to 

http://softwareforums.intel.com/ids/board/message?board.id=16&message.id=1304 and no one there had an answer either.

----------

## jtshaw

Well I finally got the 2.6.2 kernel to compile with the icc compiler... but there apparently is a big difference between compile and work:)  I am going to play around a little more and I'll let you know if I get it to actually boot.

----------

## goanuj

jtshaw, 

could you post the steps for compilation so that other users (like me   :Smile:  ) can at least try out the compilation?

----------

