Changeset 1035

Show
Ignore:
Timestamp:
05/22/06 13:57:28 (3 years ago)
Author:
archaic
Message:

Updated: intel-c-compiler.txt trunk.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/intel-c-compiler.txt

    r1033 r1035  
    22        Daniel Baumann <daniel.baumann at panthera-systems.net> 
    33 
    4 DATE: 2006-05-19 
     4DATE: 2006-05-22 
    55 
    66LICENSE: GNU General Public License 
     
    1515 
    1616PREREQUISITES: 
    17 An Intel CPU (this does not work with AMD or other non-Intel). 
     17An Intel CPU (Intel-clones/AMD may or may not work). 
    1818Glibc (icc is linked to /lib/ld-linux.so.2). 
    1919 
     
    3434http://gentoo-wiki.com/HOWTO_ICC_and_Portage 
    3535 
    36 This compiler is not free, and there is no source provided
     36This compiler is not opensource
    3737 
    3838This hint will give instructions to build supported software with ICC, so that 
     
    4343provided to enable profiling; this means compiling packages twice, but they 
    4444should run a bit faster. The difference between runtimes of a program compiled 
    45 with GCC, compared to ICC with profiling, varies between 2% and 22%. 
     45with GCC, compared to ICC with profiling, varies between 2% and 40%. 
    4646 
    4747For even more performance, also see the prelink.txt hint, the optimization.txt 
     
    198198rm -f /usr/lib/libgcc_s.so* 
    199199 
    200 # If you plan to use ICC to compile must of the LFS system, the runtime 
     200# If you plan to use ICC to compile most of the LFS system, the runtime 
    201201# library should be moved to /lib: 
    202202 
     
    213213export ICC_CFLAGS="-ip -xP -O3" 
    214214export ICC_CXXFLAGS="$ICC_CFLAGS" 
     215 
     216# Interprocedural optimizations (IPO) is a fantastic feature which optimizes 
     217# executables at link time. This allows the compiler to make better judgements. 
     218# A similiar option was added to GCC-4.1, -fwhole-program --combine. Using this 
     219# option is a bit touchy though. The -ipo flag can only be used on executables, 
     220# and not static libraries. Almost every package has static libraries which are 
     221# linked into the programs during the build. The HLFS book happens to use the 
     222# -fpie option which has the same requirements. To use the ICC -ipo option, check 
     223# the HLFS book for the sed commands which add -fpie to Makefile.in's. Replace the 
     224# "-pie -fpie" with "-ipo". The sed command for each package is different. 
     225# Unfortunetly these commands are not available for most of the BLFS packages. 
    215226 
    216227# Run this to break GCC compatability (some packages need this): 
     
    241252# programs and generate profiling data. If you are able to run the programs better 
    242253# than how 'make check' does, then I suggest you do that. Then 'make clean', and 
    243 # finally make again with "-prof_use". You can run 'make check' again if you like, 
    244 # and 'make install'. 
     254# make again with "-prof_use". You can run 'make check' again if you like, and 
     255# finally 'make install'. 
    245256 
    246257# In general, use this: 
    247258 
    248259env CFLAGS="$ICC_CFLAGS -prof_gen -prof_dir=$(pwd)" \ 
    249         CXXFLAGS="$ICC_CFLAGS -prof_gen -prof_dir=$(pwd)" LC_ALL="C" \ 
     260        CXXFLAGS="$ICC_CXXFLAGS -prof_gen -prof_dir=$(pwd)" LC_ALL="C" \ 
    250261        LANG="en" LANGUAGE="en" CC="icc" CXX="icpc" ./configure... 
    251262 
    252263# Then 'make && make check && make clean', and final build with: 
    253264 
    254 make CFLAGS="$ICC_CFLAGS -prof_use -prof_dir=$(pwd)" \ 
    255         CXXFLAGS="$ICC_CFLAGS -prof_use -prof_dir=$(pwd)" 
    256  
    257 # Then 'make install'. 
     265env CFLAGS="$ICC_CFLAGS -prof_use -prof_dir=$(pwd)" \ 
     266        CXXFLAGS="$ICC_CXXFLAGS -prof_use -prof_dir=$(pwd)" LC_ALL="C" \ 
     267        LANG="en" LANGUAGE="en" CC="icc" CXX="icpc" ./configure... 
     268 
     269# Then 'make && make install'. 
    258270 
    259271# DB can not be compiled with ICC. 
     
    308320# And 'make' and 'make install'. 
    309321 
     322# Warning! Building Perl with profiling has frozen my desktop, beware. 
    310323# Perl can compile with ICC profiling. After 'make distclean' you will have to 
    311324# run ./configure again, substituting -prof_gen with -prof_use. 
     
    597610[2006-05-19] 
    598611        * Run 'make check' after building with prof_gen, to generate profiling data. 
    599  
     612[2006-05-22] 
     613        * Added notes for the -ipo option.