| June 22, 2009 12:30 PM PDT | |
Problem :
A question on the setup scripts of the Intel 11.0.064 compiler.
If one sets up the Intel compile by sourcing /opt/intel/Compiler/11.0/064/bin/iccvars.csh intel64 then can one do a 32bit build with this setup if the compile line has arch i386 or -m32 in it? Is the Intel compiler behaves like gcc? Can it do both 32 bit and 64 bit builds from the same compiler setup ?
What about the other way. If one sets up the the 11.0/064/bin/iccvars.csh ia32 compiler, can it do 64 bit builds with -m64 or -arch x86_64.
Is there a difference in the ia32 and intel64 compilers ?
Environment :
Linux, MAC OS, Intel C++ compiler
Resolution :
The Intel C++ compiler 11.0 is a native Intel 64 application on Intel 64 Linux. The older versions used to be a 32-bit cross compiler in the past. The compiler can generate native Intel64 code and cross compile 32-bit code. The Intel C++ compiler on ia32 Linux is the classic 32-bit which installs and runs on both 32-bit and Intel64 systems and can generate 32-bit code and cross compile Intel64 code.
Users were asking for native Intel64 compilers on Intel64 systems to handle larger binaries to meet their needs, so Intel created the native Intel64 compiler.
A question on the setup scripts of the Intel 11.0.064 compiler.
If one sets up the Intel compile by sourcing /opt/intel/Compiler/11.0/064/bin/iccvars.csh intel64 then can one do a 32bit build with this setup if the compile line has arch i386 or -m32 in it? Is the Intel compiler behaves like gcc? Can it do both 32 bit and 64 bit builds from the same compiler setup ?
What about the other way. If one sets up the the 11.0/064/bin/iccvars.csh ia32 compiler, can it do 64 bit builds with -m64 or -arch x86_64.
Is there a difference in the ia32 and intel64 compilers ?
Environment :
Linux, MAC OS, Intel C++ compiler
Resolution :
The Intel C++ compiler 11.0 is a native Intel 64 application on Intel 64 Linux. The older versions used to be a 32-bit cross compiler in the past. The compiler can generate native Intel64 code and cross compile 32-bit code. The Intel C++ compiler on ia32 Linux is the classic 32-bit which installs and runs on both 32-bit and Intel64 systems and can generate 32-bit code and cross compile Intel64 code.
Users were asking for native Intel64 compilers on Intel64 systems to handle larger binaries to meet their needs, so Intel created the native Intel64 compiler.
Do you need more help?
This article applies to: Intel® C++ Compiler for Linux* Knowledge Base, Intel® C++ Compiler for Mac OS X* Knowledge Base
For more complete information about compiler optimizations, see our Optimization Notice.
Comments (1) 
Trackbacks (0)
Leave a comment 
To obtain technical support, please go to Software Support.
Author
Om Sachan (Intel)
|


Florent
We have the same problem building a library.We use g++ -arch x86_64 -arch i386 for the files of this library, and the intel compiler for specific files of the library.
I noticed that /opt/intel/Compiler/11.1/084/ia32/icc produces i386 object files, and that /opt/intel/Compiler/11.1/084/intel64/icc produces x86_64 object files.
My question is: is there a simple way to use the intel compiler likes g++, meaning with a single call producing a universal binary (i386 x86_64) object file ?
The intel compiler documentation only mentions creating the universal binary by using lipo which is not satisfactory.