https://git.reactos.org/?p=reactos.git;a=commitdiff;h=aa2697df2da823bd38cd7…
commit aa2697df2da823bd38cd79ace699c848ae510c28
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Thu Jun 24 17:07:26 2021 +0200
Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com>
CommitDate: Thu Jun 24 18:48:31 2021 +0200
[NTOSKRNL] Enforce -fno-common on GCC & CLang builds
---
ntoskrnl/CMakeLists.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ntoskrnl/CMakeLists.txt b/ntoskrnl/CMakeLists.txt
index b3362814e56..0c91c1f7f40 100644
--- a/ntoskrnl/CMakeLists.txt
+++ b/ntoskrnl/CMakeLists.txt
@@ -3,6 +3,11 @@ PROJECT(NTOS)
include(ntos.cmake)
+if (CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
+ # Make sure we don't duplicate some symbols
+ add_compile_options(-fno-common)
+endif()
+
set(NTOSKRNL_SOURCE ${SOURCE})
set(NTOSKRNL_ASM_SOURCE ${ASM_SOURCE})