#49053 Enable -flto for ds
Closed: fixed 3 years ago Opened 3 years ago by firstyear.

Enabling link time optimisation will allow gcc to better optimise our binaries and libraries. In the future lto is required for security features like control flow integrity. lto is not as simple as a single switch, as it may or may not cause certain symbols to not be exported correctly, so it may take some annotations and guidance to enable.


When do we need this fix? 1.3.6 or later?

Can be later, it's not urgent.

Thanks! Set to 1.3.7 backlog.

Metadata Update from @firstyear:
- Issue assigned to firstyear
- Issue set to the milestone: 1.3.7 backlog

3 years ago

Metadata Update from @firstyear:
- Issue close_status updated to: None
- Issue tagged with: Investigate, Performance

3 years ago

Metadata Update from @firstyear:
- Custom field reviewstatus adjusted to review

3 years ago

Metadata Update from @mreynolds:
- Custom field reviewstatus adjusted to ack (was: review)

3 years ago

commit 3d61db9a2c34062e64b4692540877646292b2b1b
To ssh://git@pagure.io/389-ds-base.git
0804c43..620d037 master -> master

@mreynolds Next step is to add this as a compiler flag to the rpm specfile. What's the best way to do this do you think?

Actually, it look like flto blows away debug info for now, so I think we shouldn't enable it by default yet.

This change breaks rpm build:

Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/389-ds-base-1.3.7.0-20170508git620d0375d.fc26.x86_64


RPM build errors:
error: Installed (but unpackaged) file(s) found:
   /usr/lib64/dirsrv/libldaputil.so
   /usr/lib64/dirsrv/libldaputil.so.0
   /usr/lib64/dirsrv/libldaputil.so.0.0.0
    Installed (but unpackaged) file(s) found:
   /usr/lib64/dirsrv/libldaputil.so
   /usr/lib64/dirsrv/libldaputil.so.0
   /usr/lib64/dirsrv/libldaputil.so.0.0.0

Metadata Update from @firstyear:
- Custom field reviewstatus adjusted to review (was: ack)

3 years ago

Metadata Update from @vashirov:
- Custom field reviewstatus adjusted to ack (was: review)

3 years ago

Thanks for fixing this William, pushed:

c4b896d..6fc82a3 master -> master

Metadata Update from @mreynolds:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata