nixpkgs/pkgs/build-support/cc-wrapper
Ryan Burns bd8258a389 cc-wrapper: ensure PIE flags precede PIC flags
fixes:
pkgsMusl.bulletml
pkgsMusl.proot
pkgsMusl.python3

Debian explains this issue well in the dpkg-buildflags manpage:

-fPIE
    Can be linked into any program, but not a shared library (recommended).
-fPIC
    Can be linked into any program and shared library.

On projects that build both programs and shared libraries you might need to
make sure that when building the shared libraries -fPIC is always passed last
(so that it overrides any previous -PIE) to compilation flags such as CFLAGS.

(from https://manpages.debian.org/bullseye/dpkg-dev/dpkg-buildflags.1.en.html#hardening)
2021-09-20 11:03:42 -07:00
..
add-flags.sh
add-hardening.sh cc-wrapper: ensure PIE flags precede PIC flags 2021-09-20 11:03:42 -07:00
cc-wrapper.sh
default.nix
fortran-hook.sh
gnat-wrapper.sh
setup-hook.sh