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:
parent
7d36c604f1
commit
6a463dc520
1 changed files with 2 additions and 2 deletions
|
@ -183,7 +183,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"]
|
||||
|
@ -196,7 +196,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"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue