[CRT] Fix link issues with __ftol2 when compiling for NT6

__ftol2 is exported from msvcrt on NT6+, not from ntdll for some reason. So native apps still need to statically link _ftol2 and _ftoul2_legacy, but apps linking to msvcrt only need to statically link _ftoul2_legacy (via msvcrtex), when on NT6+.
This commit is contained in:
Timo Kreuzer 2024-08-29 20:57:30 +03:00
parent 95c340dfb7
commit f80d978fc0
5 changed files with 81 additions and 61 deletions

View file

@ -47,7 +47,8 @@ if(ARCH STREQUAL "i386")
endif()
if(MSVC AND DLL_EXPORT_VERSION LESS 0x600)
list(APPEND MSVCRTEX_ASM_SOURCE
except/i386/__CxxFrameHandler3.s)
except/i386/__CxxFrameHandler3.s
math/i386/ftoul2_legacy_asm.s)
list(APPEND MSVCRTEX_SOURCE
except/i386/CxxHandleV8Frame.c)
endif()