Author: tkreuzer
Date: Mon May 23 18:27:16 2011
New Revision: 51868
URL:
http://svn.reactos.org/svn/reactos?rev=51868&view=rev
Log:
[CMAKE]
- Remove last traces of mingw_common
- adopt msvcrtex on msvc builds
- Fix MSVC warnings in crtexe.c, already pushed upstream
Added:
trunk/reactos/lib/sdk/crt/misc/ofmt_stub.c
- copied unchanged from r51859, trunk/reactos/lib/3rdparty/mingw/ofmt_stub.c
trunk/reactos/lib/sdk/crt/startup/crtdll.c
- copied unchanged from r51859, trunk/reactos/lib/3rdparty/mingw/crtdll.c
trunk/reactos/lib/sdk/crt/startup/dllentry.c
- copied unchanged from r51859, trunk/reactos/lib/3rdparty/mingw/dllentry.c
trunk/reactos/lib/sdk/crt/startup/pseudo-reloc-list.c
- copied unchanged from r51859,
trunk/reactos/lib/3rdparty/mingw/pseudo-reloc-list.c
Modified:
trunk/reactos/base/applications/kbswitch/kbsdll/CMakeLists.txt
trunk/reactos/base/shell/explorer/CMakeLists.txt
trunk/reactos/base/system/autochk/CMakeLists.txt
trunk/reactos/base/system/smss/CMakeLists.txt
trunk/reactos/dll/3rdparty/libjpeg/CMakeLists.txt
trunk/reactos/dll/3rdparty/libpng/CMakeLists.txt
trunk/reactos/dll/3rdparty/libtiff/CMakeLists.txt
trunk/reactos/dll/win32/dnsapi/CMakeLists.txt
trunk/reactos/dll/win32/olesvr32/CMakeLists.txt
trunk/reactos/dll/win32/winemp3.acm/CMakeLists.txt
trunk/reactos/lib/sdk/crt/CMakeLists.txt
trunk/reactos/lib/sdk/crt/msvcrtex.cmake
trunk/reactos/lib/sdk/crt/startup/crtexe.c
trunk/reactos/msc.cmake
trunk/reactos/subsystems/ntvdm/CMakeLists.txt
Modified: trunk/reactos/base/applications/kbswitch/kbsdll/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/kbswitch…
==============================================================================
--- trunk/reactos/base/applications/kbswitch/kbsdll/CMakeLists.txt [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/kbswitch/kbsdll/CMakeLists.txt [iso-8859-1] Mon May 23
18:27:16 2011
@@ -11,5 +11,5 @@
add_library(kbsdll SHARED ${SOURCE})
set_module_type(kbsdll win32dll)
-add_importlibs(kbsdll user32 comctl32 kernel32 msvcrt)
+add_importlibs(kbsdll user32 comctl32 msvcrt kernel32)
add_cd_file(TARGET kbsdll DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/base/shell/explorer/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/CMakeL…
==============================================================================
--- trunk/reactos/base/shell/explorer/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/CMakeLists.txt [iso-8859-1] Mon May 23 18:27:16
2011
@@ -64,8 +64,6 @@
-lgcc
-lmingwex
wine
- mingw_wmain
- mingw_common
uuid)
add_importlibs(explorer advapi32 gdi32 user32 ws2_32 msimg32 comctl32 ole32 oleaut32
shell32 notifyhook msvcrt kernel32 ntdll)
Modified: trunk/reactos/base/system/autochk/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/autochk/CMakeL…
==============================================================================
--- trunk/reactos/base/system/autochk/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/system/autochk/CMakeLists.txt [iso-8859-1] Mon May 23 18:27:16
2011
@@ -3,6 +3,6 @@
set_module_type(autochk nativecui)
-target_link_libraries(autochk mingw_common nt)
-add_importlibs(autochk kernel32 ntdll)
+target_link_libraries(autochk nt)
+add_importlibs(autochk ntdll)
add_cd_file(TARGET autochk DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/base/system/smss/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/CMakeList…
==============================================================================
--- trunk/reactos/base/system/smss/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/CMakeLists.txt [iso-8859-1] Mon May 23 18:27:16 2011
@@ -25,7 +25,7 @@
add_executable(smss WIN32 ${CMAKE_CURRENT_BINARY_DIR}/smss_smss.h.gch ${SOURCE})
-target_link_libraries(smss mingw_common nt smlib)
+target_link_libraries(smss nt smlib)
if(MSVC)
target_link_libraries(smss msvcsup)
set_entrypoint(smss DllMainCRTStartup)
Modified: trunk/reactos/dll/3rdparty/libjpeg/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libjpeg/CMake…
==============================================================================
--- trunk/reactos/dll/3rdparty/libjpeg/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/3rdparty/libjpeg/CMakeLists.txt [iso-8859-1] Mon May 23 18:27:16
2011
@@ -61,11 +61,6 @@
set_entrypoint(libjpeg 0)
-if(MSVC)
-# for _fltused
-target_link_libraries(libjpeg mingw_common)
-endif()
-
add_importlibs(libjpeg msvcrt kernel32)
add_dependencies(libjpeg psdk)
Modified: trunk/reactos/dll/3rdparty/libpng/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/CMakeL…
==============================================================================
--- trunk/reactos/dll/3rdparty/libpng/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/3rdparty/libpng/CMakeLists.txt [iso-8859-1] Mon May 23 18:27:16
2011
@@ -30,7 +30,7 @@
set_entrypoint(libpng 0)
-target_link_libraries(libpng mingw_common zlib)
+target_link_libraries(libpng zlib)
add_importlibs(libpng msvcrt kernel32)
Modified: trunk/reactos/dll/3rdparty/libtiff/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libtiff/CMake…
==============================================================================
--- trunk/reactos/dll/3rdparty/libtiff/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/3rdparty/libtiff/CMakeLists.txt [iso-8859-1] Mon May 23 18:27:16
2011
@@ -53,7 +53,7 @@
set_entrypoint(libtiff 0)
-target_link_libraries(libtiff mingw_common zlib getopt)
+target_link_libraries(libtiff zlib getopt)
add_importlibs(libtiff user32 msvcrt kernel32)
Modified: trunk/reactos/dll/win32/dnsapi/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dnsapi/CMakeList…
==============================================================================
--- trunk/reactos/dll/win32/dnsapi/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dnsapi/CMakeLists.txt [iso-8859-1] Mon May 23 18:27:16 2011
@@ -28,10 +28,6 @@
set_entrypoint(dnsapi 0)
target_link_libraries(dnsapi adns)
-if(MSVC)
- target_link_libraries(dnsapi msvcsup)
-endif()
-
add_importlibs(dnsapi user32 ws2_32 iphlpapi msvcrt kernel32 ntdll)
add_pch(dnsapi ${CMAKE_CURRENT_SOURCE_DIR}/dnsapi/precomp.h ${SOURCE})
add_dependencies(dnsapi psdk)
Modified: trunk/reactos/dll/win32/olesvr32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/olesvr32/CMakeLi…
==============================================================================
--- trunk/reactos/dll/win32/olesvr32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/olesvr32/CMakeLists.txt [iso-8859-1] Mon May 23 18:27:16 2011
@@ -13,9 +13,7 @@
set_entrypoint(olesvr32 0)
-target_link_libraries(olesvr32
- wine
- mingw_common)
+target_link_libraries(olesvr32 wine)
add_importlibs(olesvr32 kernel32 ntdll)
add_dependencies(olesvr32 psdk)
Modified: trunk/reactos/dll/win32/winemp3.acm/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winemp3.acm/CMak…
==============================================================================
--- trunk/reactos/dll/win32/winemp3.acm/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/winemp3.acm/CMakeLists.txt [iso-8859-1] Mon May 23 18:27:16
2011
@@ -18,7 +18,6 @@
set_target_properties(winemp3.acm PROPERTIES SUFFIX "")
target_link_libraries(winemp3.acm
- mingw_common
wine
libmpg123)
Modified: trunk/reactos/lib/sdk/crt/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/CMakeLists.txt…
==============================================================================
--- trunk/reactos/lib/sdk/crt/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/CMakeLists.txt [iso-8859-1] Mon May 23 18:27:16 2011
@@ -7,18 +7,6 @@
include(libcntpr.cmake)
include(msvcrtex.cmake)
include(oldnames.cmake)
-
-if(MSVC)
-# This is a temporary solution until we have proper crt libs
- list(APPEND MSVCSUP_SOURCE
- misc/fltused.c
- except/i386/chkstk_asm.s
- math/i386/ci.c
- math/i386/ftol2_asm.S)
-
- add_library(msvcsup ${MSVCSUP_SOURCE})
- add_dependencies(msvcsup psdk asm)
-endif()
add_library(user32_wsprintf
printf/streamout.c
Modified: trunk/reactos/lib/sdk/crt/msvcrtex.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/msvcrtex.cmake…
==============================================================================
--- trunk/reactos/lib/sdk/crt/msvcrtex.cmake [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/msvcrtex.cmake [iso-8859-1] Mon May 23 18:27:16 2011
@@ -8,6 +8,7 @@
list(APPEND MSVCRTEX_SOURCE
startup/crtexe.c
startup/wcrtexe.c
+ startup/crtdll.c
startup/_newmode.c
startup/wildcard.c
startup/tlssup.c
@@ -18,6 +19,7 @@
startup/atonexit.c
startup/txtmode.c
startup/pseudo-reloc.c
+ startup/pseudo-reloc-list.c
startup/tlsmcrt.c
startup/tlsthrd.c
startup/tlsmthread.c
@@ -28,9 +30,19 @@
startup/wdllargv.c
startup/crt0_c.c
startup/crt0_w.c
+ startup/dllentry.c
+ misc/fltused.c
+ misc/ofmt_stub.c
+)
- misc/fltused.c
+if(ARCH MATCHES i386)
+list(APPEND MSVCRTEX_SOURCE
+ except/i386/chkstk_asm.s
+ math/i386/ci.c
+ math/i386/ftol2_asm.S
+ math/i386/alldiv_asm.s
)
+endif()
if(MSVC)
list(APPEND MSVCRTEX_SOURCE startup/mscmain.c)
@@ -40,6 +52,7 @@
add_library(msvcrtex ${MSVCRTEX_SOURCE})
set_target_properties(msvcrtex PROPERTIES COMPILE_DEFINITIONS _M_CEE_PURE)
+set_source_files_properties(startup/crtdll.c PROPERTIES COMPILE_DEFINITIONS CRTDLL)
if(NOT MSVC)
target_link_libraries(msvcrtex oldnames)
Modified: trunk/reactos/lib/sdk/crt/startup/crtexe.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/startup/crtexe…
==============================================================================
--- trunk/reactos/lib/sdk/crt/startup/crtexe.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/startup/crtexe.c [iso-8859-1] Mon May 23 18:27:16 2011
@@ -56,7 +56,7 @@
#if defined(__GNUC__)
int _MINGW_INSTALL_DEBUG_MATHERR __attribute__((weak)) = 0;
#else
-int _MINGW_INSTALL_DEBUG_MATHERR = 0;
+int __declspec(selectany) _MINGW_INSTALL_DEBUG_MATHERR = 0;
#endif
extern int __defaultmatherr;
extern _CRTIMP void __cdecl _initterm(_PVFV *, _PVFV *);
@@ -108,8 +108,8 @@
static int __cdecl pre_c_init (void);
static void __cdecl pre_cpp_init (void);
static void __cdecl __mingw_prepare_except_for_msvcr80_and_higher (void);
-_CRTALLOC(".CRT$XIAA") _PIFV mingw_pcinit = pre_c_init;
-_CRTALLOC(".CRT$XCAA") _PVFV mingw_pcppinit = pre_cpp_init;
+_CRTALLOC(".CRT$XIAA") _PIFV __declspec(selectany) mingw_pcinit = pre_c_init;
+_CRTALLOC(".CRT$XCAA") _PVFV __declspec(selectany) mingw_pcppinit =
pre_cpp_init;
static int __cdecl
pre_c_init (void)
Modified: trunk/reactos/msc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/msc.cmake?rev=51868&r1…
==============================================================================
--- trunk/reactos/msc.cmake [iso-8859-1] (original)
+++ trunk/reactos/msc.cmake [iso-8859-1] Mon May 23 18:27:16 2011
@@ -26,7 +26,7 @@
add_definitions(-D__x86_64)
endif()
-link_directories("${REACTOS_BINARY_DIR}/importlibs"
${REACTOS_BINARY_DIR}/lib/3rdparty/mingw)
+link_directories("${REACTOS_BINARY_DIR}/importlibs"
${REACTOS_BINARY_DIR}/lib/sdk/crt)
set(CMAKE_RC_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_LIBRARY})
set(CMAKE_ASM_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_LIBRARY})
@@ -70,28 +70,21 @@
if(${TYPE} MATCHES nativecui)
set_subsystem(${MODULE} native)
set_entrypoint(${MODULE} NtProcessStartup@4)
- endif()
- if (${TYPE} MATCHES win32gui)
+ elseif (${TYPE} MATCHES win32gui)
set_subsystem(${MODULE} windows)
- set_entrypoint(${MODULE} WinMainCRTStartup)
if(IS_UNICODE)
- target_link_libraries(${MODULE} mingw_wmain)
+ set_entrypoint(${MODULE} wWinMainCRTStartup)
else()
- target_link_libraries(${MODULE} mingw_main)
- endif()
- target_link_libraries(${MODULE} mingw_common msvcsup)
- endif ()
- if (${TYPE} MATCHES win32cui)
+ set_entrypoint(${MODULE} WinMainCRTStartup)
+ endif(IS_UNICODE)
+ elseif (${TYPE} MATCHES win32cui)
set_subsystem(${MODULE} console)
- set_entrypoint(${MODULE} mainCRTStartup)
if(IS_UNICODE)
- target_link_libraries(${MODULE} mingw_wmain)
+ set_entrypoint(${MODULE} wmainCRTStartup)
else()
- target_link_libraries(${MODULE} mingw_main)
- endif()
- target_link_libraries(${MODULE} mingw_common msvcsup)
- endif ()
- if(${TYPE} MATCHES win32dll)
+ set_entrypoint(${MODULE} mainCRTStartup)
+ endif(IS_UNICODE)
+ elseif(${TYPE} MATCHES win32dll)
# Need this only because mingw library is broken
set_entrypoint(${MODULE} DllMainCRTStartup@12)
if(DEFINED baseaddress_${MODULE})
@@ -99,29 +92,23 @@
else()
message(STATUS "${MODULE} has no base address")
endif()
- target_link_libraries(${MODULE} mingw_common mingw_dllmain msvcsup)
add_linkerflag(${MODULE} "/DLL")
- endif()
- if(${TYPE} MATCHES win32ocx)
+ elseif(${TYPE} MATCHES win32ocx)
set_entrypoint(${MODULE} DllMainCRTStartup@12)
set_target_properties(${MODULE} PROPERTIES SUFFIX ".ocx")
- target_link_libraries(${MODULE} mingw_common mingw_dllmain msvcsup)
add_linkerflag(${MODULE} "/DLL")
- endif()
- if(${TYPE} MATCHES cpl)
+ elseif(${TYPE} MATCHES cpl)
set_entrypoint(${MODULE} DllMainCRTStartup@12)
set_target_properties(${MODULE} PROPERTIES SUFFIX ".cpl")
- target_link_libraries(${MODULE} mingw_common mingw_dllmain msvcsup)
add_linkerflag(${MODULE} "/DLL")
- endif()
- if(${TYPE} MATCHES kernelmodedriver)
+ elseif(${TYPE} MATCHES kernelmodedriver)
set_target_properties(${MODULE} PROPERTIES SUFFIX ".sys")
set_entrypoint(${MODULE} DriverEntry@8)
set_subsystem(${MODULE} native)
set_image_base(${MODULE} 0x00010000)
add_linkerflag(${MODULE} "/DRIVER")
add_dependencies(${MODULE} bugcodes)
- target_link_libraries(${MODULE} msvcsup)
+ target_link_libraries(${MODULE})
endif()
endmacro()
@@ -182,6 +169,9 @@
macro(add_importlibs MODULE)
foreach(LIB ${ARGN})
+ if ("${LIB}" MATCHES "msvcrt")
+ target_link_libraries(${MODULE} msvcrtex)
+ endif()
target_link_libraries(${MODULE} ${CMAKE_BINARY_DIR}/importlibs/lib${LIB}.lib)
add_dependencies(${MODULE} lib${LIB})
endforeach()
Modified: trunk/reactos/subsystems/ntvdm/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/ntvdm/CMakeList…
==============================================================================
--- trunk/reactos/subsystems/ntvdm/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/subsystems/ntvdm/CMakeLists.txt [iso-8859-1] Mon May 23 18:27:16 2011
@@ -9,11 +9,7 @@
set_module_type(ntvdm win32cui)
-target_link_libraries(ntvdm
- mingw_main
- mingw_common)
-
-add_importlibs(ntvdm ntdll user32 gdi32 advapi32 kernel32 msvcrt)
+add_importlibs(ntvdm ntdll user32 gdi32 advapi32 msvcrt kernel32)
add_dependencies(ntvdm ndk bugcodes)
-add_cd_file(TARGET ntvdm DESTINATION reactos/system32 FOR all)
+add_cd_file(TARGET ntvdm DESTINATION reactos/system32 FOR all)