https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f489c3fd078db4fc44e56…
commit f489c3fd078db4fc44e56ddd3add47434805a19b
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Sat Apr 6 16:55:10 2019 +0200
Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com>
CommitDate: Sat Apr 6 17:43:38 2019 +0200
[CMAKE] Clear CMAKE_<LANGUAGE>_IMPLICIT_LINK_LIBRARIES and
_IMPLICIT_LINK_DIRECTORIES
Othrewise, if you link a RC module with a static C library (as done for
fusion DLLs), you get the standard C libraries from GCC. This is not
what we want.
This might have to be done for MSVC builds. Check build.ninja to verify
this.
---
overrides-gcc.cmake | 2 ++
sdk/cmake/gcc.cmake | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/overrides-gcc.cmake b/overrides-gcc.cmake
index d7f7d91927..854caf26aa 100644
--- a/overrides-gcc.cmake
+++ b/overrides-gcc.cmake
@@ -3,4 +3,6 @@ foreach(lang C CXX ASM)
set(CMAKE_${lang}_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_${lang}_FLAGS_RELEASE "")
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG")
+ set(CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES "")
+ set(CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES "")
endforeach()
diff --git a/sdk/cmake/gcc.cmake b/sdk/cmake/gcc.cmake
index 5eee683307..8ecc06b710 100644
--- a/sdk/cmake/gcc.cmake
+++ b/sdk/cmake/gcc.cmake
@@ -63,6 +63,8 @@ if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
set(CMAKE_CXX_COMPILE_OPTIONS_PIE "")
set(CMAKE_SHARED_LIBRARY_C_FLAGS "")
set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
+ set(CMAKE_SHARED_MODULE_C_FLAGS "")
+ set(CMAKE_SHARED_MODULE_CXX_FLAGS "")
set(CMAKE_ASM_FLAGS_DEBUG "")
set(CMAKE_C_FLAGS_DEBUG "")
set(CMAKE_CXX_FLAGS_DEBUG "")
@@ -105,6 +107,9 @@ endif()
if(DEFINED CMAKE_SHARED_LIBRARY_ASM_FLAGS)
string(REPLACE "-fPIC" "" CMAKE_SHARED_LIBRARY_ASM_FLAGS
${CMAKE_SHARED_LIBRARY_ASM_FLAGS})
endif()
+if(DEFINED CMAKE_SHARED_MODULE_ASM_FLAGS)
+ string(REPLACE "-fPIC" "" CMAKE_SHARED_MODULE_ASM_FLAGS
${CMAKE_SHARED_MODULE_ASM_FLAGS})
+endif()
# Tuning
if(ARCH STREQUAL "i386")