-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
kodi: disable compiler optimization for arm (fixes segmentation fault) #644
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
Conversation
|
Is this fixed by gcc-6? |
|
Yes, but with GCC6 there's an issue with reading FLAC tags (for generic as well). Was thinking to test 6.2 today. |
|
Sounds like a compiler bug, so moving backwards/forwards to a version that doesn't have the bug may be a better choice than changing optimisation level (which could affect performance and will probably be forgotten about long after the compiler bug is fixed). |
|
Obviously a newer gcc may fix this bug and introduce a new one. I guess bumping gcc to latest - check if this bug is fixed and if so get the new build tested in Milhouse/nightly builds to try to spot any regressions. |
|
I agree, except when a new compiler introduces more bugs :) Other than the FLAC issue mentioned 6.1 works fine though (with a few minor fixes). It does however drastically increase build time. |
|
@popcornmix Actually -Os is the default so it will surely not introduce new bugs. This change only reverts the Kodi package to default optimization when OPTIMIZATIONS=normal (-O2) is set in the project options. Eveery package is compiled with -Os by default. |
|
Yes, the default The two supported options are so this change would have no effect whatsoever on current builds that use the default I'd personally rather see if we can work around this with a compiler bump, either gcc 6.1.0 or the future 6.2, |
|
Might be good to have in the 7.0 branch? |
|
OPTIMIZATIONS=normal serves no real purpose and you should completely remove it. EDIT: you should remove any OPTIMIZATIONS, and always use -Os nijna edit: you should also remove -fexcess-precision=.. |
|
The purpose is faster code. |
|
I know what it is, @popcornmix but too many things may (and will) interfere right now :) I dont think -O2 gives you much speed compared to -Os. |
|
I've compiled with -O2 for quite a while (gcc 5.3, 5.4 and 6.1) both for generic/rpi and so far this is the only issue I've come across. The improvement can be neglible but can also be much faster for certain code. Lots of distributions use -O2 as default (Arch for example), and there's plenty of benchmarks that proves it's worth. |
|
as you wish ;) |
|
Don't confuse me for popcornmix btw, we just have the same cool avatar ;) |
|
ouch ;) |
can you share a sample ? |
|
Closing as superseded by #696 |
With OPTIMIZATIONS=normal set in project options, Kodi crashes with segmentation fault when adding to the library. Reproduced only on arm/RPi2, Generic seems fine. Using -Os instead of -O2 avoids the issue.
References:
https://forum.libreelec.tv/thread-302-post-9754.html#pid9754
http://forum.odroid.com/viewtopic.php?f=62&t=20345