SFTtech / openage

Free (as in freedom) open source clone of the Age of Empires II engine 🚀
http://openage.dev
Other
12.63k stars 1.11k forks source link

Switch minimum compiler version to GCC 4.9/Clang 3.5 #193

Closed mic-e closed 9 years ago

mic-e commented 9 years ago

There has been discussion on the IRC channel about ditching GCC 4.8/Clang 3.4 support in order to make use of some new language features.

The obvious downside is that parts of the user/developer base would need to upgrade their toolchains, which may or may not require unreasonable effort.

I have been assured that Clang 3.5 is available on OSX Mountain Lion and upwards through XCode 6. The recent compiler versions are available on Debian testing-soon-to-be-stable as well as the most recent (non-LTS) version of Ubuntu.

What about mingw cross-compilers and other Linux distributions?

This issue is intended as a platform for discussion.

TheJJ commented 9 years ago

Distro overview:

StepS- commented 9 years ago

:+1:

janisozaur commented 9 years ago

what are the features in question? [1] lists no changes to c++11 support in 4.9, are you guys moving forward to c++14, [2] these look to be 4.9's features? [1] https://gcc.gnu.org/projects/cxx0x.html [2] https://gcc.gnu.org/projects/cxx1y.html

andrekupka commented 9 years ago

One problem is, that pull request https://github.com/SFTtech/openage/pull/192 produces a linker error with gcc 4.8.1. It makes use of thread_local variables. With gcc >= 4.8.2 there are no problems anymore.

mic-e commented 9 years ago

Moving forward to C++14 wouldn't be that much of an issue; it's a matter of changing a single byte in a CMakeLists.txt file, and we definitely want to do that sooner or later.

We're not limiting ourselves to the features provided by a certain standard, we're limiting ourselves to the minimum set of features supported by our supported compiler versions. This is ensured by the Travis CI, which checks every pull request and commit with those minimum compiler versions (and often finds issues due to the fact that on our local machines, we're working with more recent compilers).

Currently we're compiling with -std=c++11 mostly to avoid accidentially using features that Travis would then reject.

So, yes, being able to switch to C++14 would be one of the benefits of dropping support for gcc 4.8/clang 3.4.

franciscod commented 9 years ago

For cross-compiling .exe, Arch has mingw-w64-gcc 4.9.2: https://www.archlinux.org/packages/community/x86_64/mingw-w64-gcc/

For compiling .exe from windows, using a msys2 system, it has 4.9.2 too: https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-gcc/PKGBUILD#L15

TheJJ commented 9 years ago

Hereby I officially request the switch to C++14 and all implied compiler updates :relieved:. Upgrading is the future, and the future starts with: us!

If there are no big counter-arguments, I'll perform the update next week, probably at 2015-02-25 or 2015-02-26

:arrow_right: new minimum versions:

franciscod commented 9 years ago

agreed!

StepS- commented 9 years ago

:+1: