The attached two patches make it possible to use Intel's icl compiler. At 
least... dbus 1.4 compiled with it. There are two parts: changes to the batch 
file and changes to the python scripts. SOURCEONLY is required.

There is also an extra architecture, intel64, but I guess nobody will ever be 
able to use that, since it's itanium. I'm not sure what kind of binaries the 
ia32 mode generates, since it does support stuff like AVX, apparently, but I've 
asked my contacts at Intel about that.

-- 
Boudewijn Rempt
http://www.valdyas.org, http://www.krita.org, http://www.boudewijnrempt.nl
From df2eb3b7a6f703056d186833b12af85396c53f77 Mon Sep 17 00:00:00 2001
From: Boudewijn Rempt <[email protected]>
Date: Wed, 11 Jul 2012 11:48:27 +0200
Subject: [PATCH 2/2] Add the Intel Composer XE compiler to the various build
 systems

---
 bin/BuildSystem/BoostBuildSystem.py |    3 +++
 bin/BuildSystem/BuildSystemBase.py  |    2 +-
 bin/BuildSystem/CMakeBuildSystem.py |    5 ++++-
 bin/BuildSystem/QMakeBuildSystem.py |    2 ++
 bin/EmergeBase.py                   |    2 ++
 bin/compiler.py                     |   19 ++++++++++++++-----
 bin/info.py                         |    7 +++++++
 bin/shells.py                       |    2 ++
 8 files changed, 35 insertions(+), 7 deletions(-)
 mode change 100644 => 100755 bin/EmergeBase.py

diff --git a/bin/BuildSystem/BoostBuildSystem.py b/bin/BuildSystem/BoostBuildSystem.py
index 6091fc5..bb1d0df 100644
--- a/bin/BuildSystem/BoostBuildSystem.py
+++ b/bin/BuildSystem/BoostBuildSystem.py
@@ -45,6 +45,9 @@ class BoostBuildSystem(BuildSystemBase):
                 options += "msvc-9.0"
             elif compiler.isMSVC2010():
                 options += "msvc-10.0"
+			elif compiler.isICC():
+				options += "icl"
+				
         emergeUserConfig = os.path.join( os.getenv( "KDEROOT" ), "etc", "emerge-boost-config.jam" )
         if os.path.exists( emergeUserConfig ):
             options += " --user-config=" + os.path.join( emergeUserConfig )
diff --git a/bin/BuildSystem/BuildSystemBase.py b/bin/BuildSystem/BuildSystemBase.py
index a8a5538..3a17445 100644
--- a/bin/BuildSystem/BuildSystemBase.py
+++ b/bin/BuildSystem/BuildSystemBase.py
@@ -34,7 +34,7 @@ class BuildSystemBase(EmergeBase):
         elif not self.subinfo.options.make.supportsMultijob:
             if "MAKE" in os.environ:
                 del os.environ["MAKE"]
-        if compiler.isMSVC():
+        if compiler.isMSVC() or compiler.isICC():
             return "nmake /NOLOGO"
         elif compiler.isMinGW():
             return "mingw32-make"
diff --git a/bin/BuildSystem/CMakeBuildSystem.py b/bin/BuildSystem/CMakeBuildSystem.py
index 162f7a0..0ebdd50 100644
--- a/bin/BuildSystem/CMakeBuildSystem.py
+++ b/bin/BuildSystem/CMakeBuildSystem.py
@@ -32,7 +32,7 @@ class CMakeBuildSystem(BuildSystemBase):
                     return "Visual Studio 9 2008"
             else:
                 return "NMake Makefiles"
-        elif compiler.isMSVC():
+        elif compiler.isMSVC() or compiler.isICC():
             return "NMake Makefiles"
         elif compiler.isMinGW():
             return "MinGW Makefiles"
@@ -98,6 +98,9 @@ class CMakeBuildSystem(BuildSystemBase):
         if( not self.buildType() == None ):
             options += " -DCMAKE_BUILD_TYPE=%s" % self.buildType()
 
+        if compiler.isICC():
+            options += " -DCMAKE_C_COMPILER=icl -DCMAKE_CXX_COMPILER=icl "
+			
         if self.buildPlatform() == "WM60" or self.buildPlatform() == "WM65":
             options += " -DCMAKE_SYSTEM_NAME=WinCE -DCMAKE_SYSTEM_VERSION=5.02"
         elif self.buildPlatform() == "WM50":
diff --git a/bin/BuildSystem/QMakeBuildSystem.py b/bin/BuildSystem/QMakeBuildSystem.py
index c6d72b3..37541a4 100644
--- a/bin/BuildSystem/QMakeBuildSystem.py
+++ b/bin/BuildSystem/QMakeBuildSystem.py
@@ -20,6 +20,8 @@ class QMakeBuildSystem(BuildSystemBase):
                 self.platform = "win32-msvc2010"
         elif compiler.isMinGW():
             self.platform = "win32-g++"
+        elif compiler.isICC():
+            self.platform = "win32-icc"
         else:
             utils.die( "QMakeBuildSystem: unsupported compiler platform %s" % self.compiler() )
 
diff --git a/bin/EmergeBase.py b/bin/EmergeBase.py
old mode 100644
new mode 100755
index d077a48..7cbbd8e
--- a/bin/EmergeBase.py
+++ b/bin/EmergeBase.py
@@ -110,6 +110,8 @@ class EmergeBase(object):
             self.__compiler = "mingw"
         elif COMPILER == "mingw4":
             self.__compiler = "mingw4"
+        elif COMPILER == "icc2011":
+            self.__compiler = "icc2011"
         else:
             print("emerge error: KDECOMPILER: '%s' not understood" % COMPILER, file=sys.stderr)
             exit( 1 )
diff --git a/bin/compiler.py b/bin/compiler.py
index e676d32..35e2a1e 100644
--- a/bin/compiler.py
+++ b/bin/compiler.py
@@ -46,7 +46,6 @@ def isMinGW_W64():
 def isMinGW_ARM():
     return isMinGW() and emergePlatform.buildArchitecture() == 'arm-wince'
 
-
 def isMSVC():
     return COMPILER.startswith("msvc")
 
@@ -62,6 +61,11 @@ def isMSVC2010():
 def isMSVC2011():
     return COMPILER == "msvc2011"
 
+def isICC():    
+    return COMPILER.startswith("icc")
+
+def isICC2011():
+    return COMPILER == "icc2011"
 
 def getCompilerName():
     if isMinGW():
@@ -73,8 +77,8 @@ def getCompilerName():
             return "mingw32"
         elif isMinGW_ARM():
             return "arm-wince"
-    elif isMSVC():
-        return COMPILER
+    elif isMSVC() or isICC():
+    	return COMPILER
     else:
         return "Unknown Compiler"
 
@@ -86,6 +90,8 @@ def getSimpleCompilerName():
             return "mingw"
     elif isMSVC():
         return "msvc"
+    elif isICC():
+        "icc"
     else:
         return "Unknown Compiler"
 
@@ -105,12 +111,15 @@ def getMinGWVersion():
 def getVersion():
     if isMinGW():
         return "%s %s" % ( getCompilerName(), getMinGWVersion() )
-    return "Microsoft Visual Studio 20%s" %  COMPILER[len(COMPILER)-2:]
+    elif isICC():
+        return "Intel C++ Composer XE 2011"
+    else:
+        return "Microsoft Visual Studio 20%s" %  COMPILER[len(COMPILER)-2:]
 
 
 if __name__ == '__main__':
     print("Testing Compiler.py")
     print("Version: %s" % getVersion())
     print("Compiler Name: %s" % getCompilerName())
-    print("Compiler Version: %s" % getMinGWVersion())
+    print("Compiler Version: %s" % getVersion())
 
diff --git a/bin/info.py b/bin/info.py
index 732cd5f..b245b33 100644
--- a/bin/info.py
+++ b/bin/info.py
@@ -124,7 +124,11 @@ class infoclass:
             compilerName = "vc90"
         elif os.getenv("KDECOMPILER") == "msvc2010":
             compilerName = "vc100"
+        elif os.getenv("KDECOMPILER") == "icc2011":
+            compilerName = "icc2011"
+			
         ret = ''
+
         # TODO: return '\n'.join(repoUrl + '/' + name + arch + '-' + compilerName + '-' + version + '-' + p + ext for p in packagetypes)
         for packageType in packagetypes:
             ret += repoUrl + '/' + name + arch + '-' + compilerName + '-' + version + '-' + packageType + ext + '\n'
@@ -169,6 +173,9 @@ example:
             compilerName = "vc90"
         elif os.getenv("KDECOMPILER") == "msvc2010":
             compilerName = "vc100"
+        elif os.getenv("KDECOMPILER") == "icc2011":
+            compilerName = "icc2011"
+			
         # TODO: use list comprehension
         ret = []
         for packageType in packagetypes:
diff --git a/bin/shells.py b/bin/shells.py
index 5c40e38..7b209e4 100644
--- a/bin/shells.py
+++ b/bin/shells.py
@@ -29,6 +29,8 @@ class MSysShell(object):
                 cflags += " -O0 -g3 "
         elif compiler.isMSVC():
             utils.putenv("LD", "link.exe")
+        elif compiler.isICC():
+            utils.putenv("LD", "icl.exe")
 
         utils.putenv("CFLAGS", cflags)
         utils.putenv("LDFLAGS", ldflags)
-- 
1.7.5.1

From af0e7fc9f8c5ae2affc8a198472d33dd8d307f7e Mon Sep 17 00:00:00 2001
From: Boudewijn Rempt <[email protected]>
Date: Wed, 11 Jul 2012 11:03:31 +0200
Subject: [PATCH 1/2] Add an Intel Composer XE 2011 compiler option to the
 batch files

Intel has an extra architecture, intel64.
---
 kdeenv.bat              |   25 ++++++++++++++++++++++++-
 kdesettings-example.bat |   16 ++++++++++------
 2 files changed, 34 insertions(+), 7 deletions(-)
 mode change 100644 => 100755 kdesettings-example.bat

diff --git a/kdeenv.bat b/kdeenv.bat
index 1731c61..f767cf4 100644
--- a/kdeenv.bat
+++ b/kdeenv.bat
@@ -137,6 +137,7 @@ if NOT "%EMERGE_SETTINGS_VERSION%" == "" (
     echo KDEGITDIR   : %KDEGITDIR%
     echo PYTHONPATH  : %PYTHONPATH%
     echo DOWNLOADDIR : %DOWNLOADDIR%
+	echo BUILDTYPE : %BUILDTYPE%
     title %KDEROOT% %KDECOMPILER%
 )
 
@@ -194,7 +195,11 @@ if "%KDECOMPILER%" == "mingw" (
     if "%KDECOMPILER%" == "mingw4" ( 
         call :path-mingw
     ) else ( 
-        call :path-msvc 
+		if "%KDECOMPILER%" == "icc2011" (
+			call :path-icc
+		) else (
+			call :path-msvc 
+		)
     )
 )
 
@@ -256,3 +261,21 @@ goto :eof
 
     goto :eof
 
+:path-icc
+	rem For now, only use the default msvc installation with the icc compiler, for future: allow the vs2005, vs2008 and vs2010 switches
+	rem we cannot use %emerge_architecture% since that isn't the right option here.
+	if defined ICCDIR (
+		if %EMERGE_ARCHITECTURE% == intel64 (
+			echo call "!ICCDIR!\bin\compilervars.bat" intel64
+			call "!ICCDIR!\bin\compilervars.bat" intel64
+			goto :eof
+		)
+		else (
+			echo call "!ICCDIR!\bin\compilervars.bat" ia32
+			call "!ICCDIR!\bin\compilervars.bat" ia32
+			goto :eof
+		)
+	)
+
+    goto :eof
+
diff --git a/kdesettings-example.bat b/kdesettings-example.bat
old mode 100644
new mode 100755
index c050f03..ceeec36
--- a/kdesettings-example.bat
+++ b/kdesettings-example.bat
@@ -12,21 +12,24 @@ rem               sure about the consequences)
 rem * msvc2008 - use the Microsoft Visual C++ 2008 compiler
 rem * msvc2010 - use the Microsoft Visual C++ 2010 compiler (not completly tested) 
 rem * msvc2011 - use the Microsoft Visual C++ 2011 compiler (not supported) 
-set KDECOMPILER=mingw4
+rem * icc2011  - use the Intel 2011 C++ Composer compiler (not supported)
+rem set KDECOMPILER=icc2011
 
 rem Here you can set the architecure for which packages are build. 
 rem Currently x86 (32bit), x64 (64) and arm (wince) are supported
 rem 
-rem               x86  x64  arm-wince
-rem  mingw4        x    x       x[1] 
-rem  mingw         x   ---     ---
-rem  msvc2005      x   ---     ---  
-rem  msvc2008      x   ---     ---
+rem               x86  x64  intel64 arm-wince
+rem  mingw4        x    x     ---    x[1] 
+rem  mingw         x   ---    ---    ---
+rem  msvc2005      x   ---    ---    ---  
+rem  msvc2008      x   ---    ---    ---
+rem  icc2011       x   ---     x     ---
 rem 
 rem [1] by dev-utils/cegcc-arm-wince package
 rem 
 set EMERGE_ARCHITECTURE=x86
 rem set EMERGE_ARCHITECTURE=x64
+rem set EMERGE_ARCHITECTURE=intel64
 
 rem substitute pathes by drives (set to 1 to activate)
 rem This option may help to avoid path limit problems in case of long base pathes
@@ -67,6 +70,7 @@ rem This is used to set up the build environment automatically
 if %KDECOMPILER% == msvc2008 set VSDIR=%PROGRAM_FILES%\Microsoft Visual Studio 9.0
 if %KDECOMPILER% == msvc2010 set VSDIR=%PROGRAM_FILES%\Microsoft Visual Studio 10.0
 if %KDECOMPILER% == msvc2011 set VSDIR=%PROGRAM_FILES%\Microsoft Visual Studio 11.0
+if %KDECOMPILER% == icc2011 set ICCDIR=%PROGRAM_FILES%\Intel\Composer XE
 
 rem Here you can adjust the path to the Windows Mobile SDK installation
 rem This is used to set up the cross-compilation environment automatically
-- 
1.7.5.1

_______________________________________________
Kde-windows mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-windows

Reply via email to