@@ -22,7 +22,6 @@ let
2222 version = "2.26";
2323 patchSuffix = "-131";
2424 sha256 = "1ggnj1hzjym7sn93rbwydcqd562q73lsb7g7kd199g6j9j9hlkp5";
25− cross = if buildPlatform != hostPlatform then hostPlatform else null;
2625in
2726
2827assert withLinuxHeaders -> linuxHeaders != null;
@@ -32,9 +31,6 @@ stdenv.mkDerivation ({
3231 inherit installLocales;
3332 linuxHeaders = if withLinuxHeaders then linuxHeaders else null;
3433
35− # The host/target system.
36− crossConfig = if cross != null then cross.config else null;
37−
3834 inherit (stdenv) is64bit;
3935
4036 enableParallelBuilding = true;
@@ -126,13 +122,12 @@ stdenv.mkDerivation ({
126122 else "--disable-profile")
127123 ] ++ lib.optionals withLinuxHeaders [
128124 "--enable-kernel=3.2.0" # can't get below with glibc >= 2.26
129− ] ++ lib.optionals (cross != null) [
130− (if cross.platform.gcc.float or (cross.parsed.abi.float or "hard") == "soft"
125+ ] ++ lib.optionals (hostPlatform != buildPlatform) [
126+ (if hostPlatform.platform.gcc.float or (hostPlatform.parsed.abi.float or "hard") == "soft"
131127 then "--without-fp"
132128 else "--with-fp")
133− ] ++ lib.optionals (cross != null) [
134129 "--with-__thread"
135− ] ++ lib.optionals (cross == null && stdenv.isAarch32) [
130+ ] ++ lib.optionals (hostPlatform == buildPlatform && hostPlatform.isAarch32) [
136131 "--host=arm-linux-gnueabi"
137132 "--build=arm-linux-gnueabi"
138133
@@ -183,7 +178,7 @@ stdenv.mkDerivation ({
183178 }
184179
185180
186− '' + lib.optionalString (cross != null) ''
181+ '' + lib.optionalString (hostPlatform != buildPlatform) ''
187182 sed -i s/-lgcc_eh//g "../$sourceRoot/Makeconfig"
188183
189184 cat > config.cache << "EOF"
@@ -215,7 +210,7 @@ stdenv.mkDerivation ({
215210 } // meta;
216211}
217212
218−// lib.optionalAttrs (cross != null) {
213+// lib.optionalAttrs (hostPlatform != buildPlatform) {
219214 preInstall = null; # clobber the native hook
220215
221216 dontStrip = true;