widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #11212
[Merge] lp:~widelands-dev/widelands/gcc_optimize into lp:widelands
Tino has proposed merging lp:~widelands-dev/widelands/gcc_optimize into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/gcc_optimize/+merge/331049
On my system gcc 7.2 (Win10 x64, GCC 7.2 MinGW) still produces corrupt binaries with -O3.
The economy test fails and crashes.
Can anyone reproduce this on another OS?
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/gcc_optimize into lp:widelands.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2017-08-05 14:31:23 +0000
+++ CMakeLists.txt 2017-09-20 11:42:04 +0000
@@ -94,16 +94,16 @@
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(WL_DEBUG_FLAGS "-g -DDEBUG")
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
- if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 6.3))
- message(STATUS "GCC 6.3.0 breaks -03, setting -02")
+ if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.2))
+ message(STATUS "GCC >6.2.0 breaks -03, setting -02")
set(WL_OPTIMIZE_FLAGS "-O2")
else()
set(WL_OPTIMIZE_FLAGS "-O3")
endif ()
set(WL_DEBUG_FLAGS "-DNDEBUG -DNOPARACHUTE")
elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
- if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 6.3))
- message(STATUS "GCC 6.3.0 breaks -03, setting -02")
+ if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.2))
+ message(STATUS "GCC >6.2.0 breaks -03, setting -02")
set(WL_OPTIMIZE_FLAGS "-O2")
else()
set(WL_OPTIMIZE_FLAGS "-O3")
Follow ups