Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on RPiOS armhf #464

Merged
merged 3 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changes/sdk/pr.464.gh.OpenXR-SDK-Source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
- issue.463.gh.OpenXR-SDK-Source
---
- loader: Fix build issue for ARMv6 architectures, and note architecture naming quirk of Raspberry Pi OS in the architecture table in the loader documentation.
7 changes: 6 additions & 1 deletion specification/loader/runtime.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ architectures and ABIs is used.

|`armv5te`
|
| `armel`
| `armel` (See <<armhf-rpios-note,note>>.)
| 32-bit ARMv5TE architecture or compatible, little endian

|`mips64`
Expand Down Expand Up @@ -386,6 +386,11 @@ While the Android ABI called `armeabi-v7a` does not use VFP PCS as the
__system__ ABI, a definition in `openxr_platform_defines.h` enables the VFP
PCS calling convention for all OpenXR API calls and function pointers.

[[armhf-rpios-note]]
Note: Raspberry Pi OS differs in its architecture definitions from upstream
Debian by redefining `armhf` as ARMv6, rather than ARMv7.
Therefore, on that operating system, `armhf` maps to ID `armv5te`.

[[runtime-enumeration]]
==== Runtime Enumeration

Expand Down
2 changes: 1 addition & 1 deletion src/common/platform_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#define XR_ARCH_ABI "aarch64"
#elif (defined(__ARM_ARCH) && __ARM_ARCH >= 7 && (defined(__ARM_PCS_VFP) || defined(__ANDROID__))) || defined(_M_ARM)
#define XR_ARCH_ABI "armv7a-vfp"
#elif defined(__ARM_ARCH_5TE__)
#elif defined(__ARM_ARCH_5TE__) || (defined(__ARM_ARCH) && __ARM_ARCH > 5)
#define XR_ARCH_ABI "armv5te"
#elif defined(__mips64)
#define XR_ARCH_ABI "mips64"
Expand Down
Loading