glibc: Remove old-style nullable "cross" variable
Much better to just use {build,host}Platform directly.
This commit is contained in:
parent
1fe81a4bcd
commit
e98814461d
|
@ -23,7 +23,6 @@ let
|
||||||
version = "2.27";
|
version = "2.27";
|
||||||
patchSuffix = "";
|
patchSuffix = "";
|
||||||
sha256 = "0wpwq7gsm7sd6ysidv0z575ckqdg13cr2njyfgrbgh4f65adwwji";
|
sha256 = "0wpwq7gsm7sd6ysidv0z575ckqdg13cr2njyfgrbgh4f65adwwji";
|
||||||
cross = if buildPlatform != hostPlatform then hostPlatform else null;
|
|
||||||
in
|
in
|
||||||
|
|
||||||
assert withLinuxHeaders -> linuxHeaders != null;
|
assert withLinuxHeaders -> linuxHeaders != null;
|
||||||
|
@ -33,9 +32,6 @@ stdenv.mkDerivation ({
|
||||||
inherit installLocales;
|
inherit installLocales;
|
||||||
linuxHeaders = if withLinuxHeaders then linuxHeaders else null;
|
linuxHeaders = if withLinuxHeaders then linuxHeaders else null;
|
||||||
|
|
||||||
# The host/target system.
|
|
||||||
crossConfig = if cross != null then cross.config else null;
|
|
||||||
|
|
||||||
inherit (stdenv) is64bit;
|
inherit (stdenv) is64bit;
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
@ -106,11 +102,12 @@ stdenv.mkDerivation ({
|
||||||
else "--disable-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 (cross != null) [
|
] ++ lib.optionals (hostPlatform != buildPlatform) [
|
||||||
(if cross ? float && cross.float == "soft" then "--without-fp" else "--with-fp")
|
(if hostPlatform.platform.gcc.float or (hostPlatform.parsed.abi.float or "hard") == "soft"
|
||||||
] ++ lib.optionals (cross != null) [
|
then "--without-fp"
|
||||||
|
else "--with-fp")
|
||||||
"--with-__thread"
|
"--with-__thread"
|
||||||
] ++ lib.optionals (cross == null && stdenv.isAarch32) [
|
] ++ lib.optionals (hostPlatform == buildPlatform && hostPlatform.isAarch32) [
|
||||||
"--host=arm-linux-gnueabi"
|
"--host=arm-linux-gnueabi"
|
||||||
"--build=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"
|
sed -i s/-lgcc_eh//g "../$sourceRoot/Makeconfig"
|
||||||
|
|
||||||
cat > config.cache << "EOF"
|
cat > config.cache << "EOF"
|
||||||
|
@ -196,7 +193,7 @@ stdenv.mkDerivation ({
|
||||||
passthru = { inherit version; };
|
passthru = { inherit version; };
|
||||||
}
|
}
|
||||||
|
|
||||||
// lib.optionalAttrs (cross != null) {
|
// lib.optionalAttrs (hostPlatform != buildPlatform) {
|
||||||
preInstall = null; # clobber the native hook
|
preInstall = null; # clobber the native hook
|
||||||
|
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
|
|
|
@ -22,7 +22,6 @@ let
|
||||||
version = "2.26";
|
version = "2.26";
|
||||||
patchSuffix = "-131";
|
patchSuffix = "-131";
|
||||||
sha256 = "1ggnj1hzjym7sn93rbwydcqd562q73lsb7g7kd199g6j9j9hlkp5";
|
sha256 = "1ggnj1hzjym7sn93rbwydcqd562q73lsb7g7kd199g6j9j9hlkp5";
|
||||||
cross = if buildPlatform != hostPlatform then hostPlatform else null;
|
|
||||||
in
|
in
|
||||||
|
|
||||||
assert withLinuxHeaders -> linuxHeaders != null;
|
assert withLinuxHeaders -> linuxHeaders != null;
|
||||||
|
@ -32,9 +31,6 @@ stdenv.mkDerivation ({
|
||||||
inherit installLocales;
|
inherit installLocales;
|
||||||
linuxHeaders = if withLinuxHeaders then linuxHeaders else null;
|
linuxHeaders = if withLinuxHeaders then linuxHeaders else null;
|
||||||
|
|
||||||
# The host/target system.
|
|
||||||
crossConfig = if cross != null then cross.config else null;
|
|
||||||
|
|
||||||
inherit (stdenv) is64bit;
|
inherit (stdenv) is64bit;
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
@ -126,13 +122,12 @@ stdenv.mkDerivation ({
|
||||||
else "--disable-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 (cross != null) [
|
] ++ lib.optionals (hostPlatform != buildPlatform) [
|
||||||
(if cross.platform.gcc.float or (cross.parsed.abi.float or "hard") == "soft"
|
(if hostPlatform.platform.gcc.float or (hostPlatform.parsed.abi.float or "hard") == "soft"
|
||||||
then "--without-fp"
|
then "--without-fp"
|
||||||
else "--with-fp")
|
else "--with-fp")
|
||||||
] ++ lib.optionals (cross != null) [
|
|
||||||
"--with-__thread"
|
"--with-__thread"
|
||||||
] ++ lib.optionals (cross == null && stdenv.isAarch32) [
|
] ++ lib.optionals (hostPlatform == buildPlatform && hostPlatform.isAarch32) [
|
||||||
"--host=arm-linux-gnueabi"
|
"--host=arm-linux-gnueabi"
|
||||||
"--build=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"
|
sed -i s/-lgcc_eh//g "../$sourceRoot/Makeconfig"
|
||||||
|
|
||||||
cat > config.cache << "EOF"
|
cat > config.cache << "EOF"
|
||||||
|
@ -215,7 +210,7 @@ stdenv.mkDerivation ({
|
||||||
} // meta;
|
} // meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
// lib.optionalAttrs (cross != null) {
|
// lib.optionalAttrs (hostPlatform != buildPlatform) {
|
||||||
preInstall = null; # clobber the native hook
|
preInstall = null; # clobber the native hook
|
||||||
|
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
|
|
Loading…
Reference in New Issue