Repository navigation
Conversation
…back, detect armhf multiarch support
… taking saigo in account
Co-authored-by: Thomas Debesse <dev@illwieckz.net>
Set up the chdir and environment variable in posix_spawn. Fixes #1336. Co-authored-by: Thomas Debesse <dev@illwieckz.net>
Remove cvars controlling whether the Linux bootstrap loader is used. Never use bootstrap with the amd64 loader. Always use bootstrap with 32-bit loaders. Co-authored-by: Thomas Debesse <dev@illwieckz.net>
When creating a NaCl (or native exe) VM on Windows, block evironment variables from being passed through to the subprocess as is done on *nix. Probably we do this since there are NACL* variables that can disable secure sandboxing. inheritEnvironment is always false on Windows, but I implemented the true case anyway since it's less code than having the Q_UNUSED and asserting it's false.
Check the Linux sysctl vm.mmap_min_addr only when using the NaCl bootstrap (rather than always when using NaCl). Or equivalently, check it only with 32-bit NaCl runtimes. The bootstrap fails to start when the value is too high to due low fixed address mappings. On ARM at least, sel_ldr proper would also fail with a too-high min address since that disturbs the address space layout. On 64-bit there is neither the bootstrap nor 0-based address space layout so it always works. Co-authored-by: Thomas Debesse <dev@illwieckz.net>
Co-authored-by: Thomas Debesse <dev@illwieckz.net>
The old PNaCl toolchain has been being shipped as part of the deps package, with the host platform for the compilers assumed to be the same as the target platform of the deps package. Experimental Saigo support has thus far required manually downloading the SDK. Now, make the Saigo toolchain auto-downloadable (if USE_NACL_SAIGO=1) independently from the target platform dependencies. This has several advantages: - No need to download the NaCl toolchain if you are not building NaCl. - No need to download a useless NaCl toolchain when cross-compiling. - Toolchain can be downloaded for host systems that don't have a deps package, or where the deps package being used doesn't match the real host system. (The SDK is available for more systems than the deps package.) The toolchain is downloaded from Github and then, like the deps package, extracted into external_deps/.
Add external_deps/sdk-build.sh which can be used as an alternative to auto-downloading Saigo. Like external_deps/build.sh, it builds the dependency package and installs it to the expected location. It is a thin wrapper around the saigo-nacl-sdk CMake build; if you need more control it is better to use CMake directly.
illwieckz
commented
Oct 16, 2026
illwieckz
commented
Oct 16, 2026
| echo "If you want to build only a subset of packages, prefer using the" | ||
| echo "${REPO_URL} CMake build directly." | ||
| echo "Some global configuration options are available via environment" | ||
| echo "variables; see ${REPO_URL}/tree/master/tools/release/build" |
Member
Author
There was a problem hiding this comment.
By using tab as indentation instead of spaces we would be able to rely on bash indented heredoc.
illwieckz
commented
Oct 17, 2026
| Log::Warn("Disabling NaCL platform qualification on arm64 kernel architecture."); | ||
| enableQualification = false; | ||
| } | ||
| if (onArm64()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So in #1986 I implemented a lot of refactors meant to makes things easier for Saigo and other things (like the ability to fallback on amd64 on box64 when armhf on arm64 doesn't work, etc.):
This deeply reworked the CMake code, and also deeply reworked the VirtualMachine code, and a whole month has been invested in that effort.
In the meantime @slipher implemented those very appreciated and very wanted and very needed PRs:
It was infinitely less constly to rebase this work over mine than the other way, so that's what this branch does: rebase @slipher's work over my branch.
So I rebased #1998, #2001, #2010 over #1986 then removed every change touching
external_deps/build.shand that made this branch. It also mean that some commits by @slipher touchingexternal_deps/build.shwere split to only keep what was not touching it. The part touchingexternal_deps/build.shwas also rebased but is stored in #1986.Doing this rebasing took me 10 hours of work, doing it the other way would take many days non-stop.
Because about 5 months have passed, one thing in my commits is now useless: the work I did to turn the
multiarchlauncher into a generic launcher not specific to armhf or even the nacl loader. Ssuch launcher is then entirely NUKED by some greatly appreciated @slipher's commit rebased here.Because of how intricated all those changes are, that touch the same code base, I don't want to fight the war of removing that multiarch work under the feet of the later commits just because it turned useless. Cleaning-up such mess would take additional days I don't have. Those commits are following each others properly and that's what matters the most.
Some of the work in some @slipher's commit was already done in my branch, for example almost nothing is left from the commit
cmake: SAIGOSDK_ROOT configures NaCl toolchain pathfrom #2010, because it was redundant.