mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-13 19:39:51 +03:00
build: init: fix init_compiler for native
Handle the case where cross compilation is not needed since cross_compiler can still be called when not actually cross compiling. Install gcc since kernel packages don't actually depend on it explicitly. Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
This commit is contained in:
parent
c500d95875
commit
5eb8c99ac3
1 changed files with 2 additions and 1 deletions
|
@ -115,11 +115,12 @@ def init(chroot: Chroot = Chroot.native()) -> bool:
|
||||||
def init_compiler(context: Context, depends: list[str], cross: CrossCompile, arch: Arch) -> None:
|
def init_compiler(context: Context, depends: list[str], cross: CrossCompile, arch: Arch) -> None:
|
||||||
arch_str = str(arch)
|
arch_str = str(arch)
|
||||||
cross_pkgs = ["ccache-cross-symlinks", "abuild"]
|
cross_pkgs = ["ccache-cross-symlinks", "abuild"]
|
||||||
|
# FIXME: cleanup this logic
|
||||||
if "gcc4" in depends:
|
if "gcc4" in depends:
|
||||||
cross_pkgs += ["gcc4-" + arch_str]
|
cross_pkgs += ["gcc4-" + arch_str]
|
||||||
elif "gcc6" in depends:
|
elif "gcc6" in depends:
|
||||||
cross_pkgs += ["gcc6-" + arch_str]
|
cross_pkgs += ["gcc6-" + arch_str]
|
||||||
else:
|
elif arch != Arch.native():
|
||||||
cross_pkgs += ["gcc-" + arch_str, "g++-" + arch_str]
|
cross_pkgs += ["gcc-" + arch_str, "g++-" + arch_str]
|
||||||
if "clang" in depends or "clang-dev" in depends:
|
if "clang" in depends or "clang-dev" in depends:
|
||||||
cross_pkgs += ["clang"]
|
cross_pkgs += ["clang"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue