Skip to content
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

It doesn't seem possible to disable LTO #315

Closed
hughsie opened this issue Apr 8, 2024 · 1 comment · Fixed by #316
Closed

It doesn't seem possible to disable LTO #315

hughsie opened this issue Apr 8, 2024 · 1 comment · Fixed by #316
Assignees

Comments

@hughsie
Copy link
Contributor

hughsie commented Apr 8, 2024

Describe the bug

I need to build libcbor without LTO as part of a static fuzzing target in the fwupd project. Wit LTO enabled I get /work/lib/libcbor.a: error adding symbols: file format not recognized

To Reproduce

Run cmake -DINTERPROCEDURAL_OPTIMIZATION=OFF -- which I did hope would disable LTO even tho my compiler supports it.

Expected behavior

I can make a static library to use in my fuzzing tests.

Environment

libcbor-0.11.0-1.fc40.x86_64 but also testing with git master branch. Thanks for any pointers!

@hughsie hughsie added the bug label Apr 8, 2024
hughsie added a commit to fwupd/fwupd that referenced this issue Apr 9, 2024
It seems there's no way to *disable* LTO using cmake -- and LTO isn't going to
work for a static library...

See PJK/libcbor#315 for the root issue.
hughsie added a commit to fwupd/fwupd that referenced this issue Apr 9, 2024
It seems there's no way to *disable* LTO using cmake -- and LTO isn't going to
work for a static library...

See PJK/libcbor#315 for the root issue.
@PJK PJK closed this as completed in #316 Apr 15, 2024
@PJK
Copy link
Owner

PJK commented Apr 15, 2024

Thank you, please LMK if the fix doesn't work.

chenhn123 pushed a commit to chenhn123/fwupd that referenced this issue May 21, 2024
It seems there's no way to *disable* LTO using cmake -- and LTO isn't going to
work for a static library...

See PJK/libcbor#315 for the root issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants