Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68826 - trunk/tools/build/v2/tools
From: blelbach_at_[hidden]
Date: 2011-02-13 04:43:50


Author: wash
Date: 2011-02-13 04:43:49 EST (Sun, 13 Feb 2011)
New Revision: 68826
URL: http://svn.boost.org/trac/boost/changeset/68826

Log:
Updates to the intel-linux toolset for newer version of the compiler; namely,
fix the default search paths for intel-linux 8.1, 9.0, 9.1, 10.1, 11.0, 11.1
and 12.0. Also, use the -Os flag for intel 11 and intel 12 - previously this
flag was not available.

Text files modified:
   trunk/tools/build/v2/tools/intel-linux.jam | 62 ++++++++++++++++++++++++++++++++++++---
   1 files changed, 56 insertions(+), 6 deletions(-)

Modified: trunk/tools/build/v2/tools/intel-linux.jam
==============================================================================
--- trunk/tools/build/v2/tools/intel-linux.jam (original)
+++ trunk/tools/build/v2/tools/intel-linux.jam 2011-02-13 04:43:49 EST (Sun, 13 Feb 2011)
@@ -1,4 +1,5 @@
 # Copyright (c) 2003 Michael Stevens
+# Copyright (c) 2011 Bryce Lelbach
 #
 # Use, modification and distribution is subject to the Boost Software
 # License Version 1.0. (See accompanying file LICENSE_1_0.txt or
@@ -44,15 +45,55 @@
                        
 # Initializes the intel-linux toolset
 # version in mandatory
-# name (default icc) is used to invoke the specified intellinux complier
+# name (default icpc) is used to invoke the specified intel-linux complier
 # compile and link options allow you to specify addition command line options for each version
 rule init ( version ? : command * : options * )
 {
     local condition = [ common.check-init-parameters intel-linux
         : version $(version) ] ;
     
+ if $(.debug-configuration)
+ {
+ ECHO "notice: intel-linux version is" $(version) ;
+ }
+
+ local default_path ;
+
+ # Intel C++ Composer XE 2011 for Linux, aka Intel C++ Compiler XE 12.0,
+ # aka intel-linux-12.0. In this version, Intel thankfully decides to install
+ # to a sane 'intel' folder in /opt.
+ if [ MATCH "(12[.]0|12)" : $(version) ]
+ { default_path = /opt/intel/bin ; }
+ # Intel C++ Compiler 11.1.
+ else if [ MATCH "(11[.]1)" : $(version) ]
+ { default_path = /opt/intel_cce_11.1.064.x86_64/bin ; }
+ # Intel C++ Compiler 11.0.
+ else if [ MATCH "(11[.]0|11)" : $(version) ]
+ { default_path = /opt/intel_cce_11.0.074.x86_64/bin ; }
+ # Intel C++ Compiler 10.1.
+ else if [ MATCH "(10[.]1)" : $(version) ]
+ { default_path = /opt/intel_cce_10.1.013_x64/bin ; }
+ # Intel C++ Compiler 9.1.
+ else if [ MATCH "(9[.]1)" : $(version) ]
+ { default_path = /opt/intel_cc_91/bin ; }
+ # Intel C++ Compiler 9.0.
+ else if [ MATCH "(9[.]0|9)" : $(version) ]
+ { default_path = /opt/intel_cc_90/bin ; }
+ # Intel C++ Compiler 8.1.
+ else if [ MATCH "(8[.]1)" : $(version) ]
+ { default_path = /opt/intel_cc_81/bin ; }
+ # Intel C++ Compiler 8.0 - this used to be the default, so now it's the
+ # fallback.
+ else
+ { default_path = /opt/intel_cc_80/bin ; }
+
+ if $(.debug-configuration)
+ {
+ ECHO "notice: default search path for intel-linux is" $(default_path) ;
+ }
+
     command = [ common.get-invocation-command intel-linux : icpc
- : $(command) : /opt/intel_cc_80/bin ] ;
+ : $(command) : $(default_path) ] ;
                 
     common.handle-options intel-linux : $(condition) : $(command) : $(options) ;
 
@@ -77,12 +118,24 @@
             flags intel-linux.compile OPTIONS $(condition)/<inlining>off : "-Ob0" ;
             flags intel-linux.compile OPTIONS $(condition)/<inlining>on : "-Ob1" ;
             flags intel-linux.compile OPTIONS $(condition)/<inlining>full : "-Ob2" ;
+ flags intel-linux.compile OPTIONS $(condition)/<optimization>space : "-O1" ;
+ flags intel-linux.compile OPTIONS $(condition)/<optimization>speed : "-O3 -ip" ;
         }
- else
+ else if $(major) && [ numbers.less $(major) 11 ]
+ {
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>off : "-inline-level=0" ;
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>on : "-inline-level=1" ;
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>full : "-inline-level=2" ;
+ flags intel-linux.compile OPTIONS $(condition)/<optimization>space : "-O1" ;
+ flags intel-linux.compile OPTIONS $(condition)/<optimization>speed : "-O3 -ip" ;
+ }
+ else # newer version of intel do have -Os (at least 11+, don't know about 10)
         {
             flags intel-linux.compile OPTIONS $(condition)/<inlining>off : "-inline-level=0" ;
             flags intel-linux.compile OPTIONS $(condition)/<inlining>on : "-inline-level=1" ;
             flags intel-linux.compile OPTIONS $(condition)/<inlining>full : "-inline-level=2" ;
+ flags intel-linux.compile OPTIONS $(condition)/<optimization>space : "-Os" ;
+ flags intel-linux.compile OPTIONS $(condition)/<optimization>speed : "-O3 -ip" ;
         }
            
         if $(root)
@@ -103,9 +156,6 @@
 
 SPACE = " " ;
 
-flags intel-linux.compile OPTIONS <optimization>space : "-O1" ; # no specific space optimization flag in icc
-flags intel-linux.compile OPTIONS <optimization>speed : "-O3 -ip" ; # no specific space optimization flag in icc
-
 flags intel-linux.compile OPTIONS <warnings>off : -w0 ;
 flags intel-linux.compile OPTIONS <warnings>on : -w1 ;
 flags intel-linux.compile OPTIONS <warnings>all : -w2 ;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk