dosbox-staging
dosbox-staging copied to clipboard
Fix platform specific parameters for ppc64le
Description
Previously, build script assumed that for little-endian PowerPC, Meson would report ppc64le
as cpu_family
. Actually, Meson returns just ppc64
and endianness needs to be checked separately. Fix the Meson build script to do that.
Without this change, compiling on ppc64le
included 32-bit PowerPC code from risc_ppc.h
, causing many error about invalid casts from pointer to 32-bit integer types.
This issue was revealed by building DOSBox Staging 0.82.0 for Fedora in Fedora build environment. Builds for other architectures (x86_64, aarch64 and s390x) succeeded, but ppc64le failed due to this problem.
Related issues
#3991
Manual testing
After applying this patch, Fedora build succeeded for all architectures (x86_64, aarch64, ppc64le and s390x). The one for which I have hardware for, x86_64, also ran successfully.
Checklist
I have:
- [x] followed the project's contributing guidelines and code of conduct.
- [x] performed a self-review of my code.
- [ ] commented on the particularly hard-to-understand areas of my code.
- [x] split my work into well-defined, bisectable commits, and I named my commits well.
- [x] applied the appropriate labels (bug, enhancement, refactoring, documentation, etc.)
- [x] checked that all my commits can be built.
- [ ] confirmed that my code does not cause performance regressions (e.g., by running the Quake benchmark).
- [ ] added unit tests where applicable to prove the correctness of my code and to avoid future regressions.
- [ ] provided the release notes draft (for significant user-facing changes).
- [ ] made corresponding changes to the documentation or the website according to the documentation guidelines.
- [ ] locally verified my website or documentation changes.