Skip to content

qemu: Enable user_static builds for providing user mode emulation.#16664

Open
Sumynwa wants to merge 1 commit into3.0-devfrom
sumsharma/enable_qemu_static
Open

qemu: Enable user_static builds for providing user mode emulation.#16664
Sumynwa wants to merge 1 commit into3.0-devfrom
sumsharma/enable_qemu_static

Conversation

@Sumynwa
Copy link
Copy Markdown
Contributor

@Sumynwa Sumynwa commented Apr 14, 2026

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

This PR introduces changes to enable user_static builds in qemu to build qemu-user-static* arch specific packages for providing user mode emulation. This enables support to cross compile for ex aarch64 using qemu-user-static-aarch64 sub-package via binfmt-misc on x86_64 host. By default, the binfmt config is set with 'F' flag to preload the interpreter binary to allow cross compilation using container environment.

Change Log
  • Enable user_static global compile flag
  • configure user_static with 'enable_pie'
  • manage systemd-binfmt restarts post install/uninstall to avoid start-limit-hit
  • add conflicts between qemu-user-static and qemu-user-binfmt as both
    provide binfmt rules
Does this affect the toolchain?

NO

Associated issues
  • #xxxx
Links to CVEs
Test Methodology

Signed-off-by: Sumedh Alok Sharma <sumsharma@microsoft.com>
@Sumynwa Sumynwa requested a review from a team as a code owner April 14, 2026 08:08
@microsoft-github-policy-service microsoft-github-policy-service bot added Packaging 3.0-dev PRs Destined for AzureLinux 3.0 labels Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0-dev PRs Destined for AzureLinux 3.0 Packaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant