diff options
author | Michael Bishop <cleverca22@gmail.com> | 2021-09-19 23:07:10 -0300 |
---|---|---|
committer | Michael Bishop <cleverca22@gmail.com> | 2021-09-19 23:07:10 -0300 |
commit | 374fe49ff78c13457c6cfe396f9ed0cb986c903b (patch) | |
tree | ae6f9a230c9eb23db766d44913e06c1da3e58bf7 /src/libstore | |
parent | 1ec4efa6c82fb6d90887c21aa7c7c6f3c644dd65 (diff) |
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
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/build/local-derivation-goal.cc | 4 |
1 files changed, 4 insertions, 0 deletions
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. */ |