- bugfixes for mingw compilers

This commit is contained in:
Mark Vejvoda 2011-01-02 10:29:13 +00:00
parent 83ff486e21
commit fabf42c807
2 changed files with 8 additions and 4 deletions

View File

@ -32,7 +32,11 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
# Default compiler flags
#SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s") ## Strip binary
ADD_DEFINITIONS("-fno-strict-aliasing -frounding-math -fsignaling-nans -mfpmath=sse -msse -rdynamic")
IF(NOT MINGW)
ADD_DEFINITIONS("-fno-strict-aliasing -frounding-math -fsignaling-nans -mfpmath=sse -msse -rdynamic")
ELSE()
ADD_DEFINITIONS("-fno-strict-aliasing -frounding-math -fsignaling-nans -mfpmath=sse -msse")
ENDIF()
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
# Debug compiler flags

View File

@ -37,7 +37,7 @@
#include "cache_manager.h"
// For gcc backtrace on crash!
#ifdef __GNUC__
#if defined(__GNUC__) && !defined(__MINGW32__)
#include <execinfo.h>
#include <cxxabi.h>
#include <signal.h>
@ -259,7 +259,7 @@ public:
string errMsg = (msg != NULL ? msg : "null");
#ifdef __GNUC__
#if defined(__GNUC__) && !defined(__MINGW32__)
errMsg += "\nStack Trace:\n";
//errMsg += "To find line #'s use:\n";
//errMsg += "readelf --debug-dump=decodedline %s | egrep 0xaddress-of-stack\n";
@ -1463,7 +1463,7 @@ __try {
#endif
application_binary=argv[0];
#ifdef __GNUC__
#if defined(__GNUC__) && !defined(__MINGW32__)
signal(SIGSEGV, handleSIGSEGV);
#endif