diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2018-05-10 17:42:48 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-05-10 18:05:08 -0400 |
commit | e98814461d40c2907a46bbd7a81f8e0b7053019e (patch) | |
tree | e44c58f84571d9ace7f1b24a3c962cee69170ba1 /pkgs/development/libraries/glibc | |
parent | 1fe81a4bcd25dba9319bc1bb49b078872f28ffa6 (diff) |
glibc: Remove old-style nullable "cross" variable
Much better to just use {build,host}Platform directly.
Diffstat (limited to 'pkgs/development/libraries/glibc')
-rw-r--r-- | pkgs/development/libraries/glibc/common-2.27.nix | 17 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc/common.nix | 15 |
2 files changed, 12 insertions, 20 deletions
diff --git a/pkgs/development/libraries/glibc/common-2.27.nix b/pkgs/development/libraries/glibc/common-2.27.nix index 272e18905c138..7d2cf7d14b784 100644 --- a/pkgs/development/libraries/glibc/common-2.27.nix +++ b/pkgs/development/libraries/glibc/common-2.27.nix @@ -23,7 +23,6 @@ let version = "2.27"; patchSuffix = ""; sha256 = "0wpwq7gsm7sd6ysidv0z575ckqdg13cr2njyfgrbgh4f65adwwji"; - cross = if buildPlatform != hostPlatform then hostPlatform else null; in assert withLinuxHeaders -> linuxHeaders != null; @@ -33,9 +32,6 @@ stdenv.mkDerivation ({ inherit installLocales; linuxHeaders = if withLinuxHeaders then linuxHeaders else null; - # The host/target system. - crossConfig = if cross != null then cross.config else null; - inherit (stdenv) is64bit; enableParallelBuilding = true; @@ -106,11 +102,12 @@ stdenv.mkDerivation ({ else "--disable-profile") ] ++ lib.optionals withLinuxHeaders [ "--enable-kernel=3.2.0" # can't get below with glibc >= 2.26 - ] ++ lib.optionals (cross != null) [ - (if cross ? float && cross.float == "soft" then "--without-fp" else "--with-fp") - ] ++ lib.optionals (cross != null) [ + ] ++ lib.optionals (hostPlatform != buildPlatform) [ + (if hostPlatform.platform.gcc.float or (hostPlatform.parsed.abi.float or "hard") == "soft" + then "--without-fp" + else "--with-fp") "--with-__thread" - ] ++ lib.optionals (cross == null && stdenv.isAarch32) [ + ] ++ lib.optionals (hostPlatform == buildPlatform && hostPlatform.isAarch32) [ "--host=arm-linux-gnueabi" "--build=arm-linux-gnueabi" @@ -162,7 +159,7 @@ stdenv.mkDerivation ({ } - '' + lib.optionalString (cross != null) '' + '' + lib.optionalString (hostPlatform != buildPlatform) '' sed -i s/-lgcc_eh//g "../$sourceRoot/Makeconfig" cat > config.cache << "EOF" @@ -196,7 +193,7 @@ stdenv.mkDerivation ({ passthru = { inherit version; }; } -// lib.optionalAttrs (cross != null) { +// lib.optionalAttrs (hostPlatform != buildPlatform) { preInstall = null; # clobber the native hook dontStrip = true; diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 0e363fe4a2567..a1c3a90162ef7 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -22,7 +22,6 @@ let version = "2.26"; patchSuffix = "-131"; sha256 = "1ggnj1hzjym7sn93rbwydcqd562q73lsb7g7kd199g6j9j9hlkp5"; - cross = if buildPlatform != hostPlatform then hostPlatform else null; in assert withLinuxHeaders -> linuxHeaders != null; @@ -32,9 +31,6 @@ stdenv.mkDerivation ({ inherit installLocales; linuxHeaders = if withLinuxHeaders then linuxHeaders else null; - # The host/target system. - crossConfig = if cross != null then cross.config else null; - inherit (stdenv) is64bit; enableParallelBuilding = true; @@ -126,13 +122,12 @@ stdenv.mkDerivation ({ else "--disable-profile") ] ++ lib.optionals withLinuxHeaders [ "--enable-kernel=3.2.0" # can't get below with glibc >= 2.26 - ] ++ lib.optionals (cross != null) [ - (if cross.platform.gcc.float or (cross.parsed.abi.float or "hard") == "soft" + ] ++ lib.optionals (hostPlatform != buildPlatform) [ + (if hostPlatform.platform.gcc.float or (hostPlatform.parsed.abi.float or "hard") == "soft" then "--without-fp" else "--with-fp") - ] ++ lib.optionals (cross != null) [ "--with-__thread" - ] ++ lib.optionals (cross == null && stdenv.isAarch32) [ + ] ++ lib.optionals (hostPlatform == buildPlatform && hostPlatform.isAarch32) [ "--host=arm-linux-gnueabi" "--build=arm-linux-gnueabi" @@ -183,7 +178,7 @@ stdenv.mkDerivation ({ } - '' + lib.optionalString (cross != null) '' + '' + lib.optionalString (hostPlatform != buildPlatform) '' sed -i s/-lgcc_eh//g "../$sourceRoot/Makeconfig" cat > config.cache << "EOF" @@ -215,7 +210,7 @@ stdenv.mkDerivation ({ } // meta; } -// lib.optionalAttrs (cross != null) { +// lib.optionalAttrs (hostPlatform != buildPlatform) { preInstall = null; # clobber the native hook dontStrip = true; |