Skip to content

Commit

Permalink
plugin: kernel: use new CRAFT_ARCH_TRIPLET_BUILD_FOR variable
Browse files Browse the repository at this point in the history
  • Loading branch information
kubiko committed Oct 26, 2023
1 parent 1c9622f commit 394cb31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions snapcraft/parts/plugins/kernel_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def _init_build_env(self) -> None:
def _check_cross_compilation(self) -> None:
if self._cross_building:
self._make_cmd.append(f"ARCH={self._kernel_arch}")
self._make_cmd.append("CROSS_COMPILE=${CRAFT_ARCH_TRIPLET}-")
self._make_cmd.append("CROSS_COMPILE=${CRAFT_ARCH_TRIPLET_BUILD_FOR}-")

def _set_kernel_targets(self) -> None:
if not self.options.kernel_image_target:
Expand Down Expand Up @@ -317,7 +317,7 @@ def get_build_environment(self) -> Dict[str, str]:
self._init_build_env()

return {
"CROSS_COMPILE": "${CRAFT_ARCH_TRIPLET}-",
"CROSS_COMPILE": "${CRAFT_ARCH_TRIPLET_BUILD_FOR}-",
"ARCH": self._kernel_arch,
"DEB_ARCH": "${CRAFT_TARGET_ARCH}",
"KERNEL_BUILD_ARCH_DIR": f"${{CRAFT_PART_BUILD}}/arch/{self._kernel_arch}/boot",
Expand All @@ -333,7 +333,7 @@ def get_build_commands(self) -> List[str]:
make_targets=self._make_targets,
make_install_targets=self._make_install_targets,
target_arch=self._target_arch,
target_arch_triplet="${CRAFT_ARCH_TRIPLET}",
target_arch_triplet="${CRAFT_ARCH_TRIPLET_BUILD_FOR}",
config_file=self.options.kernel_kconfigfile,
config_flavour=self.options.kernel_kconfigflavour,
defconfig=self.options.kernel_kdefconfig,
Expand Down

0 comments on commit 394cb31

Please sign in to comment.