Build: Fix for cross-compilation - #14752
Open
MarkusVolk wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Thank you for submitting a contribution to PCSX2
As this is your first pull request, please be aware of the contributing guidelines.
Additionally, as per recent changes in GitHub Actions, your pull request will need to be approved by a maintainer before GitHub Actions can run against it. You can find more information about this change here.
Please be patient until this happens. In the meantime if you'd like to confirm the builds are passing, you have the option of opening a PR on your own fork, just make sure your fork's master branch is up to date!
MarkusVolk
force-pushed
the
master
branch
2 times, most recently
from
July 23, 2026 07:50
927b796 to
a17d21e
Compare
Contributor
|
a |
CMAKE_HOST_SYSTEM_PROZESSOR is used to select the architecture. This fails for cross builds but cmake provides a solution for this case by using CMAKE_SYSTEM_PROZESSOR instead. https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_PROCESSOR.html This fixes issues seen if building pcsx2 for aarch64 using the openembedded cross environment and should hopefully not affect builds if not cross-compiling. Signed-off-by: Markus Volk <f_l_k@t-online.de>
Not possible like this for cross-compilation Signed-off-by: Markus Volk <f_l_k@t-online.de>
Contributor
|
Also fill out the PR Template. |
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.
Description of Changes
Fixes issues with cross-compilation.
Reason for the Changes
Use CMAKE_SYSTEM_PROCESSOR instead of CMAKE_HOST_SYSTEM_PROCESSOR to determine the correct target architecture during cross-compilation.
Do not attempt to determine the page/cache line size, as this is not possible during cross-compilation using this method.
Recommended Testing Steps
These changes should hopefully have no impact on builds that do not involve cross-compilation, so no additional testing should be required.
Did you use AI to find, test, or implement this issue or feature?
No.