Building Wine with the Intel Compiler.
I was able to run winetest, some of the builtin applications and start cs2 from my installed .wine
http://test.winehq.org/data/4937bf1bf9cb77fd181ffd27399f48b5efe03f56/
1. Install icc to taste, follow the directions to setup iccvars.sh
- 1.1 If you are on a 64bit host and want to use the 32bit compiler some extra steps may be needed. For me on Ubuntu 7.10 with gcc 4.2 I had to
- Thanks for the ubuntu forum for the following tip:
- Make an directory like /opt/intel/build32, and make some symbolic links:
- $ mkdir /opt/intel/build32
- $ ln -s /usr/bin /opt/intel/build32/bin
- $ ln -s /usr/include /opt/intel/build32/include
- $ ln -s /usr/lib32 /opt/intel/build32/lib
- # Set environment GCCROOT to point to that directory:
- $ export GCCROOT=/opt/intel/build32
- # (Note: due to missing crtbegin.o I had to also do the following)
- $ln -s /usr/lib/gcc/x86_64-linux-gnu/4.1.3/32 /usr/lib/gcc/x86_64-linux-gnu/4.2/32/
2a. Configure Wine for 32bit host
- CC="icc" CFLAGS="-no-cxxlib -pch -O2 -static-libgcc -wd144 -wd177 -wd181 -wd188 -wd191 -wd193 -wd556 -wd593 -wd810 -wd869 -wd981 -wd1287 -wd1292 -wd1418 -wd10156" ./configure -v
2b. Configure Wine for the 64bit host targeting 32bit
CC="icc" CFLAGS="-no-cxxlib -O2 -static-libgcc -wd144 -wd177 -wd181 -wd188 -wd191 -wd193 -wd556 -wd593 -wd810 -wd869 -wd981 -wd1287 -wd1292 -wd1418 -wd10156" LDFLAGS="-L/lib32 -L/usr/lib32 -Lpwd/lib32 -Wl,-rpath,/lib32 -Wl,-rpath,/usr/lib32" ./configure -v
3. make -k 2>log.log
Notes
-xK
-O2 Same as Linux, optimize for speed and size
-Zp4 Force 4 Byte alignment (<!> why is it needed? what's the default alignment in icc?) I've tried other alignment flags such as -noalign -align -malign-double
The behavior of the following tests matches Mingw failures without -mno-align-double but I icc does not seem to care one way to another http://test.winehq.org/data/94883af56d7348228963d7e70a5af578310c2228/wine_xp_icc-3/ntdll:generated.txt http://test.winehq.org/data/94883af56d7348228963d7e70a5af578310c2228/wine_xp_icc5/ntdll:generated.txt
Some of the warnings we are turning off
#144 assign to function pointer a value of type void*
#181 incompatible pointer type for %p (char*)
#188 enumerated type used as integer
#556 cast from function pointer to void*
#593 variable set but never used (this may point to a bug)
#810 conversion to integral type of smaller size (this may point to a bug)
#869 parameter to func not referenced in func
#981 arguments (to func) are evaluated in an unspecified order (this may point to a bug)
#1418 global var/func without prior definition
Here is the patch icc-hacks-20080515.patch
A newer more complete one will be coming later along with benchmarks comparing wine gcc to icc
compiling oleaut32 variant.c causes icc to puke in glibc. I need someone else to test this on a pure 32bit system that is supported so we know if its a problem with my system or a real compiler bug.
