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

pmb.build.kconfig: test cross type in conditions

`if cross` always evaluates to True, which causes pmb to attempt to set
up cross compiling when it shouldn't.
This commit is contained in:
Clayton Craft 2025-06-10 13:33:28 -07:00
parent aa063f6365
commit 54cb3e680f
No known key found for this signature in database
GPG key ID: 4A4CED6D7EDF950A

View file

@ -201,7 +201,7 @@ def _init(pkgname: str, arch: Arch | None) -> tuple[str, Arch, Any, Chroot, Env]
# Set up build tools and makedepends
pmb.build.init(chroot)
if cross:
if cross.enabled():
pmb.build.init_compiler(get_context(), [], cross, arch)
depends = apkbuild["makedepends"] + ["gcc", "make"]
@ -214,7 +214,7 @@ def _init(pkgname: str, arch: Arch | None) -> tuple[str, Arch, Any, Chroot, Env]
"ARCH": arch.kernel(),
}
if cross:
if cross.enabled():
env["CROSS_COMPILE"] = f"{hostspec}-"
env["CC"] = f"{hostspec}-gcc"