Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Need "wrapper" to compile the Linux kernel with ICC

TyMac
Beginner
5,005 Views

I am a developer with an idea to start a new kernel source for Gentoo that is specifically for the Intel ICC compiler. Evidentally there is a "wrapper" that is needed to be applied to the kernel source first before ICC can correctly complie the Linux kernel. Where can I get this wrapper? (I have looked all over the web but the only yhing I can find is old documentation)

0 Kudos
131 Replies
TyMac
Beginner
426 Views
0 Kudos
TyMac
Beginner
426 Views
FYI we have a fast new patch out for 64bit 2.6.32 and .33 kernels:
It has been tested to work with the latest version 11.1.064 and .059 compilers and kernel 2.6.32.7. earlier .32 kernels *do not* work, fyi!
This patch also fixes a nagging issue with icc compiled modules not working.
Benchmakrs are avaiable at linuxdna.com
Techsupport can be submitted at:
We are looking for developers who are intertested in working on the project! Please e-mail me at tyler@linuxdna.com if you are interested in any way contributing.

0 Kudos
blackburried
Beginner
426 Views

The "-fno-builtin" is not working on icc 11.1.

It keeps changing struct initializations to "_intel_fast_memset". We don't call memset.

We tried making a gcc wrapper that included _intel_fast_memset, but its args are obviously not the same as w/ memset.

0 Kudos
blackburried
Beginner
426 Views
Found the solution:

-ffreestanding

Thaidog: is that what you meant when you said:

[bash]This patch also fixes a nagging issue with icc compiled modules not working.[/bash]

... since I've moved on and my kernel modules still has some issues not present w/ gcc.
0 Kudos
Feilong_H_Intel
Employee
426 Views

blackburried,

Yes,-ffreestanding is what you need. You found it before I post this reply. :)

0 Kudos
blackburried
Beginner
426 Views

Everything seems to be working properly, except, I'm n ot seeing the expected benefit in performance from the Intel compiler in the module I'm compiling.

I'm compiling the .c's into .o's w/ icc, but linking the .ko's w/ gcc.

I'm worried that whatever architecture-specifc code icc sets up to choose from at load time is not being properly done w/ my methodology.

IIRC, when not specifying a specific architecture, icc has to create optimized code for all architectures and make the choice of which code to select at load time.

When is this done, and/or how do I ensure this is being done?

0 Kudos
Reply