revert 45924, not a very clean solution, especially for external libraries and looks...
authorAntony Riakiotakis <kalast@gmail.com>
Tue, 24 Apr 2012 16:14:23 +0000 (16:14 +0000)
committerAntony Riakiotakis <kalast@gmail.com>
Tue, 24 Apr 2012 16:14:23 +0000 (16:14 +0000)
CMakeLists.txt
build_files/scons/config/win64-mingw-config.py
extern/bullet2/patches/MinGW64-nopermissive.patch [deleted file]
extern/bullet2/src/LinearMath/btSerializer.h
intern/audaspace/intern/AUD_Buffer.cpp
intern/audaspace/patches/mingw64-nopermissive.patch [deleted file]
intern/elbeem/intern/ntl_geometrymodel.cpp
intern/elbeem/patches/mingw64_nopermissive.patch [deleted file]
source/gameengine/Expressions/KX_HashedPtr.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_IPO_SGController.cpp

index ad3a293b937dd491098e771aae9c2bb3019eab20..a2926182c5a7ddf41c4b0e86272bcb31d15bd15b 100644 (file)
@@ -1008,10 +1008,8 @@ elseif(WIN32)
 
                if(WITH_MINGW64)
                        #Yes, the point for MinGW64 is moar optimization by default :)
-                       set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -mmmx -msse -msse2")
-                       set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG")
-                       set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
-                       #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
+                       set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -mmmx -msse -msse2 -O3")
+                       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
                        set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} -lpthread")
                        
                        add_definitions(-DFREE_WINDOWS64 -DMS_WIN64)
index 98d45ae2054e88634e883ffaa4a0fcf2d2e17935..0379ea480883924c077d057acb2efea746c447c9 100644 (file)
@@ -176,7 +176,7 @@ CC = 'gcc'
 CXX = 'g++'
 
 CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
-#CXXFLAGS = [ '-fpermissive' ]
+CXXFLAGS = [ '-fpermissive' ]
 
 CPPFLAGS = ['-DWIN32', '-DMS_WIN64', '-DFREE_WINDOWS', '-DFREE_WINDOWS64', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-D_SSIZE_T_']
 REL_CFLAGS = ['-O3', '-mmmx', '-msse', '-msse2']
diff --git a/extern/bullet2/patches/MinGW64-nopermissive.patch b/extern/bullet2/patches/MinGW64-nopermissive.patch
deleted file mode 100644 (file)
index 915f232..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-Index: LinearMath/btSerializer.h
-===================================================================
---- LinearMath/btSerializer.h  (revision 45919)
-+++ LinearMath/btSerializer.h  (working copy)
-@@ -25,8 +25,15 @@
- #endif
- #include <string.h>
-+#if defined(_WIN64)
-+#  ifdef __MINGW64__
-+#    include <basetsd.h>
-+#  endif
-+typedef __int64 int_ptr;
-+#else
-+typedef long int_ptr;
-+#endif
--
- ///only the 32bit versions for now
- extern unsigned char sBulletDNAstr[];
- extern int sBulletDNAlen;
-@@ -247,7 +254,7 @@
-                               cp++;
-                       }
-                       {
--                              nr= (long)cp;
-+                              nr= (int_ptr)cp;
-                       //      long mask=3;
-                               nr= ((nr+3)&~3)-nr;
-                               while (nr--)
-@@ -282,7 +289,7 @@
-                       }
-               {
--                              nr= (long)cp;
-+                              nr= (int_ptr)cp;
-                       //      long mask=3;
-                               nr= ((nr+3)&~3)-nr;
-                               while (nr--)
index a1e766c95cee82225c16164f063aad5e6dbafae6..8a89374c61256144cb6fcc75d8fe3b7312dba378 100644 (file)
@@ -25,14 +25,7 @@ subject to the following restrictions:
 #endif
 #include <string.h>
 
-#if defined(_WIN64)
-#  ifdef __MINGW64__
-#    include <basetsd.h>
-#  endif
-typedef __int64 int_ptr;
-#else
-typedef long int_ptr;
-#endif
+
 
 ///only the 32bit versions for now
 extern unsigned char sBulletDNAstr[];
@@ -254,7 +247,7 @@ protected:
                                cp++;
                        }
                        {
-                               nr= (int_ptr)cp;
+                               nr= (long)cp;
                        //      long mask=3;
                                nr= ((nr+3)&~3)-nr;
                                while (nr--)
@@ -289,7 +282,7 @@ protected:
                        }
 
                {
-                               nr= (int_ptr)cp;
+                               nr= (long)cp;
                        //      long mask=3;
                                nr= ((nr+3)&~3)-nr;
                                while (nr--)
index 624a4d0b2c80060ca650a19a571a3facac2e7cea..b7157f672b4a945386052996d0f31b6f216c932c 100644 (file)
 #include <cstring>
 #include <cstdlib>
 
-#if defined(_WIN64)
-#  ifdef __MINGW64__
-#    include <basetsd.h>
-#  endif
-typedef unsigned __int64 uint_ptr;
-#else
-typedef unsigned long uint_ptr;
-#endif
-
-#define AUD_ALIGN(a) (a + 16 - ((uint_ptr)a & 15))
+#define AUD_ALIGN(a) (a + 16 - ((long)a & 15))
 
 AUD_Buffer::AUD_Buffer(int size)
 {
diff --git a/intern/audaspace/patches/mingw64-nopermissive.patch b/intern/audaspace/patches/mingw64-nopermissive.patch
deleted file mode 100644 (file)
index 64420d2..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-Index: intern/AUD_Buffer.cpp
-===================================================================
---- intern/AUD_Buffer.cpp      (revision 45919)
-+++ intern/AUD_Buffer.cpp      (working copy)
-@@ -33,8 +33,17 @@
- #include <cstring>
- #include <cstdlib>
--#define AUD_ALIGN(a) (a + 16 - ((long)a & 15))
-+#if defined(_WIN64)
-+#  ifdef __MINGW64__
-+#    include <basetsd.h>
-+#  endif
-+typedef unsigned __int64 uint_ptr;
-+#else
-+typedef unsigned long uint_ptr;
-+#endif
-+#define AUD_ALIGN(a) (a + 16 - ((uint_ptr)a & 15))
-+
- AUD_Buffer::AUD_Buffer(int size)
- {
-       m_size = size;
index b518416b63972b6b9cfd7665b3269aa3f1bfaabe..13220736b8eac6a1069becf0e2a860ca94ceb756 100644 (file)
 #endif
 #endif // WIN32
 
-#if defined(_WIN64)
-#  ifdef __MINGW64__
-#    include <basetsd.h>
-#  endif
-typedef __int64 int_ptr;
-#else
-typedef long int_ptr;
-#endif
+
 /******************************************************************************
  * Default Constructor 
  *****************************************************************************/
@@ -171,7 +164,7 @@ int ntlGeometryObjModel::initModel(int numVertices, float *vertices, int numTria
        }
 
        //fprintf(stderr,"initModel DEBUG %d \n",channelSize);
-       debMsgStd("ntlGeometryObjModel::initModel",DM_MSG, "Csize:"<<channelSize<<", Cvert:"<<(int_ptr)(channelVertices) ,10);
+       debMsgStd("ntlGeometryObjModel::initModel",DM_MSG, "Csize:"<<channelSize<<", Cvert:"<<(long)(channelVertices) ,10);
        if(channelVertices && (channelSize>0)) {
                vector<ntlSetVec3f> aniverts;
                vector<ntlSetVec3f> aninorms;
diff --git a/intern/elbeem/patches/mingw64_nopermissive.patch b/intern/elbeem/patches/mingw64_nopermissive.patch
deleted file mode 100644 (file)
index a01e65d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-Index: intern/ntl_geometrymodel.cpp
-===================================================================
---- intern/ntl_geometrymodel.cpp       (revision 45919)
-+++ intern/ntl_geometrymodel.cpp       (working copy)
-@@ -21,7 +21,14 @@
- #endif
- #endif // WIN32
--
-+#if defined(_WIN64)
-+#  ifdef __MINGW64__
-+#    include <basetsd.h>
-+#  endif
-+typedef __int64 int_ptr;
-+#else
-+typedef long int_ptr;
-+#endif
- /******************************************************************************
-  * Default Constructor 
-  *****************************************************************************/
-@@ -164,7 +171,7 @@
-       }
-       //fprintf(stderr,"initModel DEBUG %d \n",channelSize);
--      debMsgStd("ntlGeometryObjModel::initModel",DM_MSG, "Csize:"<<channelSize<<", Cvert:"<<(long)(channelVertices) ,10);
-+      debMsgStd("ntlGeometryObjModel::initModel",DM_MSG, "Csize:"<<channelSize<<", Cvert:"<<(int_ptr)(channelVertices) ,10);
-       if(channelVertices && (channelSize>0)) {
-               vector<ntlSetVec3f> aniverts;
-               vector<ntlSetVec3f> aninorms;
index 84488e3641d3fcc532bdc0507a86da2f07ed6d11..51550d52636bf7bc736c83728ada163034edc0ea 100644 (file)
 /** \file gameengine/Expressions/KX_HashedPtr.cpp
  *  \ingroup expressions
  */
-#ifdef __MINGW64__
-#include <basetsd.h>
-#endif
+
 
 #include "KX_HashedPtr.h"
 
 unsigned int KX_Hash(void * inDWord)
 {
-#ifdef _WIN64
+#if defined(_WIN64) && !defined(FREE_WINDOWS64)
        unsigned __int64 key = (unsigned __int64)inDWord;
 #else
        unsigned long key = (unsigned long)inDWord;
index bdb586b24749de82e4852f65eae649f5993ca01d..c5145ef2171badcf0cdfe67950e6dbc1e6cc6ce5 100644 (file)
  */
 
 
-#if defined(_WIN64)
-#  ifdef __MINGW64__
-#    include <basetsd.h>
-#  endif
+#if defined(_WIN64) && !defined(FREE_WINDOWS64)
 typedef unsigned __int64 uint_ptr;
 #else
 typedef unsigned long uint_ptr;
index b8872f5ddc37a31f08c7cfbc88448c1c2c21675f..950e3c88a9e939f1a1e356de292fe56780c71504 100644 (file)
  */
 
 
-#if defined(_WIN64)
-#  ifdef __MINGW64__
-#    include <basetsd.h>
-#  endif
+#if defined(_WIN64) && !defined(FREE_WINDOWS64)
 typedef unsigned __int64 uint_ptr;
 #else
 typedef unsigned long uint_ptr;