diff --git a/reactos/lib/sdk/crt/CMakeLists.txt b/reactos/lib/sdk/crt/CMakeLists.txt index 663b57292c4..131995951ec 100644 --- a/reactos/lib/sdk/crt/CMakeLists.txt +++ b/reactos/lib/sdk/crt/CMakeLists.txt @@ -3,6 +3,17 @@ include_directories(include) add_definitions(-D_CRTBLD) +if(ARCH MATCHES i386) + list(APPEND CHKSTK_SOURCE + except/i386/chkstk_asm.s + except/i386/chkstk_ms.s) +elseif(ARCH MATCHES powerpc) + list(APPEND CHKSTK_SOURCE + except/powerpc/chkstk_asm.s) +endif() + +add_library(chkstk ${CHKSTK_SOURCE}) + include(crt.cmake) include(libcntpr.cmake) include(msvcrtex.cmake) diff --git a/reactos/lib/sdk/crt/crt.cmake b/reactos/lib/sdk/crt/crt.cmake index 738106fdfff..5f9c01caa39 100644 --- a/reactos/lib/sdk/crt/crt.cmake +++ b/reactos/lib/sdk/crt/crt.cmake @@ -298,7 +298,6 @@ list(APPEND CRT_SOURCE if(ARCH MATCHES i386) list(APPEND CRT_SOURCE - except/i386/chkstk_asm.s except/i386/prolog.s except/i386/seh.s except/i386/seh_prolog.s @@ -311,7 +310,6 @@ if(ARCH MATCHES i386) setjmp/i386/setjmp.s) elseif(ARCH MATCHES amd64) list(APPEND CRT_SOURCE - except/amd64/chkstk_asm.s except/amd64/seh.s float/i386/clearfp.c float/i386/cntrlfp.c @@ -432,7 +430,7 @@ if(ARCH MATCHES amd64) endif() add_library(crt ${CRT_SOURCE}) - +target_link_libraries(crt chkstk) set_property(TARGET crt PROPERTY COMPILE_DEFINITIONS __MINGW_IMPORT=extern USE_MSVCRT_PREFIX _MSVCRT_LIB_ _MSVCRT_ _MT) add_pch(crt precomp.h) add_dependencies(crt psdk asm) diff --git a/reactos/lib/sdk/crt/libcntpr.cmake b/reactos/lib/sdk/crt/libcntpr.cmake index 8065d454934..c3362d17da0 100644 --- a/reactos/lib/sdk/crt/libcntpr.cmake +++ b/reactos/lib/sdk/crt/libcntpr.cmake @@ -65,6 +65,7 @@ list(APPEND LIBCNTPR_SOURCE if(ARCH MATCHES i386) list(APPEND LIBCNTPR_SOURCE except/i386/chkstk_asm.s + except/i386/chkstk_ms.s except/i386/seh.s except/i386/seh_prolog.s setjmp/i386/setjmp.s