Merge lp:~widelands-dev/widelands/gcc_optimize into lp:widelands

Proposed by Tino
Status: Merged
Merged at revision: 8459
Proposed branch: lp:~widelands-dev/widelands/gcc_optimize
Merge into: lp:widelands
Diff against target: 24 lines (+4/-4)
1 file modified
CMakeLists.txt (+4/-4)
To merge this branch: bzr merge lp:~widelands-dev/widelands/gcc_optimize
Reviewer Review Type Date Requested Status
SirVer Approve
Review via email: mp+331049@code.launchpad.net

Description of the change

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?

To post a comment you must log in.
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 2682. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/277953618.
Appveyor build 2502. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_gcc_optimize-2502.

Revision history for this message
SirVer (sirver) wrote :

> Can anyone reproduce this on another OS?

I do not have access to gcc 6.2, but -O2 vs -O3 should not make a big difference for Widelands. Thanks for fixing this!

@bunnybot merge

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2017-08-05 14:31:23 +0000
3+++ CMakeLists.txt 2017-09-20 11:42:04 +0000
4@@ -94,16 +94,16 @@
5 if(CMAKE_BUILD_TYPE STREQUAL "Debug")
6 set(WL_DEBUG_FLAGS "-g -DDEBUG")
7 elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
8- if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 6.3))
9- message(STATUS "GCC 6.3.0 breaks -03, setting -02")
10+ if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.2))
11+ message(STATUS "GCC >6.2.0 breaks -03, setting -02")
12 set(WL_OPTIMIZE_FLAGS "-O2")
13 else()
14 set(WL_OPTIMIZE_FLAGS "-O3")
15 endif ()
16 set(WL_DEBUG_FLAGS "-DNDEBUG -DNOPARACHUTE")
17 elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
18- if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 6.3))
19- message(STATUS "GCC 6.3.0 breaks -03, setting -02")
20+ if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.2))
21+ message(STATUS "GCC >6.2.0 breaks -03, setting -02")
22 set(WL_OPTIMIZE_FLAGS "-O2")
23 else()
24 set(WL_OPTIMIZE_FLAGS "-O3")

Subscribers

People subscribed via source and target branches

to status/vote changes: