diff options
Diffstat (limited to 'pkgs/development/libraries/glibc/common.nix')
-rw-r--r-- | pkgs/development/libraries/glibc/common.nix | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index af006bdb4cf..5c504d0d8e2 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -39,7 +39,6 @@ let version = "2.27"; patchSuffix = ""; sha256 = "0wpwq7gsm7sd6ysidv0z575ckqdg13cr2njyfgrbgh4f65adwwji"; - cross = if buildPlatform != hostPlatform then hostPlatform else null; in assert withLinuxHeaders -> linuxHeaders != null; @@ -49,9 +48,6 @@ stdenv.mkDerivation ({ inherit version 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; @@ -123,11 +119,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" @@ -179,7 +176,7 @@ stdenv.mkDerivation ({ } - '' + lib.optionalString (cross != null) '' + '' + lib.optionalString (hostPlatform != buildPlatform) '' sed -i s/-lgcc_eh//g "../$sourceRoot/Makeconfig" cat > config.cache << "EOF" @@ -213,7 +210,7 @@ stdenv.mkDerivation ({ } // meta; } -// lib.optionalAttrs (cross != null) { +// lib.optionalAttrs (hostPlatform != buildPlatform) { preInstall = null; # clobber the native hook dontStrip = true; |