mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
Merge pull request #46544 from obsidiansystems/glibc-configureFlags-cleanup
glibc: Use lib.enableFeature and friends
This commit is contained in:
commit
67a1f508ff
1 changed files with 4 additions and 9 deletions
|
@ -110,18 +110,13 @@ stdenv.mkDerivation ({
|
||||||
"--enable-obsolete-rpc"
|
"--enable-obsolete-rpc"
|
||||||
"--sysconfdir=/etc"
|
"--sysconfdir=/etc"
|
||||||
"--enable-stackguard-randomization"
|
"--enable-stackguard-randomization"
|
||||||
(if withLinuxHeaders
|
(lib.withFeatureAs withLinuxHeaders "headers" "${linuxHeaders}/include")
|
||||||
then "--with-headers=${linuxHeaders}/include"
|
(lib.enableFeature profilingLibraries "profile")
|
||||||
else "--without-headers")
|
|
||||||
(if profilingLibraries
|
|
||||||
then "--enable-profile"
|
|
||||||
else "--disable-profile")
|
|
||||||
] ++ lib.optionals withLinuxHeaders [
|
] ++ lib.optionals withLinuxHeaders [
|
||||||
"--enable-kernel=3.2.0" # can't get below with glibc >= 2.26
|
"--enable-kernel=3.2.0" # can't get below with glibc >= 2.26
|
||||||
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||||
(if stdenv.hostPlatform.platform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft"
|
(lib.flip lib.withFeature "fp"
|
||||||
then "--without-fp"
|
(stdenv.hostPlatform.platform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft"))
|
||||||
else "--with-fp")
|
|
||||||
"--with-__thread"
|
"--with-__thread"
|
||||||
] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform && stdenv.hostPlatform.isAarch32) [
|
] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform && stdenv.hostPlatform.isAarch32) [
|
||||||
"--host=arm-linux-gnueabi"
|
"--host=arm-linux-gnueabi"
|
||||||
|
|
Loading…
Reference in a new issue