Intel C++ compiler
none.of at your.business
Fri Jul 2 10:44:08 PDT 2004
In case anybody is intrested: I tested building some applications using
the intel c/c++ compiler (icc) and it was an agreeable surprise.
Quite a lot of packages built out of the box and it seemed to me that
the binaries started faster than prelinked binaries built by gcc -
prelinking icc binaries actually slowed them down.
My system is a P4 Northwood 2GHz with LFS CVS 2004-06-22, with
gcc3.4.0-release. I used C/CXXFLAGS -O2 -march=pentium4 (I also tried
adding -ip (interprocedural optimizations) and -parallel (auto
parallelization), but it seemed to produce defective binaries more often
than not). I also added -cxxlib-gcc tpo the icc.cfg - it is supposed to
ensure binary compatibility with c++ programs built using g++, and also
produces smaller binaries.
A "hello world" program built with gcc ~ 2kB
with icc, without -cxxlib-gcc ~34kB
with icc, witht -cxxlib-gcc ~ 7kB
with icc, witht -cxxlib-gcc, stripped ~ 4kB
One thing I don't understand: isn't this option supposed to affect only
Here's a list of packages I tried to build:
packages that built smoothly:
and last, but not least, THE LINUX 2.6.6 KERNEL
-required some patching, but nothing complicated
not yet tested with networking, but xfree and alsa works
(I tested it with Prodigy - Firestarter because i presumed it's a
bigger "load" than other songs :))
packages that didn't succesfully build:
- there were some syntax issues in alsa-lib and they propagated to all
programs that included its headers.
- some link-time issues. When I decided to build it with gcc, it didn't
work either, bacause some tests it runs during the build segfaulted.
It turned out later to be a problem with Qt libs (also compiled using
icc, but the strange thing is, programs like qtconfig of designer
worked without any problems)
(BTW Intel warns that icc has some problems with "the new NPTL-based
pthreads library introduced in Red Hat Linux 9." The fact is the
packages that built without problems were small ones and those that
failed were big prjects which are more likely to use threads extensively.)
- see kdelibs note
- had to disable building of xf86cfg, because icc didn't know what to
do with "bool Bool;"
- when I built it for the first time with -O3 -march=pentium4 -ip it
worked, but some programs (xclock, qtconfig) segfaulted. I decided
to rebuild it once more, with less aggresive optimizations
(-O2 -march=pentium4) and this time the X server segfaulted
immediately after start. If anybody knows of a working combination
of optimization options, please let me know.
- works ok, but had to disable building of examples
- built succesfully, even passed all tests, but prelink, even
when built using gcc, refused to link against it.
- "make linux" works, but "make linux-alsa" and "make linux-esd"
I hope someone may find this useful.
More information about the lfs-chat