From ab22ff9ee0d939a4760e956eff3a8b04cb244ef9 Mon Sep 17 00:00:00 2001 From: bugmaster Date: Tue, 8 Oct 2013 11:53:35 +0400 Subject: [PATCH] 0024227: Enable SS2 instructions for OCCT building Update WOK compiler options defaults. Update VS2008 project files generation. Update Code::Blocks files geenration. Correct codeblocks.sh for Linux compatibility Update VS2010/VS2012 project files generation. Update automake building procedure. --- src/WOKBuilderDef/CSF_LIN.edl | 4 ++-- src/WOKBuilderDef/CSF_MAC.edl | 4 ++-- src/WOKBuilderDef/CSF_WNT.edl | 4 ++-- src/WOKTclLib/osutils.tcl | 10 ++++++++++ src/WOKTclLib/templates/codeblocks.sh | 6 +++++- src/WOKTclLib/templates/template.ac | 4 ++-- src/WOKTclLib/templates/template.vc10 | 4 ++++ src/WOKTclLib/templates/template.vc10x | 4 ++++ src/WOKTclLib/templates/template.vc11 | 4 ++++ src/WOKTclLib/templates/template.vc11x | 4 ++++ src/WOKTclLib/templates/template.vc9 | 4 ++++ src/WOKTclLib/templates/template.vc9x | 4 ++++ 12 files changed, 47 insertions(+), 9 deletions(-) diff --git a/src/WOKBuilderDef/CSF_LIN.edl b/src/WOKBuilderDef/CSF_LIN.edl index 757d9f9..ec58b5c 100644 --- a/src/WOKBuilderDef/CSF_LIN.edl +++ b/src/WOKBuilderDef/CSF_LIN.edl @@ -12,7 +12,7 @@ -- gcc tools should be available in PATH -- C++ compiler @set %CSF_CXX_COMPILER = "g++ "; - @set %CSF_CXX_SysOptions = " -fPIC -DPIC -Wall"; + @set %CSF_CXX_SysOptions = " -fPIC -DPIC -mmmx -msse -msse2 -mfpmath=sse -Wall"; @string %CSF_CXX_Options = " -DLIN -DLININTEL -DOCC_CONVERT_SIGNALS -D_GNU_SOURCE=1 " %CSF_PRODUCTS_DEFINES " "; @set %CSF_CXX_ModeOpt = " -O3 -DNDEBUG -DNo_Exception "; @set %CSF_CXX_ModeOptDeb = " -g -O0 -DDEB -D_DEBUG "; @@ -20,7 +20,7 @@ -- C compiler @set %CSF_C_COMPILER = "gcc "; @string %CSF_C_INCLUDE += ""; - @set %CSF_C_SysOptions = " -fPIC -DPIC -Wall"; + @set %CSF_C_SysOptions = " -fPIC -DPIC -mmmx -msse -msse2 -mfpmath=sse -Wall"; @set %CSF_C_Options = " -DLIN -DLININTEL -D_GNU_SOURCE=1 -fexceptions"; @set %CSF_C_ModeOpt = " -O3 -DNDEBUG -DNo_Exception "; @set %CSF_C_ModeOptDeb = " -O0 -g -DDEB -D_DEBUG "; diff --git a/src/WOKBuilderDef/CSF_MAC.edl b/src/WOKBuilderDef/CSF_MAC.edl index 9a1d0d1..9d54479 100755 --- a/src/WOKBuilderDef/CSF_MAC.edl +++ b/src/WOKBuilderDef/CSF_MAC.edl @@ -14,7 +14,7 @@ @set %CSF_CXX_COMPILER = "g++ "; - @set %CSF_CXX_SysOptions = " -fPIC -funsigned-char -Wall -fmessage-length=0"; + @set %CSF_CXX_SysOptions = " -fPIC -funsigned-char -mmmx -msse -msse2 -mfpmath=sse -Wall -fmessage-length=0"; @string %CSF_CXX_Options = " -DOCC_CONVERT_SIGNALS " %CSF_PRODUCTS_DEFINES " "; @if (%MACOSX_USE_GLX == "true") then @string %CSF_CXX_Options += "-DMACOSX_USE_GLX "; @@ -25,7 +25,7 @@ @set %CSF_C_COMPILER = "gcc "; @string %CSF_C_INCLUDE += ""; - @set %CSF_C_SysOptions = " -fPIC -funsigned-char -Wall"; + @set %CSF_C_SysOptions = " -fPIC -funsigned-char -mmmx -msse -msse2 -mfpmath=sse -Wall"; @set %CSF_C_Options = " -fexceptions"; @set %CSF_C_ModeOpt = " -O3 -DNDEBUG -DNo_Exception "; @set %CSF_C_ModeOptDeb = " -gdwarf-2 -O0 -DDEB -D_DEBUG "; diff --git a/src/WOKBuilderDef/CSF_WNT.edl b/src/WOKBuilderDef/CSF_WNT.edl index 6abc894..391b105 100644 --- a/src/WOKBuilderDef/CSF_WNT.edl +++ b/src/WOKBuilderDef/CSF_WNT.edl @@ -17,14 +17,14 @@ -- Visual Studio compilers and tools should be set in PATH @set %CSF_CXX_COMPILER = "cl.exe "; - @set %CSF_CXX_SysOptions = " -nologo -W3 "; + @set %CSF_CXX_SysOptions = " -nologo -arch:SSE2 -W3 "; @string %CSF_CXX_Options = " -DWNT -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE " %CSF_PRODUCTS_DEFINES " "; @set %CSF_CXX_ModeOpt = " -MD -EHa -O2 -Gy -DNDEBUG -DNo_Exception "; @set %CSF_CXX_ModeOptDeb = " -MDd -EHa -Od -Gm -Zi -DDEB -D_DEBUG "; -- C compiler @set %CSF_C_COMPILER = "cl.exe "; - @set %CSF_C_SysOptions = " -nologo -W3 "; + @set %CSF_C_SysOptions = " -nologo -arch:SSE2 -W3 "; @string %CSF_C_Options = " -DWNT -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE " %CSF_PRODUCTS_DEFINES " "; @set %CSF_C_ModeOpt = " -MD -EHa -O2 -Gy -DNDEBUG -DNo_Exception "; @set %CSF_C_ModeOptDeb = " -MDd -EHa -Od -Gm -Zi -DDEB -D_DEBUG "; diff --git a/src/WOKTclLib/osutils.tcl b/src/WOKTclLib/osutils.tcl index 337e897..5451143 100755 --- a/src/WOKTclLib/osutils.tcl +++ b/src/WOKTclLib/osutils.tcl @@ -2345,12 +2345,17 @@ proc osutils:cbp { theOutDir theProjName theSrcFiles theLibsList theFrameworks t puts $aFile "\t\t\t\t" if { "$aWokStation" == "wnt" } { puts $aFile "\t\t\t\t\t" + puts $aFile "\t\t\t\t\t" puts $aFile "\t\t\t\t\t" puts $aFile "\t\t\t\t\t" puts $aFile "\t\t\t\t\t" puts $aFile "\t\t\t\t\t" } else { puts $aFile "\t\t\t\t\t" + puts $aFile "\t\t\t\t\t" + puts $aFile "\t\t\t\t\t" + puts $aFile "\t\t\t\t\t" + puts $aFile "\t\t\t\t\t" } foreach aMacro $theDefines { puts $aFile "\t\t\t\t\t" @@ -2396,6 +2401,7 @@ proc osutils:cbp { theOutDir theProjName theSrcFiles theLibsList theFrameworks t puts $aFile "\t\t\t\t" if { "$aWokStation" == "wnt" } { puts $aFile "\t\t\t\t\t" + puts $aFile "\t\t\t\t\t" puts $aFile "\t\t\t\t\t" puts $aFile "\t\t\t\t\t" puts $aFile "\t\t\t\t\t" @@ -2404,6 +2410,10 @@ proc osutils:cbp { theOutDir theProjName theSrcFiles theLibsList theFrameworks t } else { puts $aFile "\t\t\t\t\t" puts $aFile "\t\t\t\t\t" + puts $aFile "\t\t\t\t\t" + puts $aFile "\t\t\t\t\t" + puts $aFile "\t\t\t\t\t" + puts $aFile "\t\t\t\t\t" } foreach aMacro $theDefines { puts $aFile "\t\t\t\t\t" diff --git a/src/WOKTclLib/templates/codeblocks.sh b/src/WOKTclLib/templates/codeblocks.sh index 92f2ba2..8e87c86 100755 --- a/src/WOKTclLib/templates/codeblocks.sh +++ b/src/WOKTclLib/templates/codeblocks.sh @@ -4,4 +4,8 @@ export TARGET="cbp" source ./env.sh "$TARGET" "$1" -/Applications/CodeBlocks.app/Contents/MacOS/CodeBlocks ./adm/mac/cbp/OCCT.workspace +if [ -e "/Applications/CodeBlocks.app/Contents/MacOS/CodeBlocks" ]; then + /Applications/CodeBlocks.app/Contents/MacOS/CodeBlocks ./adm/$WOKSTATION/cbp/OCCT.workspace +else + codeblocks ./adm/$WOKSTATION/cbp/OCCT.workspace +fi diff --git a/src/WOKTclLib/templates/template.ac b/src/WOKTclLib/templates/template.ac index d67497b..c1501bd 100644 --- a/src/WOKTclLib/templates/template.ac +++ b/src/WOKTclLib/templates/template.ac @@ -143,8 +143,8 @@ CXXFLAGS="$CXXFLAGS -DCSFDB -DOCC_CONVERT_SIGNALS" CFLAGS="$CFLAGS -DCSFDB -DOCC_CONVERT_SIGNALS" case $platform in - Linux*) CXXFLAGS="$CXXFLAGS -DLIN -DLININTEL -D_GNU_SOURCE=1 -Wall" - CFLAGS="$CFLAGS -DLIN -DLININTEL -fexceptions -Wall" + Linux*) CXXFLAGS="$CXXFLAGS -DLIN -DLININTEL -D_GNU_SOURCE=1 -mmmx -msse -msse2 -mfpmath=sse -Wall" + CFLAGS="$CFLAGS -DLIN -DLININTEL -fexceptions -mmmx -msse -msse2 -mfpmath=sse -Wall" LDFLAGS="$LDFLAGS -lstdc++ -lrt";; SunOS*) CXXFLAGS="$CXXFLAGS -Usun -DSOLARIS -instances=static" CFLAGS="$CFLAGS -Usun -DSOLARIS -instances=static" diff --git a/src/WOKTclLib/templates/template.vc10 b/src/WOKTclLib/templates/template.vc10 index a52d31a..a09e909 100644 --- a/src/WOKTclLib/templates/template.vc10 +++ b/src/WOKTclLib/templates/template.vc10 @@ -92,6 +92,7 @@ Level4 true 4996;%(DisableSpecificWarnings) + StreamingSIMDExtensions2 ..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) @@ -135,6 +136,7 @@ Default 4996;%(DisableSpecificWarnings) EnableFastChecks + StreamingSIMDExtensions2 ..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) @@ -178,6 +180,7 @@ Level4 true 4996;%(DisableSpecificWarnings) + StreamingSIMDExtensions2 ..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) @@ -221,6 +224,7 @@ Default 4996;%(DisableSpecificWarnings) EnableFastChecks + StreamingSIMDExtensions2 ..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) diff --git a/src/WOKTclLib/templates/template.vc10x b/src/WOKTclLib/templates/template.vc10x index 8347dde..a6b7269 100644 --- a/src/WOKTclLib/templates/template.vc10x +++ b/src/WOKTclLib/templates/template.vc10x @@ -92,6 +92,7 @@ Level4 true 4996;%(DisableSpecificWarnings) + StreamingSIMDExtensions2 ..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) @@ -133,6 +134,7 @@ ProgramDatabase Default 4996;%(DisableSpecificWarnings) + StreamingSIMDExtensions2 EnableFastChecks @@ -176,6 +178,7 @@ Level4 true 4996;%(DisableSpecificWarnings) + StreamingSIMDExtensions2 ..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) @@ -217,6 +220,7 @@ ProgramDatabase Default 4996;%(DisableSpecificWarnings) + StreamingSIMDExtensions2 EnableFastChecks diff --git a/src/WOKTclLib/templates/template.vc11 b/src/WOKTclLib/templates/template.vc11 index dd620f2..e896567 100644 --- a/src/WOKTclLib/templates/template.vc11 +++ b/src/WOKTclLib/templates/template.vc11 @@ -96,6 +96,7 @@ Level4 true 4996;%(DisableSpecificWarnings) + StreamingSIMDExtensions2 ..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) @@ -138,6 +139,7 @@ ProgramDatabase Default 4996;%(DisableSpecificWarnings) + StreamingSIMDExtensions2 EnableFastChecks @@ -182,6 +184,7 @@ Level4 true 4996;%(DisableSpecificWarnings) + StreamingSIMDExtensions2 ..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) @@ -224,6 +227,7 @@ ProgramDatabase Default 4996;%(DisableSpecificWarnings) + StreamingSIMDExtensions2 EnableFastChecks diff --git a/src/WOKTclLib/templates/template.vc11x b/src/WOKTclLib/templates/template.vc11x index 8ec22d2..1b8a8d5 100644 --- a/src/WOKTclLib/templates/template.vc11x +++ b/src/WOKTclLib/templates/template.vc11x @@ -96,6 +96,7 @@ Level4 true 4996;%(DisableSpecificWarnings) + StreamingSIMDExtensions2 ..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) @@ -137,6 +138,7 @@ ProgramDatabase Default 4996;%(DisableSpecificWarnings) + StreamingSIMDExtensions2 EnableFastChecks @@ -180,6 +182,7 @@ Level4 true 4996;%(DisableSpecificWarnings) + StreamingSIMDExtensions2 ..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) @@ -221,6 +224,7 @@ ProgramDatabase Default 4996;%(DisableSpecificWarnings) + StreamingSIMDExtensions2 EnableFastChecks diff --git a/src/WOKTclLib/templates/template.vc9 b/src/WOKTclLib/templates/template.vc9 index c628aa4..c7cc47a 100644 --- a/src/WOKTclLib/templates/template.vc9 +++ b/src/WOKTclLib/templates/template.vc9 @@ -56,6 +56,7 @@ StringPooling="true" ExceptionHandling="2" RuntimeLibrary="2" + EnableEnhancedInstructionSet="2" EnableFunctionLevelLinking="true" PrecompiledHeaderFile=".\..\..\..\win32\vc9\obj\__TKNAM__\__TKNAM__.pch" AssemblerListingLocation=".\..\..\..\win32\vc9\obj\__TKNAM__/" @@ -152,6 +153,7 @@ ExceptionHandling="2" BasicRuntimeChecks="3" RuntimeLibrary="3" + EnableEnhancedInstructionSet="2" PrecompiledHeaderFile=".\..\..\..\win32\vc9\objd\__TKNAM__\__TKNAM__.pch" AssemblerListingLocation=".\..\..\..\win32\vc9\objd\__TKNAM__/" ObjectFile=".\..\..\..\win32\vc9\objd\__TKNAM__/" @@ -248,6 +250,7 @@ StringPooling="true" ExceptionHandling="2" RuntimeLibrary="2" + EnableEnhancedInstructionSet="2" EnableFunctionLevelLinking="true" PrecompiledHeaderFile=".\..\..\..\win64\vc9\obj\__TKNAM__\__TKNAM__.pch" AssemblerListingLocation=".\..\..\..\win64\vc9\obj\__TKNAM__/" @@ -342,6 +345,7 @@ ExceptionHandling="2" BasicRuntimeChecks="3" RuntimeLibrary="3" + EnableEnhancedInstructionSet="2" PrecompiledHeaderFile=".\..\..\..\win64\vc9\objd\__TKNAM__\__TKNAM__.pch" AssemblerListingLocation=".\..\..\..\win64\vc9\objd\__TKNAM__/" ObjectFile=".\..\..\..\win64\vc9\objd\__TKNAM__/" diff --git a/src/WOKTclLib/templates/template.vc9x b/src/WOKTclLib/templates/template.vc9x index de15892..0bc1556 100644 --- a/src/WOKTclLib/templates/template.vc9x +++ b/src/WOKTclLib/templates/template.vc9x @@ -56,6 +56,7 @@ StringPooling="true" ExceptionHandling="2" RuntimeLibrary="2" + EnableEnhancedInstructionSet="2" EnableFunctionLevelLinking="true" AssemblerListingLocation=".\..\..\..\win32\vc9\obj\__XQTNAM__/" ObjectFile=".\..\..\..\win32\vc9\obj\__XQTNAM__/" @@ -146,6 +147,7 @@ ExceptionHandling="2" BasicRuntimeChecks="3" RuntimeLibrary="3" + EnableEnhancedInstructionSet="2" AssemblerListingLocation=".\..\..\..\win32\vc9\objd\__XQTNAM__/" ObjectFile=".\..\..\..\win32\vc9\objd\__XQTNAM__/" ProgramDataBaseFileName=".\..\..\..\win32\vc9\objd\__XQTNAM__/" @@ -238,6 +240,7 @@ StringPooling="true" ExceptionHandling="2" RuntimeLibrary="2" + EnableEnhancedInstructionSet="2" EnableFunctionLevelLinking="true" AssemblerListingLocation=".\..\..\..\win64\vc9\obj\__XQTNAM__/" ObjectFile=".\..\..\..\win64\vc9\obj\__XQTNAM__/" @@ -329,6 +332,7 @@ ExceptionHandling="2" BasicRuntimeChecks="3" RuntimeLibrary="3" + EnableEnhancedInstructionSet="2" AssemblerListingLocation=".\..\..\..\win64\vc9\objd\__XQTNAM__/" ObjectFile=".\..\..\..\win64\vc9\objd\__XQTNAM__/" ProgramDataBaseFileName=".\..\..\..\win64\vc9\objd\__XQTNAM__/" -- 2.39.5