Hello,

With the move to GCC 4.6.0, please consider using ms_hook_prologue. You will especially need this when synching with Wine, as they have moved to 4.6.0.

This will add support for /hotpatch, which is a compatibility requirement.

For example, Steam games use this feature. See http://www.mail-archive.com/wine-devel@winehq.org/msg58308.html.

--
Best regards,
Alex Ionescu

On 2011-06-06, at 7:44 AM, akhaldi@svn.reactos.org wrote:

Author: akhaldi
Date: Mon Jun  6 11:44:58 2011
New Revision: 52114

URL: http://svn.reactos.org/svn/reactos?rev=52114&view=rev
Log:
[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.

Modified:
   trunk/reactos/dll/win32/actxprxy/CMakeLists.txt
   trunk/reactos/dll/win32/kernel32/CMakeLists.txt
   trunk/reactos/dll/win32/lsasrv/CMakeLists.txt
   trunk/reactos/dll/win32/msports/CMakeLists.txt
   trunk/reactos/dll/win32/sti/CMakeLists.txt
   trunk/reactos/dll/win32/ufatx/CMakeLists.txt
   trunk/reactos/dll/win32/wlanapi/CMakeLists.txt
   trunk/reactos/lib/fslib/vfatxlib/CMakeLists.txt
   trunk/reactos/lib/pseh/CMakeLists.txt

Modified: trunk/reactos/dll/win32/actxprxy/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/actxprxy/CMakeLists.txt?rev=52114&r1=52113&r2=52114&view=diff
==============================================================================
--- trunk/reactos/dll/win32/actxprxy/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/actxprxy/CMakeLists.txt [iso-8859-1] Mon Jun  6 11:44:58 2011
@@ -44,6 +44,7 @@
    rpcrt4
    ole32
    oleaut32
+    msvcrt
    kernel32
    ntdll)


Modified: trunk/reactos/dll/win32/kernel32/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/CMakeLists.txt?rev=52114&r1=52113&r2=52114&view=diff
==============================================================================
--- trunk/reactos/dll/win32/kernel32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/CMakeLists.txt [iso-8859-1] Mon Jun  6 11:44:58 2011
@@ -114,7 +114,7 @@
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)

Modified: trunk/reactos/dll/win32/lsasrv/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/CMakeLists.txt?rev=52114&r1=52113&r2=52114&view=diff
==============================================================================
--- trunk/reactos/dll/win32/lsasrv/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/lsasrv/CMakeLists.txt [iso-8859-1] Mon Jun  6 11:44:58 2011
@@ -28,7 +28,7 @@
    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)

Modified: trunk/reactos/dll/win32/msports/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msports/CMakeLists.txt?rev=52114&r1=52113&r2=52114&view=diff
==============================================================================
--- trunk/reactos/dll/win32/msports/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msports/CMakeLists.txt [iso-8859-1] Mon Jun  6 11:44:58 2011
@@ -18,7 +18,7 @@

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)

Modified: trunk/reactos/dll/win32/sti/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/sti/CMakeLists.txt?rev=52114&r1=52113&r2=52114&view=diff
==============================================================================
--- trunk/reactos/dll/win32/sti/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/sti/CMakeLists.txt [iso-8859-1] Mon Jun  6 11:44:58 2011
@@ -36,6 +36,7 @@
    oleaut32
    rpcrt4
    advapi32
+    msvcrt
    kernel32
    ntdll)


Modified: trunk/reactos/dll/win32/ufatx/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ufatx/CMakeLists.txt?rev=52114&r1=52113&r2=52114&view=diff
==============================================================================
--- trunk/reactos/dll/win32/ufatx/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ufatx/CMakeLists.txt [iso-8859-1] Mon Jun  6 11:44:58 2011
@@ -9,8 +9,8 @@

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)

Modified: trunk/reactos/dll/win32/wlanapi/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wlanapi/CMakeLists.txt?rev=52114&r1=52113&r2=52114&view=diff
==============================================================================
--- trunk/reactos/dll/win32/wlanapi/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wlanapi/CMakeLists.txt [iso-8859-1] Mon Jun  6 11:44:58 2011
@@ -17,7 +17,7 @@
    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)

Modified: trunk/reactos/lib/fslib/vfatxlib/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fslib/vfatxlib/CMakeLists.txt?rev=52114&r1=52113&r2=52114&view=diff
==============================================================================
--- trunk/reactos/lib/fslib/vfatxlib/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/lib/fslib/vfatxlib/CMakeLists.txt [iso-8859-1] Mon Jun  6 11:44:58 2011
@@ -1,4 +1,8 @@

add_library(vfatxlib fatx.c vfatxlib.c)
+
+if(NOT MSVC)
+    target_link_libraries(vfatxlib -lgcc)
+endif()
+
add_dependencies(vfatxlib psdk)
-

Modified: trunk/reactos/lib/pseh/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/pseh/CMakeLists.txt?rev=52114&r1=52113&r2=52114&view=diff
==============================================================================
--- trunk/reactos/lib/pseh/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/lib/pseh/CMakeLists.txt [iso-8859-1] Mon Jun  6 11:44:58 2011
@@ -14,6 +14,7 @@
    endif()

    add_library(pseh ${SOURCE})
+    target_link_libraries(pseh chkstk)
    add_dependencies(pseh psdk)

else()