Unverified Commit 6ff28fc3 authored by Jörg Thalheim's avatar Jörg Thalheim Committed by GitHub
Browse files

Merge pull request #129004 from misuzu/glibc-static-pie-fix

glibc: use `--enable-static-pie` only on supported platforms
parents dccbe1a9 33f09f47
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -153,10 +153,15 @@ stdenv.mkDerivation ({
      "--enable-add-ons"
      "--sysconfdir=/etc"
      "--enable-stackguard-randomization"
      "--enable-static-pie"
      "--enable-bind-now"
      (lib.withFeatureAs withLinuxHeaders "headers" "${linuxHeaders}/include")
      (lib.enableFeature profilingLibraries "profile")
    ] ++ lib.optionals (stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isAarch64) [
      # This feature is currently supported on
      # i386, x86_64 and x32 with binutils 2.29 or later,
      # and on aarch64 with binutils 2.30 or later.
      # https://sourceware.org/glibc/wiki/PortStatus
      "--enable-static-pie"
    ] ++ lib.optionals withLinuxHeaders [
      "--enable-kernel=3.2.0" # can't get below with glibc >= 2.26
    ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [