diff options
author | Hein-Pieter van Braam <hp@tmm.cx> | 2017-12-15 23:32:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-15 23:32:33 +0100 |
commit | 747d1c96a493883a70d2e3b0178f6dde36aff48a (patch) | |
tree | cbfef502383256d22890613bebb292b61b294498 | |
parent | a0dd3abad9e87a3a9b1c1af0df301c873a934271 (diff) | |
parent | 241de95884ae7c0985d03d534b085b1b147ceed8 (diff) |
Merge pull request #14723 from hpvb/fix-thekla-ming-32bit-build
Fix 32bit MingW build for thekla_altas
-rw-r--r-- | platform/windows/detect.py | 2 | ||||
-rw-r--r-- | thirdparty/thekla_atlas/nvcore/Debug.cpp | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py index bc8be7f034..01eb50e69c 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -269,7 +269,7 @@ def configure(env): if (env["openmp"]): env.Append(CPPFLAGS=['-fopenmp']) - env.Append(LIBS=['gomp']) + env.Append(LINKFLAGS=['-fopenmp']) ## Compile flags diff --git a/thirdparty/thekla_atlas/nvcore/Debug.cpp b/thirdparty/thekla_atlas/nvcore/Debug.cpp index 81498c219e..4980ffa916 100644 --- a/thirdparty/thekla_atlas/nvcore/Debug.cpp +++ b/thirdparty/thekla_atlas/nvcore/Debug.cpp @@ -394,8 +394,10 @@ namespace #pragma warning(disable:4748) static NV_NOINLINE int backtrace(void * trace[], int maxcount) { CONTEXT ctx = { 0 }; +// -- GODOT start -- #if NV_CPU_X86 && !NV_CPU_X86_64 ctx.ContextFlags = CONTEXT_CONTROL; +#if NV_CC_MSVC _asm { call x x: pop eax @@ -404,6 +406,13 @@ namespace mov ctx.Esp, esp } #else + register long unsigned int ebp asm("ebp"); + ctx.Eip = (DWORD) __builtin_return_address(0); + ctx.Ebp = ebp; + ctx.Esp = (DWORD) __builtin_frame_address(0); +#endif +// -- GODOT end -- +#else RtlCaptureContext(&ctx); // Not implemented correctly in x86. #endif |