diff options
author | John Ericson <subscribe@JohnEricson.me> | 2018-09-11 17:50:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-11 17:50:37 -0400 |
commit | 67a1f508ff64fe57ac0797b72675584e2b2aadc9 (patch) | |
tree | 52fcf0b0b17e799989db198309a265ae0a3ffb5b /pkgs | |
parent | 8955ec6c735f3000b00b45fb2c696b92f4d5c3c1 (diff) | |
parent | d7e3dbef6603b398c6b4b3c248b1b1d3bd8949fb (diff) | |
download | nixlib-67a1f508ff64fe57ac0797b72675584e2b2aadc9.tar nixlib-67a1f508ff64fe57ac0797b72675584e2b2aadc9.tar.gz nixlib-67a1f508ff64fe57ac0797b72675584e2b2aadc9.tar.bz2 nixlib-67a1f508ff64fe57ac0797b72675584e2b2aadc9.tar.lz nixlib-67a1f508ff64fe57ac0797b72675584e2b2aadc9.tar.xz nixlib-67a1f508ff64fe57ac0797b72675584e2b2aadc9.tar.zst nixlib-67a1f508ff64fe57ac0797b72675584e2b2aadc9.zip |
Merge pull request #46544 from obsidiansystems/glibc-configureFlags-cleanup
glibc: Use lib.enableFeature and friends
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/libraries/glibc/common.nix | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 1eecfa902790..424b212b39d3 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -110,18 +110,13 @@ stdenv.mkDerivation ({ "--enable-obsolete-rpc" "--sysconfdir=/etc" "--enable-stackguard-randomization" - (if withLinuxHeaders - then "--with-headers=${linuxHeaders}/include" - else "--without-headers") - (if profilingLibraries - then "--enable-profile" - else "--disable-profile") + (lib.withFeatureAs withLinuxHeaders "headers" "${linuxHeaders}/include") + (lib.enableFeature profilingLibraries "profile") ] ++ lib.optionals withLinuxHeaders [ "--enable-kernel=3.2.0" # can't get below with glibc >= 2.26 ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ - (if stdenv.hostPlatform.platform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft" - then "--without-fp" - else "--with-fp") + (lib.flip lib.withFeature "fp" + (stdenv.hostPlatform.platform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft")) "--with-__thread" ] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform && stdenv.hostPlatform.isAarch32) [ "--host=arm-linux-gnueabi" |