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 bintools-wrapper, cc-wrapper: parameterize darwin min version variable 2021-04-11 09:47:10 +09:00
add-hardening.sh cc-wrapper: ensure PIE flags precede PIC flags 2021-09-20 11:03:42 -07:00
cc-wrapper.sh cc-wrapper: don't set rpath on static-pie executables 2021-05-23 17:38:17 +00:00
default.nix mingw: Disalbe FORTIFY_SOURCE by default. 2021-08-11 05:07:42 -04:00
fortran-hook.sh cc-wrapper: set FC when langFortran is on 2020-07-06 00:22:19 -04:00
gnat-wrapper.sh gnat: fix build 2020-09-19 20:54:27 -07:00
setup-hook.sh *-wrapper; Switch from infixSalt to suffixSalt 2020-05-12 00:44:44 -04:00