-
Notifications
You must be signed in to change notification settings - Fork 63
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
Do not link shared library parts with "-pie -fPIE" as it breaks LTO #180
Comments
Thanks @darix ! Will be in 1.3.2 -- pushed similar fix for pgmoneta and pgexporter |
The fix in git was not enough
|
the whole PIE check can probably replaced with https://cmake.org/cmake/help/latest/module/CheckPIESupported.html |
What is your compiler tool chain ? You have to compile with Will have to look into the |
you can also build all object files with the problem arises from trying to link with LTO. I thought fedora would have turned on LTO by default as well and you would see the same issue there. with the code you had so far ... it passes -fPIE also when linking the shared library. and that is wrong. but i think relying on the cmake helper is probably a better idea anyway. |
Changing the linker commandline from
to
fixes the build with LTO
The text was updated successfully, but these errors were encountered: