2011-05-23 15:50:03 +00:00
|
|
|
|
|
|
|
include_directories(include/internal/mingw-w64)
|
|
|
|
|
|
|
|
if(NOT MSVC)
|
2011-09-03 18:59:14 +00:00
|
|
|
add_compile_flags("-Wno-main")
|
2012-03-10 23:38:37 +00:00
|
|
|
if(LTCG)
|
|
|
|
add_compile_flags("-fno-lto")
|
|
|
|
endif()
|
2011-05-23 15:50:03 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
list(APPEND MSVCRTEX_SOURCE
|
|
|
|
startup/crtexe.c
|
|
|
|
startup/wcrtexe.c
|
2011-06-06 10:01:14 +00:00
|
|
|
startup/crt_handler.c
|
2011-05-23 18:27:16 +00:00
|
|
|
startup/crtdll.c
|
2011-05-23 15:50:03 +00:00
|
|
|
startup/_newmode.c
|
|
|
|
startup/wildcard.c
|
|
|
|
startup/tlssup.c
|
|
|
|
startup/mingw_helpers.c
|
|
|
|
startup/natstart.c
|
|
|
|
startup/charmax.c
|
|
|
|
startup/merr.c
|
2011-07-24 16:45:41 +00:00
|
|
|
startup/atonexit.c
|
2012-08-27 21:34:42 +00:00
|
|
|
startup/dllmain.c
|
2011-05-23 15:50:03 +00:00
|
|
|
startup/txtmode.c
|
2011-06-06 10:01:14 +00:00
|
|
|
startup/pesect.c
|
2011-05-23 15:50:03 +00:00
|
|
|
startup/tlsmcrt.c
|
|
|
|
startup/tlsthrd.c
|
|
|
|
startup/tlsmthread.c
|
|
|
|
startup/cinitexe.c
|
|
|
|
startup/gs_support.c
|
|
|
|
startup/dll_argv.c
|
|
|
|
startup/dllargv.c
|
|
|
|
startup/wdllargv.c
|
|
|
|
startup/crt0_c.c
|
|
|
|
startup/crt0_w.c
|
2011-05-23 18:27:16 +00:00
|
|
|
startup/dllentry.c
|
2012-04-18 15:12:45 +00:00
|
|
|
startup/reactos.c
|
2011-05-23 15:50:03 +00:00
|
|
|
misc/fltused.c
|
2012-07-30 12:56:25 +00:00
|
|
|
misc/isblank.c
|
|
|
|
misc/iswblank.c
|
2013-01-08 20:33:08 +00:00
|
|
|
misc/ofmt_stub.c)
|
2011-05-23 15:50:03 +00:00
|
|
|
|
2019-02-03 23:06:35 +00:00
|
|
|
if(MSVC)
|
|
|
|
list(APPEND MSVCRTEX_SOURCE
|
|
|
|
startup/threadSafeInit.c)
|
|
|
|
else()
|
2011-10-02 18:59:33 +00:00
|
|
|
list(APPEND MSVCRTEX_SOURCE
|
|
|
|
startup/pseudo-reloc.c
|
|
|
|
startup/pseudo-reloc-list.c)
|
2011-06-09 17:59:26 +00:00
|
|
|
endif()
|
|
|
|
|
2012-08-27 18:58:27 +00:00
|
|
|
if(ARCH STREQUAL "i386")
|
2013-01-08 20:33:08 +00:00
|
|
|
list(APPEND MSVCRTEX_ASM_SOURCE
|
2011-10-02 18:59:33 +00:00
|
|
|
except/i386/chkstk_asm.s
|
|
|
|
except/i386/chkstk_ms.s
|
2013-01-08 20:33:08 +00:00
|
|
|
math/i386/ftol2_asm.s
|
|
|
|
math/i386/alldiv_asm.s)
|
|
|
|
list(APPEND MSVCRTEX_SOURCE
|
2011-10-02 18:59:33 +00:00
|
|
|
math/i386/ci.c
|
2012-07-24 16:45:50 +00:00
|
|
|
math/i386/cicos.c
|
|
|
|
math/i386/cilog.c
|
|
|
|
math/i386/cipow.c
|
|
|
|
math/i386/cisin.c
|
2013-01-08 20:33:08 +00:00
|
|
|
math/i386/cisqrt.c)
|
2012-08-27 18:58:27 +00:00
|
|
|
elseif(ARCH STREQUAL "amd64")
|
2013-01-08 20:33:08 +00:00
|
|
|
list(APPEND MSVCRTEX_ASM_SOURCE
|
2011-10-02 18:59:33 +00:00
|
|
|
except/amd64/chkstk_asm.s
|
2011-10-14 08:33:22 +00:00
|
|
|
except/amd64/chkstk_ms.s)
|
2015-05-10 21:04:27 +00:00
|
|
|
elseif(ARCH STREQUAL "arm")
|
|
|
|
list(APPEND MSVCRTEX_SOURCE
|
|
|
|
math/arm/__rt_sdiv.c
|
|
|
|
math/arm/__rt_sdiv64_worker.c
|
|
|
|
math/arm/__rt_udiv.c
|
|
|
|
math/arm/__rt_udiv64_worker.c
|
|
|
|
)
|
|
|
|
list(APPEND MSVCRTEX_ASM_SOURCE
|
|
|
|
except/arm/chkstk_asm.s
|
|
|
|
math/arm/__dtoi64.s
|
|
|
|
math/arm/__dtou64.s
|
|
|
|
math/arm/__i64tod.s
|
|
|
|
math/arm/__i64tos.s
|
2015-05-14 20:20:31 +00:00
|
|
|
math/arm/__stoi64.s
|
|
|
|
math/arm/__stou64.s
|
2015-05-10 21:04:27 +00:00
|
|
|
math/arm/__u64tod.s
|
|
|
|
math/arm/__u64tos.s
|
|
|
|
math/arm/__rt_sdiv64.s
|
|
|
|
math/arm/__rt_srsh.s
|
|
|
|
math/arm/__rt_udiv64.s
|
|
|
|
)
|
2011-05-23 18:27:16 +00:00
|
|
|
endif()
|
|
|
|
|
2011-05-23 15:50:03 +00:00
|
|
|
if(MSVC)
|
2012-08-27 21:34:42 +00:00
|
|
|
list(APPEND MSVCRTEX_SOURCE startup/mscmain.c)
|
2011-05-23 15:50:03 +00:00
|
|
|
else()
|
|
|
|
list(APPEND MSVCRTEX_SOURCE startup/gccmain.c)
|
|
|
|
endif()
|
|
|
|
|
2013-01-08 20:33:08 +00:00
|
|
|
set_source_files_properties(${MSVCRTEX_ASM_SOURCE} PROPERTIES COMPILE_DEFINITIONS "_DLL;_MSVCRTEX_")
|
|
|
|
add_asm_files(msvcrtex_asm ${MSVCRTEX_ASM_SOURCE})
|
|
|
|
|
|
|
|
add_library(msvcrtex ${MSVCRTEX_SOURCE} ${msvcrtex_asm})
|
2011-12-02 21:18:42 +00:00
|
|
|
add_target_compile_definitions(msvcrtex _DLL _MSVCRTEX_)
|
2011-05-23 18:27:16 +00:00
|
|
|
set_source_files_properties(startup/crtdll.c PROPERTIES COMPILE_DEFINITIONS CRTDLL)
|
2011-11-06 13:07:43 +00:00
|
|
|
set_source_files_properties(startup/crtexe.c
|
|
|
|
startup/wcrtexe.c PROPERTIES COMPILE_DEFINITIONS _M_CEE_PURE)
|
2011-05-23 15:50:03 +00:00
|
|
|
|
|
|
|
if(NOT MSVC)
|
2011-06-05 20:57:13 +00:00
|
|
|
target_link_libraries(msvcrtex oldnames)
|
2011-05-23 15:50:03 +00:00
|
|
|
endif()
|
|
|
|
|
2014-10-04 20:26:14 +00:00
|
|
|
if(STACK_PROTECTOR)
|
|
|
|
target_link_libraries(msvcrtex gcc_ssp)
|
|
|
|
endif()
|
|
|
|
|
2011-06-18 20:47:44 +00:00
|
|
|
add_dependencies(msvcrtex psdk asm)
|