From 5eb8c99ac31e8aba4af6a27d15998898c79af65d Mon Sep 17 00:00:00 2001 From: Casey Connolly Date: Sun, 25 May 2025 21:27:17 +0200 Subject: [PATCH] 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 --- pmb/build/init.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pmb/build/init.py b/pmb/build/init.py index 58e15535..9592bf1b 100644 --- a/pmb/build/init.py +++ b/pmb/build/init.py @@ -115,11 +115,12 @@ def init(chroot: Chroot = Chroot.native()) -> bool: def init_compiler(context: Context, depends: list[str], cross: CrossCompile, arch: Arch) -> None: arch_str = str(arch) cross_pkgs = ["ccache-cross-symlinks", "abuild"] + # FIXME: cleanup this logic if "gcc4" in depends: cross_pkgs += ["gcc4-" + arch_str] elif "gcc6" in depends: cross_pkgs += ["gcc6-" + arch_str] - else: + elif arch != Arch.native(): cross_pkgs += ["gcc-" + arch_str, "g++-" + arch_str] if "clang" in depends or "clang-dev" in depends: cross_pkgs += ["clang"]