https://git.reactos.org/?p=reactos.git;a=commitdiff;h=82ef7b5df147351981d8b…
commit 82ef7b5df147351981d8b8e9772d55f8aa234d88
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Tue Oct 22 17:44:27 2024 +0300
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Sun Jan 26 18:08:55 2025 +0200
[CMAKE] Do not implicitly link libgcc/stdc++compat to msvcrt
This allows ucrtbase and modules linked to it to be linked to those helper libraries.
---
sdk/cmake/gcc.cmake | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sdk/cmake/gcc.cmake b/sdk/cmake/gcc.cmake
index 1a233c22d47..a628c1b92c7 100644
--- a/sdk/cmake/gcc.cmake
+++ b/sdk/cmake/gcc.cmake
@@ -580,8 +580,8 @@ add_library(libgcc STATIC IMPORTED)
execute_process(COMMAND ${GXX_EXECUTABLE} -print-file-name=libgcc.a OUTPUT_VARIABLE
LIBGCC_LOCATION)
string(STRIP ${LIBGCC_LOCATION} LIBGCC_LOCATION)
set_target_properties(libgcc PROPERTIES IMPORTED_LOCATION ${LIBGCC_LOCATION})
-# libgcc needs kernel32 imports, winpthread, a CRT and msvcrtex
-target_link_libraries(libgcc INTERFACE libwinpthread libkernel32 libmsvcrt msvcrtex)
+# libgcc needs kernel32 and winpthread (an appropriate CRT must be linked manually)
+target_link_libraries(libgcc INTERFACE libwinpthread libkernel32)
add_library(libsupc++ STATIC IMPORTED GLOBAL)
execute_process(COMMAND ${GXX_EXECUTABLE} -print-file-name=libsupc++.a OUTPUT_VARIABLE
LIBSUPCXX_LOCATION)
@@ -602,7 +602,7 @@ execute_process(COMMAND ${GXX_EXECUTABLE} -print-file-name=libstdc++.a
OUTPUT_VA
string(STRIP ${LIBSTDCCXX_LOCATION} LIBSTDCCXX_LOCATION)
set_target_properties(libstdc++ PROPERTIES IMPORTED_LOCATION ${LIBSTDCCXX_LOCATION})
# libstdc++ requires libsupc++ and mingwex provided by GCC
-target_link_libraries(libstdc++ INTERFACE libsupc++ libmingwex)
+target_link_libraries(libstdc++ INTERFACE libsupc++ libmingwex oldnames)
# this is for our SAL annotations
target_compile_definitions(libstdc++ INTERFACE
"$<$<COMPILE_LANGUAGE:CXX>:PAL_STDCPP_COMPAT>")