From 374fe49ff78c13457c6cfe396f9ed0cb986c903b Mon Sep 17 00:00:00 2001 From: Michael Bishop Date: Sun, 19 Sep 2021 23:07:10 -0300 Subject: set the PER_LINUX32 personality flag, when building for armv6l-linux or armv7l-linux this prevents 32bit builds from detecting a 64bit kernel and picking the wrong target --- src/libstore/build/local-derivation-goal.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libstore') diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc index 518edae9c..21d7d7408 100644 --- a/src/libstore/build/local-derivation-goal.cc +++ b/src/libstore/build/local-derivation-goal.cc @@ -1778,6 +1778,10 @@ void LocalDerivationGoal::runChild() if (personality(PER_LINUX32) == -1) throw SysError("cannot set i686-linux personality"); } + if (drv->platform == "armv7l-linux" || drv->platform == "armv6l-linux") { + if (personality(PER_LINUX32) == -1) + throw SysError("cannot set 32bit linux personality"); + } /* Impersonate a Linux 2.6 machine to get some determinism in builds that depend on the kernel version. */ -- cgit v1.2.3