-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Set -fno-PIE by default as a Ubuntu/Mint workaround #112
Merged
BenjamenMeyer
merged 13 commits into
vegastrike:master
from
ermo:cmake-fpie-off-by-default
May 13, 2020
Merged
Set -fno-PIE by default as a Ubuntu/Mint workaround #112
BenjamenMeyer
merged 13 commits into
vegastrike:master
from
ermo:cmake-fpie-off-by-default
May 13, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Older versions of Ubuntu and its derivates have an issue where the `file` utility will interpret Position Independent Executables as shared libraries: https://bugs.launchpad.net/ubuntu/+source/file/+bug/1747711 As a workaround, allow setting the option COMPILE_WITH_FPIE (defaults to OFF) and add a suitable message for maintainers in both the CMake code, during configuration runs and in ccmake. Update the build instructions in the README to reflect this change. Closes vegastrike#94
@ermo you might add Arch to the distros that enable |
BenjamenMeyer
approved these changes
May 13, 2020
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.
In minor suggestion
Add comment about GUI file managers being affected.
not sure what is up with the builds; seems GCC/G++ doesn't like something but Clang is happy. |
This will also aid in debugging when people compile their own local VS binaries using vsbuild.sh, as using a Debug build is the recommended way to report bugs per the man page.
Ask cmake to be verbose in a way such that the CI doesn't choke. Document the arguments in README.md Unconditionally add `-fno-PIC -fno-PIE` / `-fPIC -fPIE` to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS` depending on the state of the user configurable COMPILE_WITH_FPIE option, which defaults to OFF.
This requires re-ordering so that CMAKE_C_FLAGS/CMAKE_CXX_FLAGS are set before the build-type-specific CMAKE_C/CXX_FLAGS_<build-type> variables.
This time, set the options for both compiler and linker. Add changed option name to README.md too.
nabaco
approved these changes
May 13, 2020
PR message updated -- ready for merging on my end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Older versions of Ubuntu and its derivates have an issue where the
file
utility will interpret Position Independent Executables asshared libraries:
https://bugs.launchpad.net/ubuntu/+source/file/+bug/1747711
As a workaround, allow setting the option
ENABLE_PIE
(defaults to
OFF
) and add a suitable message for maintainers in boththe CMake code, during configuration runs and in ccmake.
Update the build instructions in
README.md
to reflect this change.Additionally, switch sh/vsbuild.sh to the Debug target (see #50) and enable verbose compilation by default to make it easier to spot errors in CI.
Closes #94