r1035 - trunk

archaic at linuxfromscratch.org archaic at linuxfromscratch.org
Mon May 22 12:57:29 PDT 2006


Author: archaic
Date: 2006-05-22 13:57:28 -0600 (Mon, 22 May 2006)
New Revision: 1035

Modified:
   trunk/intel-c-compiler.txt
Log:
Updated: intel-c-compiler.txt trunk.

Modified: trunk/intel-c-compiler.txt
===================================================================
--- trunk/intel-c-compiler.txt	2006-05-20 21:37:31 UTC (rev 1034)
+++ trunk/intel-c-compiler.txt	2006-05-22 19:57:28 UTC (rev 1035)
@@ -1,7 +1,7 @@
 AUTHOR:	Robert Connolly <robert at linuxfromscratch dot org> (ashes)
 	Daniel Baumann <daniel.baumann at panthera-systems.net>
 
-DATE: 2006-05-19
+DATE: 2006-05-22
 
 LICENSE: GNU General Public License
 
@@ -14,7 +14,7 @@
 How to install the Intel C/C++ Compiler for your LFS-system.
 
 PREREQUISITES:
-An Intel CPU (this does not work with AMD or other non-Intel).
+An Intel CPU (Intel-clones/AMD may or may not work).
 Glibc (icc is linked to /lib/ld-linux.so.2).
 
 HINT:
@@ -33,7 +33,7 @@
 You should also see:
 http://gentoo-wiki.com/HOWTO_ICC_and_Portage
 
-This compiler is not free, and there is no source provided.
+This compiler is not opensource.
 
 This hint will give instructions to build supported software with ICC, so that
 as much as possible is using it. ICC will only be installed in chapter 6 since
@@ -42,7 +42,7 @@
 The main reason for using ICC is for performance, so intructions are also
 provided to enable profiling; this means compiling packages twice, but they
 should run a bit faster. The difference between runtimes of a program compiled
-with GCC, compared to ICC with profiling, varies between 2% and 22%.
+with GCC, compared to ICC with profiling, varies between 2% and 40%.
 
 For even more performance, also see the prelink.txt hint, the optimization.txt
 hint (for GCC), the reiser4-on-2.6.txt hint, and (for GCC):
@@ -197,7 +197,7 @@
 ln -s libgcc_s.so.1 /lib/libgcc_s.so &&
 rm -f /usr/lib/libgcc_s.so*
 
-# If you plan to use ICC to compile must of the LFS system, the runtime
+# If you plan to use ICC to compile most of the LFS system, the runtime
 # library should be moved to /lib:
 
 mv /opt/lib/libimf.so /lib &&
@@ -213,6 +213,17 @@
 export ICC_CFLAGS="-ip -xP -O3"
 export ICC_CXXFLAGS="$ICC_CFLAGS"
 
+# Interprocedural optimizations (IPO) is a fantastic feature which optimizes
+# executables at link time. This allows the compiler to make better judgements.
+# A similiar option was added to GCC-4.1, -fwhole-program --combine. Using this
+# option is a bit touchy though. The -ipo flag can only be used on executables,
+# and not static libraries. Almost every package has static libraries which are
+# linked into the programs during the build. The HLFS book happens to use the
+# -fpie option which has the same requirements. To use the ICC -ipo option, check
+# the HLFS book for the sed commands which add -fpie to Makefile.in's. Replace the
+# "-pie -fpie" with "-ipo". The sed command for each package is different.
+# Unfortunetly these commands are not available for most of the BLFS packages.
+
 # Run this to break GCC compatability (some packages need this):
 
 echo "-no-gcc" >> /opt/bin/icc.cfg
@@ -240,21 +251,22 @@
 # CFLAGS/CXXFLAGS for the first build. Then run 'make check' in order to run the
 # programs and generate profiling data. If you are able to run the programs better
 # than how 'make check' does, then I suggest you do that. Then 'make clean', and
-# finally make again with "-prof_use". You can run 'make check' again if you like,
-# and 'make install'.
+# make again with "-prof_use". You can run 'make check' again if you like, and
+# finally 'make install'.
 
 # In general, use this:
 
 env CFLAGS="$ICC_CFLAGS -prof_gen -prof_dir=$(pwd)" \
-	CXXFLAGS="$ICC_CFLAGS -prof_gen -prof_dir=$(pwd)" LC_ALL="C" \
+	CXXFLAGS="$ICC_CXXFLAGS -prof_gen -prof_dir=$(pwd)" LC_ALL="C" \
         LANG="en" LANGUAGE="en" CC="icc" CXX="icpc" ./configure...
 
 # Then 'make && make check && make clean', and final build with:
 
-make CFLAGS="$ICC_CFLAGS -prof_use -prof_dir=$(pwd)" \
-	CXXFLAGS="$ICC_CFLAGS -prof_use -prof_dir=$(pwd)"
+env CFLAGS="$ICC_CFLAGS -prof_use -prof_dir=$(pwd)" \
+	CXXFLAGS="$ICC_CXXFLAGS -prof_use -prof_dir=$(pwd)" LC_ALL="C" \
+	LANG="en" LANGUAGE="en" CC="icc" CXX="icpc" ./configure...
 
-# Then 'make install'.
+# Then 'make && make install'.
 
 # DB can not be compiled with ICC.
 
@@ -307,6 +319,7 @@
 
 # And 'make' and 'make install'.
 
+# Warning! Building Perl with profiling has frozen my desktop, beware.
 # Perl can compile with ICC profiling. After 'make distclean' you will have to
 # run ./configure again, substituting -prof_gen with -prof_use.
 
@@ -596,4 +609,5 @@
 	* Added -gcc for Iproute2.
 [2006-05-19]
 	* Run 'make check' after building with prof_gen, to generate profiling data.
-
+[2006-05-22]
+	* Added notes for the -ipo option.




More information about the hints mailing list