1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-13 03:19:47 +03:00

build: add pmb:cross-native2 (MR 2474)

Set things up so that we can run abuild on the native chroot and use
it's cross compilation features rather than running it and the build
system through QEMU. This massively speeds up building when it works.

cross-native used to be quite limited in functionality and didn't
integrate into abuild itself, this commit fixes that.

Packages can opt-in to this by adding pmb:cross-native2 to their options
and configuring makedepends_host and makedepends_build.

This also speeds up building packages like postmarketos-initramfs since
it entirely avoids running commands through QEMU (usually abuild itself
would be run through QEMU).

Lastly, we preserve the old pmb:cross-kernel options, this can be used to
enable the old cross compiler behaviour which is used for cross
compiling kernels in pmaports. This allows them to keep being supporting
while we adapt them to the new cross-native2.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2025-01-16 00:07:56 +01:00 committed by Oliver Smith
parent 5a00964943
commit 2ee916f5d6
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
5 changed files with 106 additions and 35 deletions

View file

@ -8,7 +8,7 @@ from typing import Any, Literal, TypedDict
from pmb.core.arch import Arch
CrossCompileType = Literal["native", "crossdirect"] | None
CrossCompileType = Literal["native", "crossdirect", "kernel"] | None
RunOutputTypeDefault = Literal["log", "stdout", "interactive", "tui", "null"]
RunOutputTypePopen = Literal["background", "pipe"]
RunOutputType = RunOutputTypeDefault | RunOutputTypePopen