Author: akhaldi
Date: Sat Oct 18 14:22:09 2014
New Revision: 64807
URL:
http://svn.reactos.org/svn/reactos?rev=64807&view=rev
Log:
[CMAKE/MSVC]
* Use the runtime checks globally in ReactOS now, not just for user mode modules.
* We no longer need the MS support lib, as Timo kindly implemented one for ReactOS.
* Rename the lib to runtmchk.
[PSEH][CRT]
* Remove some constrictions to seh.s source files, we no longer need them.
[KERNEL32]
* We no longer need to explicitly link to the runtime checks lib.
[FREELDR][KEYBOARD][NTOS][SETUPLDR]
* Link to the runtime checks lib when this mode is enabled.
CORE-8626
Modified:
trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt
trunk/reactos/cmake/CMakeMacros.cmake
trunk/reactos/cmake/msvc.cmake
trunk/reactos/dll/keyboard/CMakeLists.txt
trunk/reactos/dll/win32/kernel32/CMakeLists.txt
trunk/reactos/lib/pseh/i386/seh.s
trunk/reactos/lib/sdk/crt/except/i386/seh.s
trunk/reactos/ntoskrnl/CMakeLists.txt
trunk/reactos/ntoskrnl/ntkrnlmp/CMakeLists.txt
Modified: trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/CMake…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] Sat Oct 18 14:22:09
2014
@@ -213,6 +213,9 @@
if(STACK_PROTECTOR)
target_link_libraries(freeldr_pe gcc_ssp)
target_link_libraries(freeldr_pe_dbg gcc_ssp)
+elseif(RUNTIME_CHECKS)
+ target_link_libraries(freeldr_pe runtmchk)
+ target_link_libraries(freeldr_pe_dbg runtmchk)
endif()
add_dependencies(freeldr_pe asm)
@@ -273,6 +276,9 @@
if(STACK_PROTECTOR)
target_link_libraries(setupldr_pe gcc_ssp)
target_link_libraries(setupldr_pe_dbg gcc_ssp)
+elseif(RUNTIME_CHECKS)
+ target_link_libraries(setupldr_pe runtmchk)
+ target_link_libraries(setupldr_pe_dbg runtmchk)
endif()
add_dependencies(setupldr_pe asm)
Modified: trunk/reactos/cmake/CMakeMacros.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/CMakeMacros.cmake?re…
==============================================================================
--- trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] Sat Oct 18 14:22:09 2014
@@ -502,14 +502,6 @@
if("${LIB}" MATCHES "msvcrt")
add_target_compile_definitions(${_module} _DLL __USE_CRTIMP)
target_link_libraries(${_module} msvcrtex)
- if(MSVC)
- if(RUNTIME_CHECKS)
- if(NOT ${_module} STREQUAL "kernel32")
- add_target_compile_flags(${_module} "/RTC1")
- target_link_libraries(${_module} RunTmChk.lib)
- endif()
- endif()
- endif()
endif()
target_link_libraries(${_module} lib${LIB})
add_dependencies(${_module} lib${LIB})
Modified: trunk/reactos/cmake/msvc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=64807…
==============================================================================
--- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Sat Oct 18 14:22:09 2014
@@ -88,6 +88,7 @@
if(RUNTIME_CHECKS)
add_definitions(-D__RUNTIME_CHECKS__)
+ add_compile_flags("/RTC1")
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO /INCREMENTAL:NO
/SAFESEH:NO /NODEFAULTLIB /RELEASE")
@@ -232,6 +233,11 @@
elseif(${TYPE} STREQUAL "wdmdriver")
add_target_link_flags(${MODULE} "/DRIVER:WDM")
endif()
+
+ if(RUNTIME_CHECKS)
+ target_link_libraries(${MODULE} runtmchk)
+ endif()
+
endfunction()
# Define those for having real libraries
Modified: trunk/reactos/dll/keyboard/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/CMakeLists.tx…
==============================================================================
--- trunk/reactos/dll/keyboard/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/keyboard/CMakeLists.txt [iso-8859-1] Sat Oct 18 14:22:09 2014
@@ -102,6 +102,10 @@
add_target_link_flags(${_keyboard_layout}
"-Wl,-T,${CMAKE_SOURCE_DIR}/kbdlayout.lds")
endif()
+ if(RUNTIME_CHECKS)
+ target_link_libraries(${_keyboard_layout} runtmchk)
+ endif()
+
add_dependencies(${_keyboard_layout} psdk)
add_cd_file(TARGET ${_keyboard_layout} DESTINATION reactos/system32 FOR all)
endforeach()
Modified: trunk/reactos/dll/win32/kernel32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/CMakeLi…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/CMakeLists.txt [iso-8859-1] Sat Oct 18 14:22:09 2014
@@ -106,11 +106,6 @@
################# END HACK #################
target_link_libraries(kernel32 wine chkstk ${PSEH_LIB})
-
-if(RUNTIME_CHECKS)
- target_link_libraries(kernel32 RunTmChk.lib)
-endif()
-
add_importlibs(kernel32 ntdll)
add_pch(kernel32 k32.h SOURCE)
add_dependencies(kernel32 psdk errcodes asm)
Modified: trunk/reactos/lib/pseh/i386/seh.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/pseh/i386/seh.s?rev=64…
==============================================================================
--- trunk/reactos/lib/pseh/i386/seh.s [iso-8859-1] (original)
+++ trunk/reactos/lib/pseh/i386/seh.s [iso-8859-1] Sat Oct 18 14:22:09 2014
@@ -22,12 +22,9 @@
/* GLOBALS *******************************************************************/
-#ifndef __RUNTIME_CHECKS__
PUBLIC __global_unwind2
PUBLIC __local_unwind2
PUBLIC __abnormal_termination
-#endif
-
PUBLIC __except_handler2
PUBLIC __except_handler3
Modified: trunk/reactos/lib/sdk/crt/except/i386/seh.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/except/i386/se…
==============================================================================
--- trunk/reactos/lib/sdk/crt/except/i386/seh.s [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/except/i386/seh.s [iso-8859-1] Sat Oct 18 14:22:09 2014
@@ -25,11 +25,8 @@
PUBLIC __global_unwind2
PUBLIC __local_unwind2
PUBLIC __abnormal_termination
-
-#if !defined(__RUNTIME_CHECKS__) || (defined(__RUNTIME_CHECKS__) &&
!defined(_LIBCNT_))
PUBLIC __except_handler2
PUBLIC __except_handler3
-#endif
/* FUNCTIONS *****************************************************************/
Modified: trunk/reactos/ntoskrnl/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/CMakeLists.txt?re…
==============================================================================
--- trunk/reactos/ntoskrnl/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/CMakeLists.txt [iso-8859-1] Sat Oct 18 14:22:09 2014
@@ -10,7 +10,6 @@
set(NTKRNLMP_ASM_SOURCE ${ASM_SOURCE})
spec2def(ntoskrnl.exe ntoskrnl.spec ADD_IMPORTLIB)
-
add_asm_files(ntoskrnl_asm ${NTOSKRNL_ASM_SOURCE})
add_executable(ntoskrnl
@@ -37,19 +36,12 @@
endif()
endif()
-target_link_libraries(ntoskrnl
- cportlib
- csq
- ${PSEH_LIB}
- cmlib
- rtl
- ${ROSSYM_LIB}
- libcntpr
- wdmguid
- ioevent)
+target_link_libraries(ntoskrnl cportlib csq ${PSEH_LIB} cmlib rtl ${ROSSYM_LIB} libcntpr
wdmguid ioevent)
if(STACK_PROTECTOR)
target_link_libraries(ntoskrnl gcc_ssp)
+elseif(RUNTIME_CHECKS)
+ target_link_libraries(ntoskrnl runtmchk)
endif()
add_importlibs(ntoskrnl hal kdcom bootvid)
Modified: trunk/reactos/ntoskrnl/ntkrnlmp/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntkrnlmp/CMakeLis…
==============================================================================
--- trunk/reactos/ntoskrnl/ntkrnlmp/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ntkrnlmp/CMakeLists.txt [iso-8859-1] Sat Oct 18 14:22:09 2014
@@ -1,3 +1,4 @@
+
include(../ntos.cmake)
spec2def(ntkrnlmp.exe ../ntoskrnl.spec)
@@ -32,19 +33,11 @@
if(STACK_PROTECTOR)
target_link_libraries(ntkrnlmp gcc_ssp)
+elseif(RUNTIME_CHECKS)
+ target_link_libraries(ntkrnlmp runtmchk)
endif()
-target_link_libraries(ntkrnlmp
- cportlib
- csq
- ${PSEH_LIB}
- cmlib
- rtl
- ${ROSSYM_LIB}
- libcntpr
- wdmguid
- ioevent)
-
+target_link_libraries(ntkrnlmp cportlib csq ${PSEH_LIB} cmlib rtl ${ROSSYM_LIB} libcntpr
wdmguid ioevent)
add_importlibs(ntkrnlmp hal kdcom bootvid)
add_pch(ntkrnlmp ${REACTOS_SOURCE_DIR}/ntoskrnl/include/ntoskrnl.h NTKRNLMP_SOURCE)
add_dependencies(ntkrnlmp psdk bugcodes asm)