aboutsummaryrefslogtreecommitdiff
path: root/nix/libstore
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2018-05-21 13:22:32 -0400
committerMark H Weaver <mhw@netris.org>2018-05-21 13:22:32 -0400
commit0661758e133c0384d20043d3526b5ebc794e1f04 (patch)
tree46fb6d731fd0e562379ecfffba499deb17847a23 /nix/libstore
parent539bf8f2c071b53834829259bb3fabf0390c5dc6 (diff)
parentc036959b1a61c37c9b7d72e655e1441f2feefb6e (diff)
downloadguix-0661758e133c0384d20043d3526b5ebc794e1f04.tar
guix-0661758e133c0384d20043d3526b5ebc794e1f04.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'nix/libstore')
-rw-r--r--nix/libstore/build.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index 34647e6774..c7f32494d0 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -1244,6 +1244,7 @@ static bool canBuildLocally(const string & platform)
return platform == settings.thisSystem
#if __linux__
|| (platform == "i686-linux" && settings.thisSystem == "x86_64-linux")
+ || (platform == "armhf-linux" && settings.thisSystem == "aarch64-linux")
#endif
;
}
@@ -2220,6 +2221,13 @@ void DerivationGoal::runChild()
throw SysError("cannot set i686-linux personality");
}
+ if (drv.platform == "armhf-linux" &&
+ (settings.thisSystem == "aarch64-linux" ||
+ (!strcmp(utsbuf.sysname, "Linux") && !strcmp(utsbuf.machine, "aarch64")))) {
+ if (personality(PER_LINUX32) == -1)
+ throw SysError("cannot set armhf-linux personality");
+ }
+
/* Impersonate a Linux 2.6 machine to get some determinism in
builds that depend on the kernel version. */
if ((drv.platform == "i686-linux" || drv.platform == "x86_64-linux") && settings.impersonateLinux26) {