mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Buildsystem: Add support for compiling with MinGW on Windows
Tested with: - Windows 8 x64 - MySQL 5.5.30 win32 - OpenSSL 1.0.1c (32 bits) - No PCH - MinGW with GCC 4.7.0 TODO: - Fix compile/link with PCH enabled - Fix compile with WheatyExceptonionReport enabled (ignored for now) - Fix compile of .rc files (ignored for now) - Test with more platforms
This commit is contained in:
@@ -564,7 +564,7 @@ void System::getStandardProcessorExtensions() {
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(G3D_WIN32) && !defined(G3D_64BIT) /* G3DFIX: Don't check if on 64-bit Windows platforms */
|
||||
#if defined(G3D_WIN32) && !defined(G3D_64BIT) && !defined(__MINGW32__) /* G3DFIX: Don't check if on 64-bit Windows platforms or using MinGW */
|
||||
#pragma message("Port System::memcpy SIMD to all platforms")
|
||||
/** Michael Herf's fast memcpy */
|
||||
void memcpyMMX(void* dst, const void* src, int nbytes) {
|
||||
@@ -615,7 +615,7 @@ void memcpyMMX(void* dst, const void* src, int nbytes) {
|
||||
#endif
|
||||
|
||||
void System::memcpy(void* dst, const void* src, size_t numBytes) {
|
||||
#if defined(G3D_WIN32) && !defined(G3D_64BIT) /* G3DFIX: Don't check if on 64-bit Windows platforms */
|
||||
#if defined(G3D_WIN32) && !defined(G3D_64BIT) && !defined(__MINGW32__) /* G3DFIX: Don't check if on 64-bit Windows platforms or using MinGW */
|
||||
memcpyMMX(dst, src, numBytes);
|
||||
#else
|
||||
::memcpy(dst, src, numBytes);
|
||||
@@ -625,7 +625,7 @@ void System::memcpy(void* dst, const void* src, size_t numBytes) {
|
||||
|
||||
/** Michael Herf's fastest memset. n32 must be filled with the same
|
||||
character repeated. */
|
||||
#if defined(G3D_WIN32) && !defined(G3D_64BIT) /* G3DFIX: Don't check if on 64-bit Windows platforms */
|
||||
#if defined(G3D_WIN32) && !defined(G3D_64BIT) && !defined(__MINGW32__) /* G3DFIX: Don't check if on 64-bit Windows platforms or using MinGW */
|
||||
#pragma message("Port System::memfill SIMD to all platforms")
|
||||
|
||||
// On x86 processors, use MMX
|
||||
@@ -664,7 +664,7 @@ void memfill(void *dst, int n32, unsigned long i) {
|
||||
|
||||
|
||||
void System::memset(void* dst, uint8 value, size_t numBytes) {
|
||||
#if defined(G3D_WIN32) && !defined(G3D_64BIT) /* G3DFIX: Don't check if on 64-bit Windows platforms */
|
||||
#if defined(G3D_WIN32) && !defined(G3D_64BIT) && !defined(__MINGW32__) /* G3DFIX: Don't check if on 64-bit Windows platforms or using MinGW */
|
||||
uint32 v = value;
|
||||
v = v + (v << 8) + (v << 16) + (v << 24);
|
||||
G3D::memfill(dst, v, numBytes);
|
||||
@@ -1696,7 +1696,7 @@ std::string System::currentDateString() {
|
||||
|
||||
// VC on Intel
|
||||
void System::cpuid(CPUIDFunction func, uint32& areg, uint32& breg, uint32& creg, uint32& dreg) {
|
||||
#if !defined(G3D_64BIT) /* G3DFIX: Don't check if on 64-bit platform */
|
||||
#if !defined(G3D_64BIT) && !defined(__MINGW32__) /* G3DFIX: Don't check if on 64-bit platforms or using MinGW */
|
||||
// Can't copy from assembler direct to a function argument (which is on the stack) in VC.
|
||||
uint32 a,b,c,d;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user