mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-13 03:19:47 +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
aa063f6365
commit
54cb3e680f
1 changed files with 2 additions and 2 deletions
|
@ -201,7 +201,7 @@ def _init(pkgname: str, arch: Arch | None) -> tuple[str, Arch, Any, Chroot, Env]
|
||||||
|
|
||||||
# Set up build tools and makedepends
|
# Set up build tools and makedepends
|
||||||
pmb.build.init(chroot)
|
pmb.build.init(chroot)
|
||||||
if cross:
|
if cross.enabled():
|
||||||
pmb.build.init_compiler(get_context(), [], cross, arch)
|
pmb.build.init_compiler(get_context(), [], cross, arch)
|
||||||
|
|
||||||
depends = apkbuild["makedepends"] + ["gcc", "make"]
|
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(),
|
"ARCH": arch.kernel(),
|
||||||
}
|
}
|
||||||
|
|
||||||
if cross:
|
if cross.enabled():
|
||||||
env["CROSS_COMPILE"] = f"{hostspec}-"
|
env["CROSS_COMPILE"] = f"{hostspec}-"
|
||||||
env["CC"] = f"{hostspec}-gcc"
|
env["CC"] = f"{hostspec}-gcc"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue