- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
http://www.intel.com/support/performancetools/c/linux/sb/cs-007713.htm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
http://www.intel.com/support/performancetools/c/linux/sb/cs-007713.htm
Yes I have read this paper... it deos not give a link to the wrapper it talks about however. Here is a link that has sme older wrappers:
http://www.pyrillion.org/index.html?showframe=linuxkernelpatch.html
I have not tried them however because I think they are too old to work with a 2.6.2* kernel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am a developer with an idea to stat a new kernel source for Gentoo that is specifically for the Intel ICC compiler. Evidentally there is a "wrapper" that is need to be applied to the kernel source first before ICC can correctly complie the Linux kernel. Wher can I get this wrapper? (I have looked all over the web but the only yhing I can find is old documentation)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am a developer with an idea to stat a new kernel source for Gentoo that is specifically for the Intel ICC compiler. Evidentally there is a "wrapper" that is need to be applied to the kernel source first before ICC can correctly complie the Linux kernel. Wher can I get this wrapper? (I have looked all over the web but the only yhing I can find is old documentation)
Hi thaidog, were you asking for a wrapper for 2.6.xx kernel on IA32? I can share one for 10.x compiler with you. I didn't test with 11.0 compiler yet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi thaidog, were you asking for a wrapper for 2.6.xx kernel on IA32? I can share one for 10.x compiler with you. I didn't test with 11.0 compiler yet.
That would be awsome! I am using the 10 version right now since that is what is available in portage. That is the exact one I am looking for... IA32.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following is an example of wrapper script. Please try it with a newer update of icc 10.1.
#--------------------------------------------------------
# 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 )
;;
* )
ICCARGS="$ICCARGS $ARG"
;;
esac
done
icc $ICCARGS
exit $?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bummer.
I tried to compile the linux kernel with ICC and got into a horrible mess. I think it is way too embedded with GCC for it to work but if you managed to get it working, I would be VERY interested.
If you need a hand, please ask.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following is an example of wrapper script. Please try it with a newer update of icc 10.1.
#--------------------------------------------------------
# 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 )
;;
* )
ICCARGS="$ICCARGS $ARG"
;;
esac
done
icc $ICCARGS
exit $?
Well I've got version 10.0. Not sure where to find 10.1. I got this error when trying to do it with 10.0:
gentoo_x86_32 ~ # cd /usr/src/linux
gentoo_x86_32 linux # nano intelwrapper
gentoo_x86_32 linux # make HOSTCC=intelwrapper CC=intelwrapper
/usr/src/linux-2.6.25-gentoo-r7/scripts/gcc-version.sh: line 25: intelwrapper: command not found
/usr/src/linux-2.6.25-gentoo-r7/scripts/gcc-version.sh: line 26: intelwrapper: command not found
make: intelwrapper: Command not found
CHK include/linux/version.h
CHK include/linux/utsrelease.h
HOSTCC scripts/basic/fixdep
/bin/sh: intelwrapper: command not found
make[1]: *** [scripts/basic/fixdep] Error 127
make: *** [scripts_basic] Error 2
gentoo_x86_32 linux #
EDIT: whoops... I did not put it in my path... that's what that error is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bummer.
I tried to compile the linux kernel with ICC and got into a horrible mess. I think it is way too embedded with GCC for it to work but if you managed to get it working, I would be VERY interested.
If you need a hand, please ask.
A hand would be great. I have version 10 not 10.1. Do you know where to get 10.1? I got the wrapper working... but after a few min it errored:
make[1]: *** [arch/x86/vdso/vdso32-int80.so.dbg] Error 1
make: *** [arch/x86/vdso] Error 2
Other people at the gentoo forums are trying it but they are running in to similar issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-
add the following line at the end of include/linux/compiler-intel.h.
#undef __compiler_offsetof -
arch/i386/kernel/apm.c, remove "static"
staticstruct {
unsigned longoffset;
unsigned shortsegment;
}apm_bios_entry; -
include/linux/module.h, remove "static"
staticconst unsigned long __kcrctab_##sym
__attribute_used__
__attribute__((section("__kcrctab" sec), unused))
= (unsigned long) &__crc_##sym;
...
#define __EXPORT_SYMBOL(sym, sec)
extern typeof(sym) sym;
__CRC_SYMBOL(sym, sec)
staticconst char __kstrtab_##sym[]
__attribute__((section("__ksymtab_strings")))
= MODULE_SYMBOL_PREFIX #sym;
staticconst struct kernel_symbol __ksymtab_##sym
__attribute_used__
__attribute__((section("__ksymtab" sec), unused))
= { (unsigned long)&sym, __kstrtab_##sym } -
Makefile, add libirc_s.a as follow.
--start-group $(vmlinux-main) /opt/intel/cc/10.1.021/lib/libirc_s.a --end-group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-
add the following line at the end of include/linux/compiler-intel.h.
#undef __compiler_offsetof -
arch/i386/kernel/apm.c, remove "static"
staticstruct {
unsigned longoffset;
unsigned shortsegment;
}apm_bios_entry; -
include/linux/module.h, remove "static"
staticconst unsigned long __kcrctab_##sym
__attribute_used__
__attribute__((section("__kcrctab" sec), unused))
= (unsigned long) &__crc_##sym;
...
#define __EXPORT_SYMBOL(sym, sec)
extern typeof(sym) sym;
__CRC_SYMBOL(sym, sec)
staticconst char __kstrtab_##sym[]
__attribute__((section("__ksymtab_strings")))
= MODULE_SYMBOL_PREFIX #sym;
staticconst struct kernel_symbol __ksymtab_##sym
__attribute_used__
__attribute__((section("__ksymtab" sec), unused))
= { (unsigned long)&sym, __kstrtab_##sym } -
Makefile, add libirc_s.a as follow.
--start-group $(vmlinux-main) /opt/intel/cc/10.1.021/lib/libirc_s.a --end-group
I got the update to 10.1 but it died again (I have not had a chance to try those changes you added in the post above yet though) Here is the build log about 50 lines to the bottom:
kernel/pid.c(215): warning #1419: external declaration in primary source file
EXPORT_SYMBOL_GPL(put_pid);
^
kernel/pid.c(266): warning #188: enumerated type mixed with another type
for (type = 0; type < PIDTYPE_MAX; ++type)
^
kernel/pid.c(297): error: subscript must be constant
return container_of(pnr, struct pid,
^
kernel/pid.c(302): warning #1419: external declaration in primary source file
EXPORT_SYMBOL_GPL(find_pid_ns);
^
kernel/pid.c(308): warning #1419: external declaration in primary source file
EXPORT_SYMBOL_GPL(find_vpid);
^
kernel/pid.c(314): warning #1419: external declaration in primary source file
EXPORT_SYMBOL_GPL(find_pid);
^
kernel/pid.c(366): error: subscript must be constant
result = hlist_entry(first, struct task_struct, pids[(type)].node);
^
kernel/pid.c(370): warning #1419: external declaration in primary source file
EXPORT_SYMBOL(pid_task);
^
kernel/pid.c(378): warning #188: enumerated type mixed with another type
return pid_task(find_pid_ns(nr, ns), type);
^
kernel/pid.c(381): warning #1419: external declaration in primary source file
EXPORT_SYMBOL(find_task_by_pid_type_ns);
^
kernel/pid.c(387): warning #1419: external declaration in primary source file
EXPORT_SYMBOL(find_task_by_pid);
^
kernel/pid.c(394): warning #1419: external declaration in primary source file
EXPORT_SYMBOL(find_task_by_vpid);
^
kernel/pid.c(400): warning #1419: external declaration in primary source file
EXPORT_SYMBOL(find_task_by_pid_ns);
^
kernel/pid.c(450): warning #1419: external declaration in primary source file
EXPORT_SYMBOL_GPL(pid_vnr);
^
kernel/pid.c(456): warning #1419: external declaration in primary source file
EXPORT_SYMBOL(task_pid_nr_ns);
^
kernel/pid.c(462): warning #1419: external declaration in primary source file
EXPORT_SYMBOL(task_tgid_nr_ns);
^
kernel/pid.c(468): warning #1419: external declaration in primary source file
EXPORT_SYMBOL(task_pgrp_nr_ns);
^
kernel/pid.c(474): warning #1419: external declaration in primary source file
EXPORT_SYMBOL(task_session_nr_ns);
^
kernel/pid.c(494): warning #1419: external declaration in primary source file
EXPORT_SYMBOL_GPL(find_get_pid);
^
kernel/pid.c(501): warning #1418: external function definition with no prior declaration
void __init pidhash_init(void)
^
kernel/pid.c(512): remark #181: argument is incompatible with corresponding format string conversion
pidhash_size * sizeof(struct hlist_head));
^
kernel/pid.c(521): warning #1418: external function definition with no prior declaration
void __init pidmap_init(void)
^
compilation aborted for kernel/pid.c (code 2)
make[1]: *** [kernel/pid.o] Error 2
make: *** [kernel] Error 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For the following line:
-
arch/i386/kernel/apm.c, remove "static"
staticstruct {
unsigned longoffset;
unsigned shortsegment;
}apm_bios_entry;
I do not have that directory: /usr/src/linux/arch/i386/kernel/
I have:
/usr/src/linux/arch/i386/boot
(Where bzImage is storred)
I made the other modifications and the kernel seemsed to compile to the very end and then it errored:
compilation aborted for arch/x86/boot/mca.c (code 2)
make[1]: *** [arch/x86/boot/mca.o] Error 2
make: *** [bzImage] Error 2
#################################################################################
Here is build log about 50 lines to the bottom:
static inline int memcmp(const void *s1, const void *s2, size_t len)
^
arch/x86/boot/boot.h(174): remark #593: parameter "len" was set but never used
static inline int memcmp(const void *s1, const void *s2, size_t len)
^
arch/x86/boot/boot.h(182): remark #593: parameter "s1" was set but never used
static inline int memcmp_fs(const void *s1, addr_t s2, size_t len)
^
arch/x86/boot/boot.h(182): remark #593: parameter "s2" was set but never used
static inline int memcmp_fs(const void *s1, addr_t s2, size_t len)
^
arch/x86/boot/boot.h(182): remark #593: parameter "len" was set but never used
static inline int memcmp_fs(const void *s1, addr_t s2, size_t len)
^
arch/x86/boot/boot.h(189): remark #593: parameter "s1" was set but never used
static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
^
arch/x86/boot/boot.h(189): remark #593: parameter "s2" was set but never used
static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
^
arch/x86/boot/boot.h(189): remark #593: parameter "len" was set but never used
static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
^
arch/x86/boot/main.c(66): remark #593: variable "ax" was set but never used
u16 ax = 0x0305;
^
arch/x86/boot/main.c(67): remark #593: variable "bx" was set but never used
u16 bx = 0;
^
arch/x86/boot/main.c(122): warning #1079: return type of function "main" must be "int"
void main(void)
^
IPO: WARNING: File scope asm disables -ipo
CC arch/x86/boot/mca.o
icc: command line warning #10006: ignoring unknown option '-fno-toplevel-reorder'
arch/x86/boot/boot.h(174): remark #593: parameter "s1" was set but never used
static inline int memcmp(const void *s1, const void *s2, size_t len)
^
arch/x86/boot/boot.h(174): remark #593: parameter "s2" was set but never used
static inline int memcmp(const void *s1, const void *s2, size_t len)
^
arch/x86/boot/boot.h(174): remark #593: parameter "len" was set but never used
static inline int memcmp(const void *s1, const void *s2, size_t len)
^
arch/x86/boot/boot.h(182): remark #593: parameter "s1" was set but never used
static inline int memcmp_fs(const void *s1, addr_t s2, size_t len)
^
arch/x86/boot/boot.h(182): remark #593: parameter "s2" was set but never used
static inline int memcmp_fs(const void *s1, addr_t s2, size_t len)
^
arch/x86/boot/boot.h(182): remark #593: parameter "len" was set but never used
static inline int memcmp_fs(const void *s1, addr_t s2, size_t len)
^
arch/x86/boot/boot.h(189): remark #593: parameter "s1" was set but never used
static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
^
arch/x86/boot/boot.h(189): remark #593: parameter "s2" was set but never used
static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
^
arch/x86/boot/boot.h(189): remark #593: parameter "len" was set but never used
static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
^
arch/x86/boot/mca.c(29): error: register "ax" used more than once
: "=acd" (err), "=acdSD" (es), "=b" (bx)
^
arch/x86/boot/mca.c(29): error: register "cx" used more than once
: "=acd" (err), "=acdSD" (es), "=b" (bx)
^
arch/x86/boot/mca.c(29): error: register "dx" used more than once
: "=acd" (err), "=acdSD" (es), "=b" (bx)
^
compilation aborted for arch/x86/boot/mca.c (code 2)
make[1]: *** [arch/x86/boot/mca.o] Error 2
make: *** [bzImage] Error 2
#####################################################################
Also I had to use:
*Makefile, add libirc_s.a as follow.
--start-group $(vmlinux-main) /opt/intel/cc/10.1.018/lib/libirc_s.a --end-group
Instead of:
*Makefile, add libirc_s.a as follow.
--start-group $(vmlinux-main) /opt/intel/cc/10.1.021/lib/libirc_s.a --end-group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are these the lines you are talking about?
arch/x86/boot/main.c(66): remark #593: variable "ax" was set but never used
u16 ax = 0x0305;
^
arch/x86/boot/main.c(67): remark #593: variable "bx" was set but never used
u16 bx = 0;
^
arch/x86/boot/main.c(122): warning #1079: return type of function "main" must be "int"
void main(void)
^
############################################
I did a: cat arch/x86/boot/main.c but I did not see a -c to replace with the -E
Maybe I am not understanding you correcty?
EDIT: If you would like I can give you access to the development box via ssh and sudo acct?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do not see that line from your command - here is the output:
gentoo_x86_32 bin # cd /usr/src/linux
gentoo_x86_32 linux # make HOSTCC=intelwrapper CC=intelwrapper V=1
/usr/src/linux-2.6.25-gentoo-r7/scripts/gcc-version.sh: line 25: intelwrapper: command not found
/usr/src/linux-2.6.25-gentoo-r7/scripts/gcc-version.sh: line 26: intelwrapper: command not found
make: intelwrapper: Command not found
rm -f include/config/kernel.release
echo 2.6.25-gentoo-r7 > include/config/kernel.release
set -e; :; mkdir -p include/linux/; (echo #define LINUX_VERSION_CODE 132633; echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) < /usr/src/linux-2.6.25-gentoo-r7/Makefile > include/linux/version.h.tmp; if [ -r include/linux/version.h ] && cmp -s include/linux/version.h include/linux/version.h.tmp; then rm -f include/linux/version.h.tmp; else :; mv -f include/linux/version.h.tmp include/linux/version.h; fi
set -e; :; mkdir -p include/linux/; if [ `echo -n "2.6.25-gentoo-r7" | wc -c ` -gt 64 ]; then echo '"2.6.25-gentoo-r7" exceeds 64 characters' >&2; exit 1; fi; (echo #define UTS_RELEASE "2.6.25-gentoo-r7";) < include/config/kernel.release > include/linux/utsrelease.h.tmp; if [ -r include/linux/utsrelease.h ] && cmp -s include/linux/utsrelease.h include/linux/utsrelease.h.tmp; then rm -f include/linux/utsrelease.h.tmp; else :; mv -f include/linux/utsrelease.h.tmp include/linux/utsrelease.h; fi
set -e; asmlink=`readlink include/asm | cut -d '-' -f 2`;
if [ -L include/asm ]; then
if [ "$asmlink" != "x86" ]; then
echo "ERROR: the symlink include/asm points to asm-$asmlink but asm-x86 was expected";
echo " set ARCH or save .config and run 'make mrproper' to fix it";
exit 1;
fi;
else
echo ' SYMLINK include/asm -> include/asm-x86';
if [ ! -d include ]; then
mkdir -p include;
fi;
ln -fsn asm-x86 include/asm;
fi
mkdir -p .tmp_versions ; rm -f .tmp_versions/*
make -f scripts/Makefile.build obj=scripts/basic
(cat /dev/null; ) > scripts/basic/modules.order
make -f scripts/Makefile.build obj=.
(cat /dev/null; ) > modules.order
mkdir -p arch/x86/kernel/
intelwrapper -Wp,-MD,arch/x86/kernel/.asm-offsets.s.d -nostdinc -isystem -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -msoft-float -mregparm=3 -freg-struct-return -march=i686 -ffreestanding -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -Iinclude/asm-x86/mach-generic -Iinclude/asm-x86/mach-default -fno-omit-frame-pointer -fno-optimize-sibling-calls -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(asm_offsets)" -D"KBUILD_MODNAME=KBUILD_STR(asm_offsets)" -fverbose-asm -S -o arch/x86/kernel/asm-offsets.s arch/x86/kernel/asm-offsets.c
/bin/sh: intelwrapper: command not found
make[1]: *** [arch/x86/kernel/asm-offsets.s] Error 127
make: *** [prepare0] Error 2
gentoo_x86_32 linux #
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is the name of it and it was already in my path... I copied over again and got this:
http://www.tyler.mcadams.com/build.txt
http://www.tyler.mcadams.com/kernellog.txt
http://www.tyler.mcadams.com/kernellog2.txt
Could not find anything exactly line like you are looking for... the only thing that ends in main.c are lines like this:
drivers/net/e1000/e1000_main.c(258): remark #177: function "__check_debug" was declared but never referenced
module_param(debug, int, 0);
Could be easier if I just give you a logon. You can e-mail me at: tyler@mcadams.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ps. Due to the corporate firewall, I can't logon to your machine from Intel network...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page