Skip to content

Allow building on non-x86 systems - #158

Closed
scaronni wants to merge 1 commit into
mpeg5:masterfrom
scaronni:master
Closed

Allow building on non-x86 systems#158
scaronni wants to merge 1 commit into
mpeg5:masterfrom
scaronni:master

Conversation

@scaronni

Copy link
Copy Markdown
Contributor

Checking if there is any interest for this... This patch allows to build for ARM systems without the need for a cross compilation on an x86_64 system.

The changes allow the software to build like a native package on an aarch64 system, pretty much like the x86_64 one.

Linux distributions shipping xevd patch the software in a similar way to have a "normal" package that builds from source.

If there is any interest, I can update the various docs on the topic.

@scaronni

Copy link
Copy Markdown
Contributor Author

Works for both main and base profiles. I also have the equivalent xevd PR: mpeg5/xevd#87

@kpchoi

kpchoi commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the patch, this is useful for distro packaging. I picked it up on the non_x86_build branch (https://github.com/mpeg5/xeve/tree/non_x86_build) with your commit kept as is, plus a follow-up commit fixing a few things found while testing:

  • The generic (plain C) fallback did not build for the main profile: src_main/xevem_type.h still had #ifndef ARM around the SSE/AVX includes, so they were pulled in on non-x86/non-ARM targets. Changed to #if defined(X86).
  • On Windows CMAKE_SYSTEM_PROCESSOR is AMD64 (or ARM64), which the case-sensitive regex did not match, so MSVC x64 builds would silently lose all SIMD. Detection is now case-insensitive and includes amd64.
  • Moved the detection to the top-level CMakeLists so it runs once, applies -DX86/-DARM on all platforms including MSVC, and keeps the documented -DARM=TRUE cross-build flow working.
  • Dropped the src_main/neon globs since that directory does not exist.

Verified on x86-64 (SIMD kept, bit-exact output) and with a forced riscv64 target for the C fallback, both profiles. Could you give the branch a try on your aarch64 setup? If it works for you we can merge it that way. Doc updates for the new behavior would be welcome too.

@kpchoi

kpchoi commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Opened #164 with your commit included as is (authorship preserved) plus the follow-up fixes mentioned above. Thanks a lot for the contribution — this makes packaging much easier for non-x86 distros. Testing on your aarch64 setup is still very welcome over there before we merge.

@mpeg5 mpeg5 closed this in #164 Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants