Disable compiler/linker hardening features for the nix devShell environment
With enabled hardening, nix adds -D_FORTIFY_SOURCE=2
to the compiler
options, which only works in combination with the optimization level
-O2
.1 For debug builds, optimization is disabled in the Makefile,
which leads to the following warning:
warning _fortify_source requires compiling with optimization (-o)
To remove this warning, hardening is deactivated for the devShell environment.