https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9be24a9d517b80bb1e54ea234c8fd4e29dd957dc

commit 9be24a9d517b80bb1e54ea234c8fd4e29dd957dc
Author:     Timo Kreuzer <timo.kreu...@reactos.org>
AuthorDate: Wed Nov 1 20:09:44 2023 +0200
Commit:     Timo Kreuzer <timo.kreu...@reactos.org>
CommitDate: Sun Jan 7 11:03:08 2024 +0200

    [CMAKE] Add GCC options to make a long double 64 bits
    
    This adds -mlong-double-64 to make the size of a long double 64 bits in GCC 
builds to match MSVC builds.
---
 modules/rostests/winetests/msvcrt/CMakeLists.txt | 2 +-
 sdk/cmake/gcc.cmake                              | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/rostests/winetests/msvcrt/CMakeLists.txt 
b/modules/rostests/winetests/msvcrt/CMakeLists.txt
index 44f4b3bf9cb..40e532ab653 100644
--- a/modules/rostests/winetests/msvcrt/CMakeLists.txt
+++ b/modules/rostests/winetests/msvcrt/CMakeLists.txt
@@ -28,7 +28,7 @@ target_compile_definitions(msvcrt_winetest PRIVATE
     __msvcrt_ulong=ULONG)
 
 if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
-    target_compile_options(msvcrt_winetest PRIVATE -Wno-format 
-Wno-stringop-truncation)
+    target_compile_options(msvcrt_winetest PRIVATE -Wno-format 
-Wno-stringop-truncation -Wno-overflow)
 endif()
 
 set_module_type(msvcrt_winetest win32cui)
diff --git a/sdk/cmake/gcc.cmake b/sdk/cmake/gcc.cmake
index 0eefc577a60..384aec75e8d 100644
--- a/sdk/cmake/gcc.cmake
+++ b/sdk/cmake/gcc.cmake
@@ -42,6 +42,9 @@ endif()
 # note: -fno-common is default since GCC 10
 add_compile_options(-pipe -fms-extensions -fno-strict-aliasing -fno-common)
 
+# A long double is 64 bits
+add_compile_options(-mlong-double-64)
+
 # Prevent GCC from searching any of the default directories.
 # The case for C++ is handled through the reactos_c++ INTERFACE library
 add_compile_options("$<$<NOT:$<COMPILE_LANGUAGE:CXX>>:-nostdinc>")

Reply via email to