-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
gcc: always add libatomic to the image #9395
base: master
Are you sure you want to change the base?
Conversation
gcc is good in generating inline code for atomic operations. But at least in a few cases function calls to libatomic are generated. For Generic the lib is only ~30 KiBytes, size is no matter.
Probably prefer not to see this go in unless we really need it - I agree it is benign. But given that kodi itself does not use libatomic - xbmc/xbmc@1673f47 - should we? Looks to be a Debian gcc-12.2.0 - issue. Working with @CastagnaIT to see if we can update inputstream.adaptive to only include -latomic if it is present / versus forced. Immediate workaround is to patch out the forced -latomic. |
I'm seeing it in LE13 and in my private test build in OpenSuSE 15.5 with gcc 10.x. After latest code changes in inputstream.adaptive the compiler is generating references to libatomic. Use
This result in kodi crashing with
It is just luck that gcc currently does not generate libatomc references when compiling kodi source. That can change any time. Another possibility is to link with static libatomic, this will only change the build system. |
idk why only ISA addon require this, instead on kodi sources there are uses only with base data types (e.g. bool, float...) with an expection on Windows platform code that however is not affected by this problem if you have some better cmake change proposal for the ISA addon let me know |
@mglae tested now, and yes you are right - those objects are referenced on the 22.1.6 build
whereas in 22.1.5 they are not.
@CastagnaIT - it looks like because of |
good to know that it should be used with primitive types only |
i opened a PR to remove in full the atomic code |
new release done, i think you can close this pr |
@CastagnaIT Thanks for your effort. I'm still keeping the PR open, The major information of #9391 for me is that armv7 was working OOTB by just have included libatomic. Let all platforms behave equal. It is just an optimization that libatomic is not needed on X86_64 and aarch64 most of the time. Furthermore "Backport Required" is removed to keep LE12.0.x images compatible to 12.0.0. We have to use static linking on X86_64 and aarch64 if libatomic is really required in the remaining support time. |
gcc is good in generating inline code for atomic operations. But at least in a few cases function calls to libatomic are generated.
The error can be surprising, see #9391
For Generic the lib is only ~30 KiBytes, size is no matter.
Fixes #9391, inpuststream.adaptive 22.1.6 build for Generic and runtime tested