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
rados+rpm: Update symver defs and re-enable LTO #42602
Conversation
It looks like we can't do this just yet. There is no support for the attribute in the older versions of gcc (it might have been introduced in GCC 10 iirc). Maybe, we could do this conditionally -- check if the attribute is supported and fall-back to asm definitions if it is not? |
OK, I have implemented conditional use of the attribute. It will only be used if the compiler supports the symver attribute. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@b-ranto Thanks for this! Could you add
to one of the commits so the git history contains a link to the Redmine issue? (Maybe |
Also, if it's not too much trouble, could we hold off from merging this until I test that it doesn't break the openSUSE Factory build? |
The build fails because the function definitions are out of order. This also reuses the LIBRADOS_C_API_DEFAULT_F macro for function definitions. Fixes: https://tracker.ceph.com/issues/40060 Signed-off-by: Boris Ranto <branto@redhat.com>
The gcc compiler now supports symver attribute. We should update the symvers to be able to support LTO. Fixes: https://tracker.ceph.com/issues/40060 Signed-off-by: Boris Ranto <branto@redhat.com>
@smithfarm Sure, we can wait for the openSUSE fatctory build -- that is why I was asking for the Anyway, I did put the fixes line to the commits before, I just forgot to add it to the latest commits, I have updated those too, now. |
@b-ranto Thanks! Would it make sense (and be worth the trouble) to mention |
@b-ranto master, quincy, and pacific only target openSUSE Leap 15.3/SLE-15-SP3 and above. So if this patchset works fine in SLE-15-SP3 and Factory, there won't be any need to add a I will trigger a test build on SLE-15-SP3 and Factory now. |
@smithfarm Sounds good, AFAIK, the support for the attribute landed in GCC 10 so if you use GCC 10 in these, you should be good. |
Yeah, I got that part. What I'm looking at now is whether the cmake code and guards that are being added here are enough for this patch to work in SLE-15-SP3, which has gcc 7. |
The reason I'm looking at SLE-15-SP3 at all is because the Redmine ticket says this is going to be backported to pacific. If that's wrong, and this is not going to be backported to pacific, then my task will be much simpler, since I'll only have to build it for openSUSE Factory :-) |
Yes, it is also targeted for pacific. You will definitelly need to keep the bits that disable LTO for SLE-15-SP3 then. |
We can now use LTO when building ceph. The symver issue was fixed by using the gcc __symver__ attribute. The systems that support it can now re-enable LTO. Fixes: https://tracker.ceph.com/issues/40060 Signed-off-by: Boris Ranto <branto@redhat.com>
Fixes: https://tracker.ceph.com/issues/40060 Signed-off-by: Boris Ranto <branto@redhat.com>
We should check if -flto-partition=none is defined when the compiler does not support symver attribute and fail the build if it is not. Fixes: https://tracker.ceph.com/issues/40060 Co-authored-by: Kefu Chai <tchaikov@gmail.com> Signed-off-by: Boris Ranto <branto@redhat.com>
We should check if either asm symver or attribute symver is defined and not assume that attribute symver implies asm symver. Fixes: https://tracker.ceph.com/issues/40060 Signed-off-by: Boris Ranto <branto@redhat.com>
jenkins test make check |
just for the record,
|
Yeah, this was a RHEL 9 ~requirement: |
This fails on FreeBSD/Clang.
|
@wjwithagen Can you share the output of the |
@b-ranto
But the ./do_cmake thinks different:
So I conditionalised
Which works.... |
Yeah, gcc also only warns on that, we pass https://github.com/ceph/ceph/blob/master/cmake/modules/CephChecks.cmake#L151 |
for clang, it should be |
lemme create a patch. |
|
@wjwithagen just wanted to explain the option name, not to propose a solution in my previous comment. if we really go with a single option like Boris put in his change, then it should be |
As per the upstream, ceph now supports the symbols required for LTO. Upstream-Ref: ceph/ceph#42602
As per the upstream, ceph now supports the symbols required for LTO. Upstream-Ref: ceph/ceph#42602
As per the upstream, ceph now supports the symbols required for LTO. See the comment in the diff for more. Upstream-Ref: ceph/ceph#42602
As per the upstream, ceph now supports the symbols required for LTO. See the comment in the diff for more. Upstream-Ref: ceph/ceph#42602
The gcc compiler now supports symver attribute. We should update the symvers to be able to support LTO on the platforms that support the symver attribute.
Fixes: https://tracker.ceph.com/issues/40060
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox