From 672f40ee77015bf12ef17590d592062ed36a2e0c Mon Sep 17 00:00:00 2001 From: slipher Date: Thu, 30 Jul 2026 07:57:49 -0500 Subject: [PATCH 1/3] README: fix built_elsewhere example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3fa897e9d..47bf6b054 100644 --- a/README.md +++ b/README.md @@ -180,7 +180,7 @@ rsync -az --info=progress2 * testuser@testhost:/home/testuser/nacl-test Then on the test machine, ``` -scons --mode=opt-linux,nacl saigo=1 platform=arm small_tests medium_tests large_tests +scons --mode=opt-linux,nacl saigo=1 platform=arm built_elsewhere=1 naclsdk_validate=0 small_tests medium_tests large_tests ``` From 9846d0e901e7392b3d8714e9edaf021dc207a238 Mon Sep 17 00:00:00 2001 From: slipher Date: Thu, 30 Jul 2026 08:38:46 -0500 Subject: [PATCH 2/3] scons: add TLS edit targets to all_programs There was no way to build them with any named target group. This is needed when building and running tests on different machines. --- SConstruct | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index bf6d48505..d8043967b 100755 --- a/SConstruct +++ b/SConstruct @@ -1328,10 +1328,12 @@ def ApplyTLSEdit(env, nexe_name, raw_nexe): tls_edit_exe = env.File(env.SConstructAbsPath(tls_edit_forced)) else: tls_edit_exe = env['BUILD_ENV'].File('${STAGING_DIR}/tls_edit${PROGSUFFIX}') - return env.Command( + node = env.Command( nexe_name, [tls_edit_exe, raw_nexe], '${SOURCES[0]} --verbose ${SOURCES[1:]} ${TARGET}') + env.Alias('all_programs', node) # Technically incorrect for the IRT which is not a program. + return node pre_base_env.AddMethod(ApplyTLSEdit) From a9e5cb4c01abbd63cd52acf23e8ebe407ef453c4 Mon Sep 17 00:00:00 2001 From: slipher Date: Thu, 30 Jul 2026 08:50:14 -0500 Subject: [PATCH 3/3] Allow arm64 Linux hosts with armhf stuff Let armhf binaries run via multi-arch if possible when running tests or using run.py. --- SConstruct | 2 +- pynacl/platform.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index d8043967b..d70ace31e 100755 --- a/SConstruct +++ b/SConstruct @@ -2537,7 +2537,7 @@ def SetUpLinuxEnvX86(env): LD='i686-linux-gnu-ld') def SetUpLinuxEnvArm(env): - if not platform.machine().startswith('arm'): + if not platform.machine().startswith('a'): # Allow emulation on non-ARM hosts. env.Replace(EMULATOR='qemu-armhf -L /usr/arm-linux-gnueabihf/ -cpu cortex-a9') if env.Bit('built_elsewhere'): diff --git a/pynacl/platform.py b/pynacl/platform.py index 7d195c859..ca637936d 100644 --- a/pynacl/platform.py +++ b/pynacl/platform.py @@ -132,6 +132,8 @@ def GetArch3264(machine=None): machine = machine.lower() if machine == 'arm64' and GetOS() == OS_MAC: machine = ARCH3264_X86_64 # force Intel cross build + elif machine == 'aarch64' and GetOS() == OS_LINUX: + machine = ARCH3264_ARM assert machine in ARCH3264_DICT, "Unrecognized arch machine: %s" % machine return ARCH3264_DICT[machine]