[#25815] Patch gcc 4.6

with minor edits, made sure it works in CMake too.
This commit is contained in:
Campbell Barton
2011-01-27 00:02:25 +00:00
parent 340e411889
commit 6a2e5ad599
25 changed files with 54 additions and 0 deletions

View File

@@ -193,6 +193,8 @@ CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFIL
CPPFLAGS = [] CPPFLAGS = []
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE'] CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
# g++ 4.6, only needed for bullet
CXXFLAGS += ['-fpermissive']
if WITH_BF_FFMPEG: if WITH_BF_FFMPEG:
# libavutil needs UINT64_C() # libavutil needs UINT64_C()
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ] CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]

View File

@@ -59,6 +59,7 @@
#include <cstring> #include <cstring>
#include <string> #include <string>
#include <limits> #include <limits>
#include <malloc.h>
#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(EIGEN_NO_EXCEPTIONS) #if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(EIGEN_NO_EXCEPTIONS)
#define EIGEN_EXCEPTIONS #define EIGEN_EXCEPTIONS

View File

@@ -319,4 +319,9 @@ set(SRC
src/btBulletDynamicsCommon.h src/btBulletDynamicsCommon.h
) )
if(CMAKE_COMPILER_IS_GNUCC)
# needed for gcc 4.6+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
endif()
blender_add_lib(extern_bullet "${SRC}" "${INC}") blender_add_lib(extern_bullet "${SRC}" "${INC}")

View File

@@ -20,6 +20,9 @@
* *
*/ */
/* for types only, not alloc functions */
#include <malloc.h>
#include "MEM_CacheLimiter.h" #include "MEM_CacheLimiter.h"
#include "MEM_CacheLimiterC-Api.h" #include "MEM_CacheLimiterC-Api.h"

View File

@@ -28,6 +28,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <stddef.h>
#include <string> #include <string>

View File

@@ -23,6 +23,8 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
#include <stddef.h>
#include "SCA_IActuator.h" #include "SCA_IActuator.h"
#include "SCA_2DFilterActuator.h" #include "SCA_2DFilterActuator.h"

View File

@@ -29,6 +29,8 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
#include <stddef.h>
#include <iostream> #include <iostream>
#include "SCA_ActuatorSensor.h" #include "SCA_ActuatorSensor.h"
#include "SCA_EventManager.h" #include "SCA_EventManager.h"

View File

@@ -35,6 +35,8 @@
#pragma warning( disable : 4786 ) #pragma warning( disable : 4786 )
#endif #endif
#include <stddef.h>
#include "SCA_DelaySensor.h" #include "SCA_DelaySensor.h"
#include "SCA_LogicManager.h" #include "SCA_LogicManager.h"
#include "SCA_EventManager.h" #include "SCA_EventManager.h"

View File

@@ -26,6 +26,8 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
#include <stddef.h>
#include "SCA_IController.h" #include "SCA_IController.h"
#include "SCA_LogicManager.h" #include "SCA_LogicManager.h"
#include "SCA_IActuator.h" #include "SCA_IActuator.h"

View File

@@ -26,6 +26,8 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
#include <stddef.h>
#include "SCA_ILogicBrick.h" #include "SCA_ILogicBrick.h"
#include "PyObjectPlus.h" #include "PyObjectPlus.h"

View File

@@ -29,6 +29,8 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
#include <stddef.h>
#include "SCA_ISensor.h" #include "SCA_ISensor.h"
#include "SCA_EventManager.h" #include "SCA_EventManager.h"
#include "SCA_LogicManager.h" #include "SCA_LogicManager.h"

View File

@@ -27,6 +27,9 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
* Sensor for keyboard input * Sensor for keyboard input
*/ */
#include <stddef.h>
#include "SCA_KeyboardSensor.h" #include "SCA_KeyboardSensor.h"
#include "SCA_KeyboardManager.h" #include "SCA_KeyboardManager.h"
#include "SCA_LogicManager.h" #include "SCA_LogicManager.h"

View File

@@ -30,6 +30,8 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
#include <stddef.h>
#include "SCA_MouseSensor.h" #include "SCA_MouseSensor.h"
#include "SCA_EventManager.h" #include "SCA_EventManager.h"
#include "SCA_MouseManager.h" #include "SCA_MouseManager.h"

View File

@@ -29,6 +29,8 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
#include <stddef.h>
#include "SCA_PropertyActuator.h" #include "SCA_PropertyActuator.h"
#include "InputParser.h" #include "InputParser.h"
#include "Operator2Expr.h" #include "Operator2Expr.h"

View File

@@ -29,6 +29,8 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
#include <stddef.h>
#include <iostream> #include <iostream>
#include "SCA_PropertySensor.h" #include "SCA_PropertySensor.h"
#include "Operator2Expr.h" #include "Operator2Expr.h"

View File

@@ -29,6 +29,8 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
#include <stddef.h>
#include "SCA_PythonController.h" #include "SCA_PythonController.h"
#include "SCA_LogicManager.h" #include "SCA_LogicManager.h"
#include "SCA_ISensor.h" #include "SCA_ISensor.h"

View File

@@ -29,6 +29,8 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
#include <stddef.h>
#include "BoolValue.h" #include "BoolValue.h"
#include "IntValue.h" #include "IntValue.h"
#include "FloatValue.h" #include "FloatValue.h"

View File

@@ -29,6 +29,8 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
#include <stddef.h>
#include "SCA_RandomSensor.h" #include "SCA_RandomSensor.h"
#include "SCA_EventManager.h" #include "SCA_EventManager.h"
#include "SCA_RandomEventManager.h" #include "SCA_RandomEventManager.h"

View File

@@ -28,6 +28,8 @@
* Ketsji Logic Extenstion: Network Message Actuator generic implementation * Ketsji Logic Extenstion: Network Message Actuator generic implementation
*/ */
#include <stddef.h>
#include "NG_NetworkScene.h" #include "NG_NetworkScene.h"
#include "KX_NetworkMessageActuator.h" #include "KX_NetworkMessageActuator.h"

View File

@@ -28,6 +28,8 @@
* Ketsji Logic Extenstion: Network Message Sensor generic implementation * Ketsji Logic Extenstion: Network Message Sensor generic implementation
*/ */
#include <stddef.h>
#include "KX_NetworkMessageSensor.h" #include "KX_NetworkMessageSensor.h"
#include "KX_NetworkEventManager.h" #include "KX_NetworkEventManager.h"
#include "NG_NetworkMessage.h" #include "NG_NetworkMessage.h"

View File

@@ -29,6 +29,8 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
#include <stddef.h>
#include "SCA_IActuator.h" #include "SCA_IActuator.h"
#include "KX_GameActuator.h" #include "KX_GameActuator.h"
//#include <iostream> //#include <iostream>

View File

@@ -36,6 +36,7 @@
#pragma warning (disable : 4355) #pragma warning (disable : 4355)
#endif #endif
#include <stddef.h>
#include "ListValue.h" #include "ListValue.h"
#include "SCA_IObject.h" #include "SCA_IObject.h"

View File

@@ -25,6 +25,9 @@
* *
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
#include <stddef.h>
#include "KX_PolygonMaterial.h" #include "KX_PolygonMaterial.h"
#include "BKE_mesh.h" #include "BKE_mesh.h"

View File

@@ -35,6 +35,8 @@
// Please look here for revision history. // Please look here for revision history.
#include <stddef.h>
#include "KX_SCA_ReplaceMeshActuator.h" #include "KX_SCA_ReplaceMeshActuator.h"
#include "KX_MeshProxy.h" #include "KX_MeshProxy.h"

View File

@@ -26,6 +26,9 @@
* *
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
#include <stddef.h>
#include "DummyPhysicsEnvironment.h" #include "DummyPhysicsEnvironment.h"
#include "PHY_IMotionState.h" #include "PHY_IMotionState.h"