New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix LTO with GCC 4.9 #337
Fix LTO with GCC 4.9 #337
Conversation
For LTO to work, GCC 4.9 requires using the wrappers gcc-ar and gcc-ranlibs: http://gcc.gnu.org/gcc-4.9/changes.html CMake doesn't account for this yet: http://public.kitware.com/pipermail/cmake-developers/2014-January/009344.html
|
Do we need to check the gcc version? |
|
No, unless you want to support GCC versions older than 4.7. I usually take Debian stable as a baseline (see Debian buildslave). |
|
Okay; just wanted to make sure you considered it. |
|
Causes build to fail with GCC 4.8.1 |
|
As discussed on IRC: Ubuntu saucy's gcc package doesn't add a gcc-ar --> gcc-ar-4.x symlink. My response would be to just accept the fact that LTO is (currently) broken on saucy (it's fixed in trusty). |
|
If it's Ubuntu failing then I have no reason to not say LGTM. |
|
@sheepdestroyer: Does it compile without ccache or with an empty cache? Either way, can you compile with |
|
|
What happens when you don't use ccache but use GCC directly? |
is there a better way to do it? |
|
Sorry, it's |
|
@sheepdestroyer: No idea, have you tried it completely without ccache? Just use a different build directory. Native CMake support is kinda stalled: http://public.kitware.com/pipermail/cmake-developers/2014-January/009344.html |
|
ran it again from a new folder with CCACHE_DISABLE=1 make -j1 VERBOSE=1 but with same result : |
|
@sheepdestroyer You're still calling ccache, you probably need to |
|
It was not ccache but a bug with binutils, this post from someone with a similar error put me on it : My system originally had binutils 2.24.14 and after building binutils 2.24.51 from git I can now successfully build and run dolphin with gcc 4.9 and lto |
For LTO to work, GCC 4.9 requires using the wrappers gcc-ar and gcc-ranlibs:
http://gcc.gnu.org/gcc-4.9/changes.html
CMake doesn't account for this yet:
http://public.kitware.com/pipermail/cmake-developers/2014-January/009344.html