@@ -39,7 +39,6 @@ let
3939 version = "2.27";
4040 patchSuffix = "";
4141 sha256 = "0wpwq7gsm7sd6ysidv0z575ckqdg13cr2njyfgrbgh4f65adwwji";
42− cross = if buildPlatform != hostPlatform then hostPlatform else null;
4342in
4443
4544assert withLinuxHeaders -> linuxHeaders != null;
@@ -49,9 +48,6 @@ stdenv.mkDerivation ({
4948 inherit version installLocales;
5049 linuxHeaders = if withLinuxHeaders then linuxHeaders else null;
5150
52− # The host/target system.
53− crossConfig = if cross != null then cross.config else null;
54−
5551 inherit (stdenv) is64bit;
5652
5753 enableParallelBuilding = true;
@@ -123,11 +119,12 @@ stdenv.mkDerivation ({
123119 else "--disable-profile")
124120 ] ++ lib.optionals withLinuxHeaders [
125121 "--enable-kernel=3.2.0" # can't get below with glibc >= 2.26
126− ] ++ lib.optionals (cross != null) [
127− (if cross ? float && cross.float == "soft" then "--without-fp" else "--with-fp")
128− ] ++ lib.optionals (cross != null) [
122+ ] ++ lib.optionals (hostPlatform != buildPlatform) [
123+ (if hostPlatform.platform.gcc.float or (hostPlatform.parsed.abi.float or "hard") == "soft"
124+ then "--without-fp"
125+ else "--with-fp")
129126 "--with-__thread"
130− ] ++ lib.optionals (cross == null && stdenv.isAarch32) [
127+ ] ++ lib.optionals (hostPlatform == buildPlatform && hostPlatform.isAarch32) [
131128 "--host=arm-linux-gnueabi"
132129 "--build=arm-linux-gnueabi"
133130
@@ -179,7 +176,7 @@ stdenv.mkDerivation ({
179176 }
180177
181178
182− '' + lib.optionalString (cross != null) ''
179+ '' + lib.optionalString (hostPlatform != buildPlatform) ''
183180 sed -i s/-lgcc_eh//g "../$sourceRoot/Makeconfig"
184181
185182 cat > config.cache << "EOF"
@@ -211,7 +208,7 @@ stdenv.mkDerivation ({
211208 } // meta;
212209}
213210
214−// lib.optionalAttrs (cross != null) {
211+// lib.optionalAttrs (hostPlatform != buildPlatform) {
215212 preInstall = null; # clobber the native hook
216213
217214 dontStrip = true;