From 377dc192bb72f22591d235e82c238df3aabcc8d7 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Mon, 6 Jun 2011 11:44:58 +0000 Subject: [PATCH] [CMAKE] * Fix several modules to compile with the recent gcc versions. * ReactOS now compiles with mingw-w64 gcc 4.6.0 and boots to shell. * Dedicated to dreimer. svn path=/trunk/; revision=52114 --- reactos/dll/win32/actxprxy/CMakeLists.txt | 1 + reactos/dll/win32/kernel32/CMakeLists.txt | 2 +- reactos/dll/win32/lsasrv/CMakeLists.txt | 2 +- reactos/dll/win32/msports/CMakeLists.txt | 2 +- reactos/dll/win32/sti/CMakeLists.txt | 1 + reactos/dll/win32/ufatx/CMakeLists.txt | 4 ++-- reactos/dll/win32/wlanapi/CMakeLists.txt | 2 +- reactos/lib/fslib/vfatxlib/CMakeLists.txt | 6 +++++- reactos/lib/pseh/CMakeLists.txt | 1 + 9 files changed, 14 insertions(+), 7 deletions(-) diff --git a/reactos/dll/win32/actxprxy/CMakeLists.txt b/reactos/dll/win32/actxprxy/CMakeLists.txt index 41b0eb8b69d..9faeaf72240 100644 --- a/reactos/dll/win32/actxprxy/CMakeLists.txt +++ b/reactos/dll/win32/actxprxy/CMakeLists.txt @@ -44,6 +44,7 @@ add_importlibs(actxprxy rpcrt4 ole32 oleaut32 + msvcrt kernel32 ntdll) diff --git a/reactos/dll/win32/kernel32/CMakeLists.txt b/reactos/dll/win32/kernel32/CMakeLists.txt index 59d1b76359e..d60988f39c4 100644 --- a/reactos/dll/win32/kernel32/CMakeLists.txt +++ b/reactos/dll/win32/kernel32/CMakeLists.txt @@ -114,7 +114,7 @@ add_library(kernel32 SHARED ${SOURCE}) set_entrypoint(kernel32 DllMain@12) set_image_base(kernel32 ${baseaddress_kernel32}) -target_link_libraries(kernel32 ${PSEH_LIB}) +target_link_libraries(kernel32 chkstk ${PSEH_LIB}) add_importlibs(kernel32 ntdll) add_pch(kernel32 k32.h) diff --git a/reactos/dll/win32/lsasrv/CMakeLists.txt b/reactos/dll/win32/lsasrv/CMakeLists.txt index e5165d4f653..a25157761a8 100644 --- a/reactos/dll/win32/lsasrv/CMakeLists.txt +++ b/reactos/dll/win32/lsasrv/CMakeLists.txt @@ -28,7 +28,7 @@ target_link_libraries(lsasrv wine ${PSEH_LIB}) -add_importlibs(lsasrv rpcrt4 kernel32 ntdll) +add_importlibs(lsasrv rpcrt4 msvcrt kernel32 ntdll) add_dependencies(lsasrv psdk) add_cd_file(TARGET lsasrv DESTINATION reactos/system32 FOR all) add_importlib_target(lsasrv.spec) diff --git a/reactos/dll/win32/msports/CMakeLists.txt b/reactos/dll/win32/msports/CMakeLists.txt index eda162465d2..e95a1eea379 100644 --- a/reactos/dll/win32/msports/CMakeLists.txt +++ b/reactos/dll/win32/msports/CMakeLists.txt @@ -18,7 +18,7 @@ set_module_type(msports win32dll) target_link_libraries(msports wine) -add_importlibs(msports setupapi comctl32 user32 advapi32 kernel32 ntdll) +add_importlibs(msports setupapi comctl32 user32 advapi32 msvcrt kernel32 ntdll) add_cd_file(TARGET msports DESTINATION reactos/system32 FOR all) add_importlib_target(msports.spec) diff --git a/reactos/dll/win32/sti/CMakeLists.txt b/reactos/dll/win32/sti/CMakeLists.txt index 9a06b70d782..bf59c851302 100644 --- a/reactos/dll/win32/sti/CMakeLists.txt +++ b/reactos/dll/win32/sti/CMakeLists.txt @@ -36,6 +36,7 @@ add_importlibs(sti oleaut32 rpcrt4 advapi32 + msvcrt kernel32 ntdll) diff --git a/reactos/dll/win32/ufatx/CMakeLists.txt b/reactos/dll/win32/ufatx/CMakeLists.txt index 8cf783e9fab..98369440c6e 100644 --- a/reactos/dll/win32/ufatx/CMakeLists.txt +++ b/reactos/dll/win32/ufatx/CMakeLists.txt @@ -9,8 +9,8 @@ add_library(ufatx SHARED ${SOURCE}) set_entrypoint(ufatx 0) -target_link_libraries(ufatx vfatxlib -lgcc) -add_importlibs(ufatx kernel32 ntdll) +target_link_libraries(ufatx vfatxlib) +add_importlibs(ufatx msvcrt kernel32 ntdll) add_importlib_target(ufatx.spec) add_dependencies(ufatx psdk) add_cd_file(TARGET ufatx DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/win32/wlanapi/CMakeLists.txt b/reactos/dll/win32/wlanapi/CMakeLists.txt index eeaa6894daf..777a117079f 100644 --- a/reactos/dll/win32/wlanapi/CMakeLists.txt +++ b/reactos/dll/win32/wlanapi/CMakeLists.txt @@ -17,7 +17,7 @@ target_link_libraries(wlanapi wine ${PSEH_LIB}) -add_importlibs(wlanapi rpcrt4 kernel32 ntdll) +add_importlibs(wlanapi rpcrt4 msvcrt kernel32 ntdll) add_importlib_target(wlanapi.spec) add_dependencies(wlanapi psdk) diff --git a/reactos/lib/fslib/vfatxlib/CMakeLists.txt b/reactos/lib/fslib/vfatxlib/CMakeLists.txt index 94ba818ea7b..4c66fd64599 100644 --- a/reactos/lib/fslib/vfatxlib/CMakeLists.txt +++ b/reactos/lib/fslib/vfatxlib/CMakeLists.txt @@ -1,4 +1,8 @@ add_library(vfatxlib fatx.c vfatxlib.c) -add_dependencies(vfatxlib psdk) +if(NOT MSVC) + target_link_libraries(vfatxlib -lgcc) +endif() + +add_dependencies(vfatxlib psdk) diff --git a/reactos/lib/pseh/CMakeLists.txt b/reactos/lib/pseh/CMakeLists.txt index 23207e13a8a..91a20dc23b8 100644 --- a/reactos/lib/pseh/CMakeLists.txt +++ b/reactos/lib/pseh/CMakeLists.txt @@ -14,6 +14,7 @@ if(NOT MSVC) endif() add_library(pseh ${SOURCE}) + target_link_libraries(pseh chkstk) add_dependencies(pseh psdk) else()