klibc: Don't use crossAttrs
This commit is contained in:
parent
16781a3892
commit
a210b08d18
@ -1,4 +1,6 @@
|
|||||||
{ stdenv, fetchurl, linuxHeaders, perl }:
|
{ stdenv, fetchurl, linuxHeaders, perl
|
||||||
|
, buildPlatform, hostPlatform
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
commonMakeFlags = [
|
commonMakeFlags = [
|
||||||
@ -23,17 +25,12 @@ stdenv.mkDerivation rec {
|
|||||||
hardeningDisable = [ "format" "stackprotector" ];
|
hardeningDisable = [ "format" "stackprotector" ];
|
||||||
|
|
||||||
makeFlags = commonMakeFlags ++ [
|
makeFlags = commonMakeFlags ++ [
|
||||||
"KLIBCARCH=${stdenv.platform.kernelArch}"
|
"KLIBCARCH=${hostPlatform.platform.kernelArch}"
|
||||||
"KLIBCKERNELSRC=${linuxHeaders}"
|
"KLIBCKERNELSRC=${linuxHeaders}"
|
||||||
] ++ stdenv.lib.optional (stdenv.platform.kernelArch == "arm") "CONFIG_AEABI=y";
|
] # TODO(@Ericson2314): We now can get the ABI from
|
||||||
|
# `hostPlatform.parsed.abi`, is this still a good idea?
|
||||||
crossAttrs = {
|
++ stdenv.lib.optional (hostPlatform.platform.kernelArch == "arm") "CONFIG_AEABI=y"
|
||||||
makeFlags = commonMakeFlags ++ [
|
++ stdenv.lib.optional (hostPlatform != buildPlatform) "CROSS_COMPILE=${stdenv.cc.prefix}";
|
||||||
"KLIBCARCH=${stdenv.cross.platform.kernelArch}"
|
|
||||||
"KLIBCKERNELSRC=${linuxHeaders.crossDrv}"
|
|
||||||
"CROSS_COMPILE=${stdenv.cross.config}-"
|
|
||||||
] ++ stdenv.lib.optional (stdenv.cross.platform.kernelArch == "arm") "CONFIG_AEABI=y";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Install static binaries as well.
|
# Install static binaries as well.
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user