-
Notifications
You must be signed in to change notification settings - Fork 69
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
don't pass CFLAGS and fix _FORTIFY_SOURCE errors #116
don't pass CFLAGS and fix _FORTIFY_SOURCE errors #116
Conversation
Welcome @th7nder! It looks like this is your first PR to tikv/jemallocator 🎉 |
52accb4
to
b8885e4
Compare
Signed-off-by: Konrad Stepniak <[email protected]>
b8885e4
to
7abada8
Compare
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.
Rest LGTM
Signed-off-by: Konrad Stepniak <[email protected]>
Signed-off-by: Konrad Stepniak <[email protected]>
Thank you! |
This reverts commit fa4486d. Signed-off-by: Jay Lee <[email protected]>
I think this means it's wrong to set _FORTIFY_SOURCE=3 by default. |
Thanks so much for the fix! Would really appreciate a release if possible 🙏 |
Fixes NixOS/nixpkgs#370494 and #108.
Long-ass explanation is here: NixOS/nixpkgs#370494 (comment).
When running under nix environment
_FORTIFY_SOURCE=3
is set by default.Currently the
CFLAGS
are passed down to the underlyingjemalloc compiler
.If we're running
cargo build
, it means that something along the lines:-O0 -ffunction-sections -fdata-sections -fPIC -m64 -Wall
is passed down (optimisation disabled, because debug mode).Because optimisations are disabled, we're getting errors:
This simply removes passing down the CFLAGS, so they can be set automatically by underlying autoconfigures and not dependent on the build profile.
Plus jemalloc/jemalloc#1196 was solved long time ago, so I think the reason those were added is gone.
P.S this issue is reproducible by running the master branch,
flake.nix
in the root repoand running