[CRT] Improve CMake files

This commit is contained in:
Timo Kreuzer 2021-07-28 10:18:12 +02:00
parent 950e814377
commit 8043b76e85
3 changed files with 16 additions and 42 deletions

View file

@ -73,6 +73,7 @@ elseif(ARCH STREQUAL "amd64")
elseif(ARCH STREQUAL "arm")
list(APPEND LIBCNTPR_MATH_SOURCE
math/cos.c
math/floorf.c
math/sin.c
math/sqrt.c
math/arm/__rt_sdiv.c
@ -128,7 +129,6 @@ if(NOT ARCH STREQUAL "i386")
math/cos.c
math/coshf.c
math/expf.c
math/floorf.c
math/fmodf.c
math/log10f.c
math/modff.c

View file

@ -2,32 +2,7 @@
include_directories(include/internal/mingw-w64)
list(APPEND MSVCRTEX_SOURCE
startup/_matherr.c
startup/crtexe.c
startup/wcrtexe.c
startup/crt_handler.c
startup/crtdll.c
startup/_newmode.c
startup/wildcard.c
startup/tlssup.c
startup/mingw_helpers.c
startup/natstart.c
startup/charmax.c
startup/atonexit.c
startup/dllmain.c
startup/pesect.c
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
startup/dllentry.c
startup/reactos.c
${CRT_STARTUP_SOURCE}
misc/dbgrpt.cpp
misc/fltused.c
misc/isblank.c
@ -35,15 +10,6 @@ list(APPEND MSVCRTEX_SOURCE
misc/ofmt_stub.c
stdio/acrt_iob_func.c)
if(MSVC)
list(APPEND MSVCRTEX_SOURCE
startup/threadSafeInit.c)
else()
list(APPEND MSVCRTEX_SOURCE
startup/pseudo-reloc.c
startup/pseudo-reloc-list.c)
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
# Clang performs some optimizations requiring those funtions
list(APPEND MSVCRTEX_SOURCE
@ -95,12 +61,6 @@ elseif(ARCH STREQUAL "arm")
)
endif()
if(MSVC)
list(APPEND MSVCRTEX_SOURCE startup/mscmain.c)
else()
list(APPEND MSVCRTEX_SOURCE startup/gccmain.c)
endif()
set_source_files_properties(${MSVCRTEX_ASM_SOURCE} PROPERTIES COMPILE_DEFINITIONS "_DLL;_MSVCRTEX_")
add_asm_files(msvcrtex_asm ${MSVCRTEX_ASM_SOURCE})

View file

@ -12,6 +12,7 @@ list(APPEND CRT_STARTUP_SOURCE
startup/natstart.c
startup/charmax.c
startup/atonexit.c
startup/dllmain.c
startup/pesect.c
startup/tlsmcrt.c
startup/tlsthrd.c
@ -26,3 +27,16 @@ list(APPEND CRT_STARTUP_SOURCE
startup/dllentry.c
startup/reactos.c
)
if(MSVC)
list(APPEND CRT_STARTUP_SOURCE
startup/mscmain.c
startup/threadSafeInit.c
)
else()
list(APPEND CRT_STARTUP_SOURCE
startup/gccmain.c
startup/pseudo-reloc.c
startup/pseudo-reloc-list.c
)
endif()