Need "wrapper" to compile the Linux kernel with ICC

132 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Quoting - thaidog

Quoting - newper

Quoting - thaidog

Quoting - thaidog

I could never see it... it scrolled by to fast!

Well anyone on ideas as to what is causing this error?

I find a way,it's very bad,but it works well on my machine.
I noticed that we changed mca.c for a little before,and I also noticed that the 2.6.18 kernel could be compiled well by the icc.But the 2.6.18 one doesn't have mca.c in that directory.I findout that the kernel doesn't contain mca.c in arch/i386/boot until 2.6.23.So I compiled the kernel using the following steps:
I download 2.6.22.19 version (the last stable version of 2.6.22 branch) and 2.6.28.2 (current stable version)
Unpack them and make some changes (only on the first page of this thread).
Generate config file for both kernels.
Run make HOSTCC=intelwraper CC=intelwrapper AR=xiar LD=xild vmlinux for these two kernels.
Then replace the vmlinux in 2.6.22 kernel directory with the one in 2.6.28 kernel directory.
Run make in 2.6.22 kernel directory ,the bzImage will be created.

I test it with icc 10.1.021

Now that's a cool hack! Did the kernel actually boot this time?

It works well
cat /proc/version
Linux version 2.6.28.2 (root@localhost) (Version 10.1 ) #1 Fri Jan 30 14:23:26 CST 2009

Quoting - newper

Quoting - thaidog

Quoting - newper

Quoting - thaidog

Quoting - thaidog

I could never see it... it scrolled by to fast!

Well anyone on ideas as to what is causing this error?

I find a way,it's very bad,but it works well on my machine.
I noticed that we changed mca.c for a little before,and I also noticed that the 2.6.18 kernel could be compiled well by the icc.But the 2.6.18 one doesn't have mca.c in that directory.I findout that the kernel doesn't contain mca.c in arch/i386/boot until 2.6.23.So I compiled the kernel using the following steps:
I download 2.6.22.19 version (the last stable version of 2.6.22 branch) and 2.6.28.2 (current stable version)
Unpack them and make some changes (only on the first page of this thread).
Generate config file for both kernels.
Run make HOSTCC=intelwraper CC=intelwrapper AR=xiar LD=xild vmlinux for these two kernels.
Then replace the vmlinux in 2.6.22 kernel directory with the one in 2.6.28 kernel directory.
Run make in 2.6.22 kernel directory ,the bzImage will be created.

I test it with icc 10.1.021

Now that's a cool hack! Did the kernel actually boot this time?

It works well
cat /proc/version
Linux version 2.6.28.2 (root@localhost) (Version 10.1 ) #1 Fri Jan 30 14:23:26 CST 2009

This is seriously good news!! I would like to ask you if you wil help me spread word of your success gettting this to work... about a month ago I set up a mirror so that when the source could actually work it could put it there so that people and organizations could download it and use it for their systems. What do you think?

I'm glad to help you,but it's difficult to compile a kernel using my 'hack'.If anybody wants to use my 'hack',he needs to download two kernel sources tarballs,compile the kernel over two times,replace ...
And I'm not sure it works on all the machines,because I replace a part of the new kernel with an old one(2.6.22).We need more tests.What do you think?

Quoting - newper

I'm glad to help you,but it's difficult to compile a kernel using my 'hack'.If anybody wants to use my 'hack',he needs to download two kernel sources tarballs,compile the kernel over two times,replace ...
And I'm not sure it works on all the machines,because I replace a part of the new kernel with an old one(2.6.22).We need more tests.What do you think?

Yes I think you are right... but 2.6.22 would work without having to hack anything right? In any case we could tar ball your source and put it on the mirror for proof of concept until we get past all the tricky issues. I think the fact that you actually got it working will stir up serious interest! Is that ok with you? What cpu are you using or this?

Also i am running in to this error when I try to compile the 2.6.22 kernel:

icc: command line error: invalid argument for option '-m'
make[1]: ***[arch/i386/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2

Quoting - thaidog

Quoting - newper

I'm glad to help you,but it's difficult to compile a kernel using my 'hack'.If anybody wants to use my 'hack',he needs to download two kernel sources tarballs,compile the kernel over two times,replace ...
And I'm not sure it works on all the machines,because I replace a part of the new kernel with an old one(2.6.22).We need more tests.What do you think?

Yes I think you are right... but 2.6.22 would work without having to hack anything right? In any case we could tar ball your source and put it on the mirror for proof of concept until we get past all the tricky issues. I think the fact that you actually got it working will stir up serious interest! Is that ok with you? What cpu are you using or this?

Also i am running in to this error when I try to compile the 2.6.22 kernel:

icc: command line error: invalid argument for option '-m'
make[1]: ***[arch/i386/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2

I changed the intel wrapper a little
Add | -maccumulate-outgoing-args after -ffreestanding

The 2.6.22 kernel should be compiled and work fine after the change of the icc wrapper.But I didn't test the modules.
In fact,you successfully built the 2.6.25 kernel a month ago,but it's just the 'vmlinux' not 'bzImage',then we edit the mca.c file but it cannot boot.So my plan is to use 2.6.22's tools to create bzImage for 2.6.2x's vmlinux.
I noticed that there are a lot of asm codes in the tools which create bzImage after 2.6.23.Perhaps icc cannot handle asm codes well ?In icc 11.0,nearly all files in arch/x86/boot are failed to compile.I think that will explain why we compiled the kernel successfully after a lot of modify but cannot boot.

Quoting - newper

Quoting - thaidog

Quoting - newper

I'm glad to help you,but it's difficult to compile a kernel using my 'hack'.If anybody wants to use my 'hack',he needs to download two kernel sources tarballs,compile the kernel over two times,replace ...
And I'm not sure it works on all the machines,because I replace a part of the new kernel with an old one(2.6.22).We need more tests.What do you think?

Yes I think you are right... but 2.6.22 would work without having to hack anything right? In any case we could tar ball your source and put it on the mirror for proof of concept until we get past all the tricky issues. I think the fact that you actually got it working will stir up serious interest! Is that ok with you? What cpu are you using or this?

Also i am running in to this error when I try to compile the 2.6.22 kernel:

icc: command line error: invalid argument for option '-m'
make[1]: ***[arch/i386/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2

I changed the intel wrapper a little
Add | -maccumulate-outgoing-args after -ffreestanding

hmm now I'm getting this error:

include/linux/compiler-intel.h(31): error #11: unrecognized preprocessing directive
#undef_compiler_offsetof
^

arch/i386/kernel/asm-offsets.c(29): warning #1419: external declaration in primary source file
void foo(void);
^

compilation aborted for arch/i386/kernel/asm-offsets.c (code 2)
make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 2
make: *** [prepare0] Error 2

I am using icc version 10.1.018 is that it? I changed the wrapper to look like this:

--------------------------------------------------------

# This is a wrapper script for icc 10.1 on IA-32

#--------------------------------------------------------

ARGS=$@

ICCARGS="-fno-builtin"

# For loop to change options of icc

for ARG in $@

do

case $ARG in

-fno-stack-protector )

ICCARGS="$ICCARGS -fno-stack-security-check"

;;

-Wno-pointer-sign | -msoft-float | -ffreestanding | -maccumulate-outgoing-args )

;;

* )

ICCARGS="$ICCARGS $ARG"

;;

esac

done

icc $ICCARGS

##########################################################

Does that look right? I only did that and the edits to the files on the first page like you said.

###########################

That ASM code error sounds right to me... Although I am not known as a "kernel hacker" ;) We had to change a little of that already. So do you think that the issue is isloated to the mca.o and arch/x86/boot ?

As soon as I can get a working copy up to my mirror I have a few tech writters who are interested in your success (everybody who contributed in this thread will get credit I promise!) I plan to make a few clusters with these kernels to test the performance when I get a chance. If you want you can reach me via e-mail: at tyler@mcadams.com It would be good to have your name so that you can recieve full credit - (granted you want credit that way)

I will give you a user account an password to my mirror if you would like also.

#undef_compiler_offsetof
have a mistake?
it's #undef __compiler_offsetof

Quoting - newper

#undef_compiler_offsetof
have a mistake?
it's #undef __compiler_offsetof

Sorry I'm a bit excited right now! It is up and working on my machine - IT'S A MIRACLE!!!

cat /proc/version
Linux version 2.6.22 (root@localhost) (Version 10.1 ) #2 SMP Wed Feb 4 00:26:42 EST 2009

Congradulations! Simply amazing!

Quoting - newper

The 2.6.22 kernel should be compiled and work fine after the change of the icc wrapper.But I didn't test the modules.
In fact,you successfully built the 2.6.25 kernel a month ago,but it's just the 'vmlinux' not 'bzImage',then we edit the mca.c file but it cannot boot.So my plan is to use 2.6.22's tools to create bzImage for 2.6.2x's vmlinux.
I noticed that there are a lot of asm codes in the tools which create bzImage after 2.6.23.Perhaps icc cannot handle asm codes well ?In icc 11.0,nearly all files in arch/x86/boot are failed to compile.I think that will explain why we compiled the kernel successfully after a lot of modify but cannot boot.

Ok the 2.6.22 kernel is up at: www.linuxdna.com

Feilong any ideas about the ASM code that we are having issues with?

Quoting - thaidog

Ok the 2.6.22 kernel is up at: www.linuxdna.com

Feilong any ideas about the ASM code that we are having issues with?

Glad to see you guys having the kernel running. Congratulations!

Regarding the asm code in arch/x86/boot, I didn't get a chance to compilethe files in that directorywith icc 11.0 yet. Do you have the error message for that problem? If you can show me the command line, that's even better.

Quoting - Feilong H (Intel)

Quoting - thaidog

Ok the 2.6.22 kernel is up at: www.linuxdna.com

Feilong any ideas about the ASM code that we are having issues with?

Glad to see you guys having the kernel running. Congratulations!

Regarding the asm code in arch/x86/boot, I didn't get a chance to compilethe files in that directorywith icc 11.0 yet. Do you have the error message for that problem? If you can show me the command line, that's even better.

I need some time to get the error message ,but I can remember it's something like Internal Error (I didn't modify mca.a).And some other file in that directory like video-*.c also cannot be compiled by icc 11.0.069,it also says Internal Error

Quoting - newper

I need some time to get the error message ,but I can remember it's something like Internal Error (I didn't modify mca.a).And some other file in that directory like video-*.c also cannot be compiled by icc 11.0.069,it also says Internal Error

Did you try 11.0.074? If you can provide me a preprocessed code, I'd be happy to see if I can reproduce the problem on my machine.

Quoting - Feilong H (Intel)

Quoting - newper

I need some time to get the error message ,but I can remember it's something like Internal Error (I didn't modify mca.a).And some other file in that directory like video-*.c also cannot be compiled by icc 11.0.069,it also says Internal Error

Did you try 11.0.074? If you can provide me a preprocessed code, I'd be happy to see if I can reproduce the problem on my machine.

I'll have a try.

PS:11.0 is toolarge,need some time to download

Thaidog,I noticed you wrote this on the website
make HOSTCC=intelwrapper CC=intelwrapper
But I believe this will be better
make HOSTCC=intelwrapper CC=intelwrapper Ar=xiar LD=xild

Quoting - newper

Thaidog,I noticed you wrote this on the website
make HOSTCC=intelwrapper CC=intelwrapper
But I believe this will be better
make HOSTCC=intelwrapper CC=intelwrapper Ar=xiar LD=xild

Cool! What does that add?

I am also making a gentoo virtual machine that will run on vmware player so we can all have a solid testing bed.

Quoting - thaidog

Quoting - newper

Thaidog,I noticed you wrote this on the website
make HOSTCC=intelwrapper CC=intelwrapper
But I believe this will be better
make HOSTCC=intelwrapper CC=intelwrapper Ar=xiar LD=xild

Cool! What does that add?

I am also making a gentoo virtual machine that will run on vmware player so we can all have a solid testing bed.

That tells the compiler to use intel's ar and ld instead of the gnu's

Quoting - newper

That tells the compiler to use intel's ar and ld instead of the gnu's

I see! Does that add better performance? (just added it to the site)

Quoting - thaidog

Quoting - newper

That tells the compiler to use intel's ar and ld instead of the gnu's

I see! Does that add better performance? (just added it to the site)

I don't know.My 2.6.28.2 kernel has been run on my machine for several days,but I didn't feel any obvious differences.
I see you are preparing a VM,could you provide two or more versions of icc in it?(like icc10.1 icc11).
If everything goes well,I'm going to change the CFLAGS(like from -O2 to -O3),So we need a software or something to test the performance.Any suggestions?

Quoting - newper

Quoting - thaidog

Quoting - newper

That tells the compiler to use intel's ar and ld instead of the gnu's

I see! Does that add better performance? (just added it to the site)

I don't know.My 2.6.28.2 kernel has been run on my machine for several days,but I didn't feel any obvious differences.
I see you are preparing a VM,could you provide two or more versions of icc in it?(like icc10.1 icc11).
If everything goes well,I'm going to change the CFLAGS(like from -O2 to -O3),So we need a software or something to test the performance.Any suggestions?

I could make serveral VMs... one for each ICC version. Not sure if we can use serveral but I'm guessing it's possible... Feilong any suggestions? How about benchmarking the kernel? I will ask my good buddy who is a kernel developer as to what he uses too.

Quoting - thaidog

Quoting - newper

Quoting - thaidog

Quoting - newper

That tells the compiler to use intel's ar and ld instead of the gnu's

I see! Does that add better performance? (just added it to the site)

I don't know.My 2.6.28.2 kernel has been run on my machine for several days,but I didn't feel any obvious differences.
I see you are preparing a VM,could you provide two or more versions of icc in it?(like icc10.1 icc11).
If everything goes well,I'm going to change the CFLAGS(like from -O2 to -O3),So we need a software or something to test the performance.Any suggestions?

I could make serveral VMs... one for each ICC version. Not sure if we can use serveral but I'm guessing it's possible... Feilong any suggestions? How about benchmarking the kernel? I will ask my good buddy who is a kernel developer as to what he uses too.

Hi
Thank that for your work rebuild kernel with icc
Can you evaluate improved resulting
personally i have rebuild several programs and lib with
Suse 11 (32 bits) P4 I have observed improve same 10-15%
I think that you must making also build some lib and
programs
with icc to evaluate really result effect your new kernel.

Also i think that is very difficult to evaluate just with improve speed result
I wait new machine Core I7 for make experience if i have time and customer can wait some days ...
Best regards

Quoting - bustaf

Hi
Thank that for your work rebuild kernel with icc
Can you evaluate improved resulting
personally i have rebuild several programs and lib with
Suse 11 (32 bits) P4 I have observed improve same 10-15%
I think that you must making also build some lib and
programs
with icc to evaluate really result effect your new kernel.

Also i think that is very difficult to evaluate just with improve speed result
I wait new machine Core I7 for make experience if i have time and customer can wait some days ...
Best regards

I plan on making several vm availabe that will have differnt levels of icc builds. One just the kernel and others with more libs and programs icc compiled.

I was planning on using these flags for building on a P4 system:

ICCCFLAGS="-03 -xW -ipo -gcc"

Are these good flags or are there better ones to use?

Quoting - thaidog

Quoting - bustaf
Hi
Thank that for your work rebuild kernel with icc
Can you evaluate improved resulting
personally i have rebuild several programs and lib with
Suse 11 (32 bits) P4 I have observed improve same 10-15%
I think that you must making also build some lib and
programs
with icc to evaluate really result effect your new kernel.

Also i think that is very difficult to evaluate just with improve speed result
I wait new machine Core I7 for make experience if i have time and customer can wait some days ...
Best regards

I plan on making several vm availabe that will have differnt levels of icc builds. One just the kernel and others with more libs and programs icc compiled.

I was planning on using these flags for building on a P4 system:

ICCCFLAGS="-03 -xW -ipo -gcc"

Are these good flags or are there better ones to use?

Hi
About flag parameter 02 03 ... I have small experience Icc compiler for given councils but i
think that you can editing your config file kernel and request help Intel engineers about parameters
that can result bad or well for the icc compiler.
Some time,just to change one parameter can result dark into light
Best regards

Quoting - bustaf

Quoting - thaidog

Quoting - bustaf
Hi
Thank that for your work rebuild kernel with icc
Can you evaluate improved resulting
personally i have rebuild several programs and lib with
Suse 11 (32 bits) P4 I have observed improve same 10-15%
I think that you must making also build some lib and
programs
with icc to evaluate really result effect your new kernel.

Also i think that is very difficult to evaluate just with improve speed result
I wait new machine Core I7 for make experience if i have time and customer can wait some days ...
Best regards

I plan on making several vm availabe that will have differnt levels of icc builds. One just the kernel and others with more libs and programs icc compiled.

I was planning on using these flags for building on a P4 system:

ICCCFLAGS="-03 -xW -ipo -gcc"

Are these good flags or are there better ones to use?

Hi
About flag parameter 02 03 ... I have small experience Icc compiler for given councils but i
think that you can editing your config file kernel and request help Intel engineers about parameters
that can result bad or well for the icc compiler.
Some time,just to change one parameter can result dark into light
Best regards

Cool. I am uploading the Gentoo Linux project vm right now so we can all tweak away on the same platform. I am having trouble right now compliling the kernel though... I got:

455 section headers supported: 100
make[2]: *** [arch/i386/boot/compresses/vmlinux.relocs] Error 1
make[1]: *** [arch/i386/boot/compressed/vmlinux] Error 2
make: *** [bzImage] Error 2

Not sure what I did wrong but it's the same patched source and wrapper that I compiled correctly on my other dev box.

You can download the test vm at:

http://www.linuxdna.com/gentoo_icc_cleanvm.tar.gz

root pw: password - Should be finished uploading in about 1 hour or so. I'll have a few more vm's uploaded once we get past this error too.

Feilong and newper... please e-mail me or give me a way to contact you... I have so big new to share with you but I want to do so in private first ;)

Ok we have a development vm that can be downloaded at:

http://www.lnuxdna.com/icc_dev_vm.tar.lzma

It could be bneficial to use this vm so we are all working with the same code base. You will need a P4 or later to run the VM. It was compiled with P4 complie flags - every package included since it's a Gentoo Linux vm.

root password: password

You will need VMware Player, Workstation or Server to run this vm.I am also working on a VirtualBox vm.

Quoting - thaidog
Ok we have a development vm that can be downloaded at:

http://www.lnuxdna.com/icc_dev_vm.tar.lzma

It could be bneficial to use this vm so we are all working with the same code base. You will need a P4 or later to run the VM. It was compiled with P4 complie flags - every package included since it's a Gentoo Linux vm.

root password: password

You will need VMware Player, Workstation or Server to run this vm.I am also working on a VirtualBox vm.

Hi
you have fault syntax in your link
Is wrote http://www.lnuxdna.com/icc_dev_vm.tar.lzma
But are
http://www.linuxdna.com/icc_dev_vm.tar.lzma
Also
I am sorry that i can not make immediately
I have an task with RS/6000 AIX must be finished this week
Best regards

Quoting - bustaf

Hi
you have fault syntax in your link
Is wrote http://www.lnuxdna.com/icc_dev_vm.tar.lzma
But are
http://www.linuxdna.com/icc_dev_vm.tar.lzma
Also
I am sorry that i can not make immediately
I have an task with RS/6000 AIX must be finished this week
Best regards

Whoops! sorry about that! (I'm always in such a rush)

I'm trying to compile the kernel (2.6.22.19)with icc 11.But the problem get worse,it cannot build vmlinux.

/opt/intel/Compiler/11.0/074/lib/ia32/libirc_s.a(intel_stubs.o): In function `_intel_fast_calloc':
libirc_s/intel_stubs.c:(.text+0xd): undefined reference to `malloc'
make: *** [.tmp_vmlinux1] Error 1

I think malloc is in libc.a,so I let the compiler link libc.a and libgcc_eh.a(libc.a needs it).
Then the compiler says multiple definition of mktime,so I add -Dmktime=kernel_mktime to the CFLAGS.
Then it finish compiling,but cannot boot.This time the screen scroll for a second,at the end it says kernel trap.

Quoting - newper

I'm trying to compile the kernel (2.6.22.19)with icc 11.But the problem get worse,it cannot build vmlinux.

/opt/intel/Compiler/11.0/074/lib/ia32/libirc_s.a(intel_stubs.o): In function `_intel_fast_calloc':
libirc_s/intel_stubs.c:(.text+0xd): undefined reference to `malloc'
make: *** [.tmp_vmlinux1] Error 1

I think malloc is in libc.a,so I let the compiler link libc.a and libgcc_eh.a(libc.a needs it).
Then the compiler says multiple definition of mktime,so I add -Dmktime=kernel_mktime to the CFLAGS.
Then it finish compiling,but cannot boot.This time the screen scroll for a second,at the end it says kernel trap.

Well good to see it at least compiled! Feilong do you think you know what is going on?

I aslo just added a gentoo stage3 tarball for anybody who would like to try the kernel on an actual machine with Gentoo:

http://www.linuxdna.com/stage3_icc_dna.tar.bz2

Quoting - newper

I'm trying to compile the kernel (2.6.22.19)with icc 11.But the problem get worse,it cannot build vmlinux.

/opt/intel/Compiler/11.0/074/lib/ia32/libirc_s.a(intel_stubs.o): In function `_intel_fast_calloc':
libirc_s/intel_stubs.c:(.text+0xd): undefined reference to `malloc'
make: *** [.tmp_vmlinux1] Error 1

I think malloc is in libc.a,so I let the compiler link libc.a and libgcc_eh.a(libc.a needs it).
Then the compiler says multiple definition of mktime,so I add -Dmktime=kernel_mktime to the CFLAGS.
Then it finish compiling,but cannot boot.This time the screen scroll for a second,at the end it says kernel trap.

Well good to see it at least compiled! Feilong do you think you know what is going on?

I aslo just added a gentoo stage3 tarball for anybody who would like to try the kernel on an actual machine with Gentoo:

http://www.linuxdna.com/stage3_icc_dna.tar.bz2

Quoting - newper

I'm trying to compile the kernel (2.6.22.19)with icc 11.But the problem get worse,it cannot build vmlinux.

/opt/intel/Compiler/11.0/074/lib/ia32/libirc_s.a(intel_stubs.o): In function `_intel_fast_calloc':
libirc_s/intel_stubs.c:(.text+0xd): undefined reference to `malloc'
make: *** [.tmp_vmlinux1] Error 1

I think malloc is in libc.a,so I let the compiler link libc.a and libgcc_eh.a(libc.a needs it).
Then the compiler says multiple definition of mktime,so I add -Dmktime=kernel_mktime to the CFLAGS.
Then it finish compiling,but cannot boot.This time the screen scroll for a second,at the end it says kernel trap.

This is a known issue in libirc_s.a from icc 11.0.074. Engineering is fixing it. Before that, you may use this workaround.

Open your intelwrapper script. At the beginning, there is a variable named ICCARGS. Please add -ffreestanding to that line as below.
ICCARGS="-ffreestanding"

Now, it should be okay to drop libirc_s.a during linking. Please let me know if this workaround works.

Quoting - Feilong H (Intel)

Quoting - newper

I'm trying to compile the kernel (2.6.22.19)with icc 11.But the problem get worse,it cannot build vmlinux.

/opt/intel/Compiler/11.0/074/lib/ia32/libirc_s.a(intel_stubs.o): In function `_intel_fast_calloc':
libirc_s/intel_stubs.c:(.text+0xd): undefined reference to `malloc'
make: *** [.tmp_vmlinux1] Error 1

I think malloc is in libc.a,so I let the compiler link libc.a and libgcc_eh.a(libc.a needs it).
Then the compiler says multiple definition of mktime,so I add -Dmktime=kernel_mktime to the CFLAGS.
Then it finish compiling,but cannot boot.This time the screen scroll for a second,at the end it says kernel trap.

This is a known issue in libirc_s.a from icc 11.0.074. Engineering is fixing it. Before that, you may use this workaround.

Open your intelwrapper script. At the beginning, there is a variable named ICCARGS. Please add -ffreestanding to that line as below.
ICCARGS="-ffreestanding"

Now, it should be okay to drop libirc_s.a during linking. Please let me know if this workaround works.

Is the intel wrapper like this ?

#--------------------------------------------------------

# This is a wrapper script for icc 10.1 on IA-32

#--------------------------------------------------------

ARGS=$@

ICCARGS="-fno-builtin -ffreestanding"

# For loop to change options of icc

for ARG in $@

do

case $ARG in

-fno-stack-protector )

ICCARGS="$ICCARGS -fno-stack-security-check"

;;

-Wno-pointer-sign | -msoft-float | -maccumulate-outgoing-args )

;;

* )

ICCARGS="$ICCARGS $ARG"

;;

esac

done

icc $ICCARGS

exit $?

If drop it the error will be
kernel/built-in.o: In function `ns_to_timespec':
(.text+0x9486): undefined reference to `__divdi3'
kernel/built-in.o: In function `ns_to_timespec':
(.text+0x94c3): undefined reference to `__divdi3'
kernel/built-in.o: In function `ns_to_timeval':
(.text+0x95a2): undefined reference to `__divdi3'
kernel/built-in.o: In function `ns_to_timeval':
(.text+0x95df): undefined reference to `__divdi3'
kernel/built-in.o: In function `set_normalized_timespec':
(.text+0x9651): undefined reference to `__divdi3'
kernel/built-in.o:(.text+0x9690): more undefined references to `__divdi3' follow
make: *** [.tmp_vmlinux1] Error 1

If link with libirc_s.a it cannot boot
If link with libgcc.a the screen scroll then kernel trap

Quoting - newper

Is the intel wrapper like this ?

#--------------------------------------------------------

# This is a wrapper script for icc 10.1 on IA-32

#--------------------------------------------------------

ARGS=$@

ICCARGS="-fno-builtin -ffreestanding"

# For loop to change options of icc

for ARG in $@

do

case $ARG in

-fno-stack-protector )

ICCARGS="$ICCARGS -fno-stack-security-check"

;;

-Wno-pointer-sign | -msoft-float | -maccumulate-outgoing-args )

;;

* )

ICCARGS="$ICCARGS $ARG"

;;

esac

done

icc $ICCARGS

exit $?

If drop it the error will be
kernel/built-in.o: In function `ns_to_timespec':
(.text+0x9486): undefined reference to `__divdi3'
kernel/built-in.o: In function `ns_to_timespec':
(.text+0x94c3): undefined reference to `__divdi3'
kernel/built-in.o: In function `ns_to_timeval':
(.text+0x95a2): undefined reference to `__divdi3'
kernel/built-in.o: In function `ns_to_timeval':
(.text+0x95df): undefined reference to `__divdi3'
kernel/built-in.o: In function `set_normalized_timespec':
(.text+0x9651): undefined reference to `__divdi3'
kernel/built-in.o:(.text+0x9690): more undefined references to `__divdi3' follow
make: *** [.tmp_vmlinux1] Error 1

If link with libirc_s.a it cannot boot
If link with libgcc.a the screen scroll then kernel trap

I tested the workaround on Intel 64. Didn't test it on IA32. It looks the workaround doesn't work for you and you will still need to link libirc_s.a.

Please remove -ffreestanding, added libirc_s.a back to the Makefile.Try this workaround:
In ./Makefile, Add --unresolved-symbols=ignore-all option to the linker command line where libirc_s.a is added.

Quoting - newper

Is the intel wrapper like this ?

#--------------------------------------------------------

# This is a wrapper script for icc 10.1 on IA-32

#--------------------------------------------------------

ARGS=$@

ICCARGS="-fno-builtin -ffreestanding"

# For loop to change options of icc

for ARG in $@

do

case $ARG in

-fno-stack-protector )

ICCARGS="$ICCARGS -fno-stack-security-check"

;;

-Wno-pointer-sign | -msoft-float | -maccumulate-outgoing-args )

;;

* )

ICCARGS="$ICCARGS $ARG"

;;

esac

done

icc $ICCARGS

exit $?

If drop it the error will be
kernel/built-in.o: In function `ns_to_timespec':
(.text+0x9486): undefined reference to `__divdi3'
kernel/built-in.o: In function `ns_to_timespec':
(.text+0x94c3): undefined reference to `__divdi3'
kernel/built-in.o: In function `ns_to_timeval':
(.text+0x95a2): undefined reference to `__divdi3'
kernel/built-in.o: In function `ns_to_timeval':
(.text+0x95df): undefined reference to `__divdi3'
kernel/built-in.o: In function `set_normalized_timespec':
(.text+0x9651): undefined reference to `__divdi3'
kernel/built-in.o:(.text+0x9690): more undefined references to `__divdi3' follow
make: *** [.tmp_vmlinux1] Error 1

If link with libirc_s.a it cannot boot
If link with libgcc.a the screen scroll then kernel trap

I tested the workaround on Intel 64. Didn't test it on IA32. It looks the workaround doesn't work for you and you will still need to link libirc_s.a.

Please remove -ffreestanding, added libirc_s.a back to the Makefile.Try this workaround:
In ./Makefile, Add --unresolved-symbols=ignore-all option to the linker command line where libirc_s.a is added.

Also screen scroll then kernel panic

Quoting - Feilong H (Intel)

Quoting - newper

Is the intel wrapper like this ?

#--------------------------------------------------------

# This is a wrapper script for icc 10.1 on IA-32

#--------------------------------------------------------

ARGS=$@

ICCARGS="-fno-builtin -ffreestanding"

# For loop to change options of icc

for ARG in $@

do

case $ARG in

-fno-stack-protector )

ICCARGS="$ICCARGS -fno-stack-security-check"

;;

-Wno-pointer-sign | -msoft-float | -maccumulate-outgoing-args )

;;

* )

ICCARGS="$ICCARGS $ARG"

;;

esac

done

icc $ICCARGS

exit $?

If drop it the error will be
kernel/built-in.o: In function `ns_to_timespec':
(.text+0x9486): undefined reference to `__divdi3'
kernel/built-in.o: In function `ns_to_timespec':
(.text+0x94c3): undefined reference to `__divdi3'
kernel/built-in.o: In function `ns_to_timeval':
(.text+0x95a2): undefined reference to `__divdi3'
kernel/built-in.o: In function `ns_to_timeval':
(.text+0x95df): undefined reference to `__divdi3'
kernel/built-in.o: In function `set_normalized_timespec':
(.text+0x9651): undefined reference to `__divdi3'
kernel/built-in.o:(.text+0x9690): more undefined references to `__divdi3' follow
make: *** [.tmp_vmlinux1] Error 1

If link with libirc_s.a it cannot boot
If link with libgcc.a the screen scroll then kernel trap

I tested the workaround on Intel 64. Didn't test it on IA32. It looks the workaround doesn't work for you and you will still need to link libirc_s.a.

Please remove -ffreestanding, added libirc_s.a back to the Makefile.Try this workaround:
In ./Makefile, Add --unresolved-symbols=ignore-all option to the linker command line where libirc_s.a is added.

When you say Intel 64 do you mean EPIC or x86_64?

So, this is now possible again! Good to see. Last time this sort of thing was doable was back when kernel 2.6.9 was current.

I remember reading a paper analyzing performance differences between a GCC compiled kernel and an ICC compiled one. Has anyone got any metrics on the relative performance between GCC and ICC compiled kernels?

If time permits, I'm tempted to look into a patch that makes the kernel compile without a wrapper (doctor the Makefiles to change CFLAGS based on whether HOSTCC=gcc as per default or icc).

Quoting - shatteredsilicon
So, this is now possible again! Good to see. Last time this sort of thing was doable was back when kernel 2.6.9 was current.

I remember reading a paper analyzing performance differences between a GCC compiled kernel and an ICC compiled one. Has anyone got any metrics on the relative performance between GCC and ICC compiled kernels?

If time permits, I'm tempted to look into a patch that makes the kernel compile without a wrapper (doctor the Makefiles to change CFLAGS based on whether HOSTCC=gcc as per default or icc).

That's a great idea! As far as the bechmarks I've been running I can not see much difference between the two kernels. I think the biggest difference will come when we start using PGO to create custom kernels.

Well guys I'm happy to say I've got the nVidia closed source drivers working in 2D so far. For some reason the GLX extenstion is not loading:

glxinfo

glxinfo: symbol lookup error: /usr/lib/opengl/nvidia/lib/libGL.so.1: undefined symbol: _nv000006gl

Video playback is possible in Gentoo when you switch to the x11-xorg opengl setting using eselect but is not possible with the nvidia opengl setting... probably because the nvidia drivers are accelerating it.

Anybody know how to get the glx module working?

Also here are some other drivers that work with no problems:

KillerNic gaming card
Creative Soundblaster X-Fi Fatility series
HP hplip printer drivers
raedon and radeonhd open source drivers

Quoting - thaidog
Well guys I'm happy to say I've got the nVidia closed source drivers working in 2D so far. For some reason the GLX extenstion is not loading:

glxinfo

glxinfo: symbol lookup error: /usr/lib/opengl/nvidia/lib/libGL.so.1: undefined symbol: _nv000006gl

Video playback is possible in Gentoo when you switch to the x11-xorg opengl setting using eselect but is not possible with the nvidia opengl setting... probably because the nvidia drivers are accelerating it.

Anybody know how to get the glx module working?

Also here are some other drivers that work with no problems:

KillerNic gaming card
Creative Soundblaster X-Fi Fatility series
HP hplip printer drivers
raedon and radeonhd open source drivers

Good job to make ICC compiler with kernel! I think we can use more optimization like IPO and PGO to improve kernel performance. For Intel 64, it should mean EM64T and should be 'x86_64', as it says 'Port to the x86-64 architecture. x86-64 is a 64-bit extension to the classical 32-bit x86 architecture'.

Is your libGL.so.1 build by ICC or installed on your machine by default?_nv000006gl should be defined in nVidia driver rather than system library. Do you have same problem when using GCC?

Quoting - zhenhua.zhang

Quoting - thaidog
Well guys I'm happy to say I've got the nVidia closed source drivers working in 2D so far. For some reason the GLX extenstion is not loading:

glxinfo

glxinfo: symbol lookup error: /usr/lib/opengl/nvidia/lib/libGL.so.1: undefined symbol: _nv000006gl

Video playback is possible in Gentoo when you switch to the x11-xorg opengl setting using eselect but is not possible with the nvidia opengl setting... probably because the nvidia drivers are accelerating it.

Anybody know how to get the glx module working?

Also here are some other drivers that work with no problems:

KillerNic gaming card
Creative Soundblaster X-Fi Fatility series
HP hplip printer drivers
raedon and radeonhd open source drivers

Good job to make ICC compiler with kernel! I think we can use more optimization like IPO and PGO to improve kernel performance. For Intel 64, it should mean EM64T and should be 'x86_64', as it says 'Port to the x86-64 architecture. x86-64 is a 64-bit extension to the classical 32-bit x86 architecture'.

Is your libGL.so.1 build by ICC or installed on your machine by default?_nv000006gl should be defined in nVidia driver rather than system library. Do you have same problem when using GCC?

Newper has been working to try to get the ASM to behave so we can compile in IPO and PGO support. Not an easy task but he is very good!

I am not sure what happened with the nvidia driver so I am compiling another gentoo system to try it from a clean install. I think it might just be that my system is to caotic. The driver was compiled with GCC so I'm not too sure what happened. Also it did not seem to install correctly when I used the Intel Ar and LD linking like so:

make HOSTCC=intelwrapper CC=intelwrapper Ar=xiar LD=vild

But it did at least install with

make HOSTCC=intelwrapper CC=intelwrapper

It could just have been a system error though... That system is having some issues.

Quoting - zhenhua.zhang

Quoting - thaidog
Well guys I'm happy to say I've got the nVidia closed source drivers working in 2D so far. For some reason the GLX extenstion is not loading:

glxinfo

glxinfo: symbol lookup error: /usr/lib/opengl/nvidia/lib/libGL.so.1: undefined symbol: _nv000006gl

Video playback is possible in Gentoo when you switch to the x11-xorg opengl setting using eselect but is not possible with the nvidia opengl setting... probably because the nvidia drivers are accelerating it.

Anybody know how to get the glx module working?

Also here are some other drivers that work with no problems:

KillerNic gaming card
Creative Soundblaster X-Fi Fatility series
HP hplip printer drivers
raedon and radeonhd open source drivers

Good job to make ICC compiler with kernel! I think we can use more optimization like IPO and PGO to improve kernel performance. For Intel 64, it should mean EM64T and should be 'x86_64', as it says 'Port to the x86-64 architecture. x86-64 is a 64-bit extension to the classical 32-bit x86 architecture'.

Is your libGL.so.1 build by ICC or installed on your machine by default?_nv000006gl should be defined in nVidia driver rather than system library. Do you have same problem when using GCC?

Ok so with a clean install I am getting:

FATAL: Error inserting nvidia (lib/modules/2.6.22/video/nvidia.ko): No such device

The kernel module is there though. When I try to use nVidia's binary driver I get and error during the install:

The CC version check failed:

The string "(gcc" was not found in the /proc/versiom string: "Linux version 2.6.22 (root@gentoo_icc) (Version 10.1) #3 SMP Mon Feb 23 17:54:30 EST 2009"; please report this error to linux-bugs@nvidia.com

If you know what you are doig and want to ignore the gcc version check, select "No" to continue installation. Otherwise, select "yes" to abort installation, set the CC enviornment variable to the name of the compiler used to compile your kernel, and restart installation. Abort now?

#############

So I select NO and it compiles but I end up with and error that says unable to load nvidia.ko at the end of the install.

Here is the installer log:

http://www.linuxdna.com/nvidia-installer.txt

Quoting - thaidog

Ok so with a clean install I am getting:

FATAL: Error inserting nvidia (lib/modules/2.6.22/video/nvidia.ko): No such device

The kernel module is there though. When I try to use nVidia's binary driver I get and error during the install:

The CC version check failed:

The string "(gcc" was not found in the /proc/versiom string: "Linux version 2.6.22 (root@gentoo_icc) (Version 10.1) #3 SMP Mon Feb 23 17:54:30 EST 2009"; please report this error to linux-bugs@nvidia.com

If you know what you are doig and want to ignore the gcc version check, select "No" to continue installation. Otherwise, select "yes" to abort installation, set the CC enviornment variable to the name of the compiler used to compile your kernel, and restart installation. Abort now?

#############

So I select NO and it compiles but I end up with and error that says unable to load nvidia.ko at the end of the install.

Here is the installer log:

http://www.linuxdna.com/nvidia-installer.txt

You can define CC as intelwrapper by using 'export set CC=intelwrapper'. And then try to build NV driver. Make sure you have following line in your wrapper.

-Wno-pointer-sign | -msoft-float | -ffreestanding | -maccumulate-outgoing-args )
;;

[root@localhost ~]# which icc
/opt/intel/cc/10.1.018/bin/icc
[root@localhost ~]# which intelwrapper
/usr/src/linux/intelwrapper
[root@localhost ~]# echo $CC
intelwrapper

I can build outnvidia.ko but it cannot find Nvidia card as I running my ICC linux in VMWare.

Quoting - zhenhua.zhangintel.com

Quoting - thaidog

Ok so with a clean install I am getting:

FATAL: Error inserting nvidia (lib/modules/2.6.22/video/nvidia.ko): No such device

The kernel module is there though. When I try to use nVidia's binary driver I get and error during the install:

The CC version check failed:

The string "(gcc" was not found in the /proc/versiom string: "Linux version 2.6.22 (root@gentoo_icc) (Version 10.1) #3 SMP Mon Feb 23 17:54:30 EST 2009"; please report this error to linux-bugs@nvidia.com

If you know what you are doig and want to ignore the gcc version check, select "No" to continue installation. Otherwise, select "yes" to abort installation, set the CC enviornment variable to the name of the compiler used to compile your kernel, and restart installation. Abort now?

#############

So I select NO and it compiles but I end up with and error that says unable to load nvidia.ko at the end of the install.

Here is the installer log:

http://www.linuxdna.com/nvidia-installer.txt

You can define CC as intelwrapper by using 'export set CC=intelwrapper'. And then try to build NV driver. Make sure you have following line in your wrapper.

-Wno-pointer-sign | -msoft-float | -ffreestanding | -maccumulate-outgoing-args )
;;

[root@localhost ~]# which icc
/opt/intel/cc/10.1.018/bin/icc
[root@localhost ~]# which intelwrapper
/usr/src/linux/intelwrapper
[root@localhost ~]# echo $CC
intelwrapper

I can build outnvidia.ko but it cannot find Nvidia card as I running my ICC linux in VMWare.

Is there anyone with an nVidia card who can try this method?

Quoting - thaidog
FYI - here is an article on the effort:

http://www.linuxjournal.com/content/linuxdna-supercharges-linux-intel-cc...

thaidog,

Thank youfor letting us know this. Now I'm working on building Linux kernel 2.6.18 with icc 11.0. Hopefully I canhave some outcomes later. Willkeep you guys posted.

Thanks,
Feilong

Quoting - (Intel)

Quoting - thaidog
FYI - here is an article on the effort:

http://www.linuxjournal.com/content/linuxdna-supercharges-linux-intel-cc...

thaidog,

Thank youfor letting us know this. Now I'm working on building Linux kernel 2.6.18 with icc 11.0. Hopefully I canhave some outcomes later. Willkeep you guys posted.

Thanks,
Feilong

Thank you Feilong! We could never have done it without you!!! :)

Quoting - thaidog

Is there anyone with an nVidia card who can try this method?

I build the driver by icc and launch the Xwindows successfully on my home desktop with my GeForce 8600GTS. It works fine. :-)

Quoting - zhenhua.zhang

Quoting - thaidog

Is there anyone with an nVidia card who can try this method?

I build the driver by icc and launch the Xwindows successfully on my home desktop with my GeForce 8600GTS. It works fine. :-)

Awsone! A few questions... how did you compile your intel kernel: Did you use:

make HOSTCC=intelwrapper CC=intelwrapperAr=xiar LD=xild

or

make HOSTCC=intelwrapper CC=intelwrapper

and did you use:

export set CC=intelwrapper'

for the nvidia compile?

Pages

Leave a Comment

Please sign in to add a comment. Not a member? Join today