[CMAKE] Build GCC and Clang builds with -fno-common

This commit is contained in:
Victor Perevertkin 2022-04-26 03:15:46 +03:00
parent 93dcc8436c
commit 8f40fc7ede
No known key found for this signature in database
GPG key ID: C750B7222E9C7830
2 changed files with 2 additions and 7 deletions

View file

@ -39,7 +39,8 @@ if(STACK_PROTECTOR)
endif()
# Compiler Core
add_compile_options(-pipe -fms-extensions -fno-strict-aliasing)
# note: -fno-common is default since GCC 10
add_compile_options(-pipe -fms-extensions -fno-strict-aliasing -fno-common)
# Prevent GCC from searching any of the default directories.
# The case for C++ is handled through the reactos_c++ INTERFACE library
@ -54,7 +55,6 @@ elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_compile_options("$<$<COMPILE_LANGUAGE:C>:-Wno-microsoft>")
add_compile_options(-Wno-pragma-pack)
add_compile_options(-fno-associative-math)
add_compile_options(-fcommon)
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0)
# disable "libcall optimization"

View file

@ -55,11 +55,6 @@ if(ARCH STREQUAL "i386")
endif()
endif()
# CLang default to -fno-common from version 11 onward. We are not ready for this now
if (USE_CLANG_CL)
add_compile_options(-fcommon)
endif()
# VS 12+ requires /FS when used in parallel compilations
if(NOT MSVC_IDE)
add_compile_options(/FS)