Skip to content

Commit 35243bf

Browse files
committed
cheribsd: Add to rather than override environment after setup
We end up setting (X)CC etc in the environment before this point specifically when using the bootstrap toolchain, since we use objdir in build_toolchain_root_dir, and so by overriding the environment we lose that, along with any others set by _setup_make_args. I can't obviously see a reason why it has to be done this way, other than that it always has been, dating back to when env_vars was handled in cheribsd.py before it was abstracted out, and before other env vars were added to it. If there are issues from this, they should be fixed elsewhere, not with this dodgy approach. Note that when not using the bootstrap toolchain we end up at this line before calling _setup_make_args, so this is intended to align the behaviour for the bootstrap toolchain with the non-bootstrap one.
1 parent 6785842 commit 35243bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pycheribuild/projects/cross/cheribsd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,9 +525,9 @@ def check_system_dependencies(self) -> None:
525525

526526
def setup(self) -> None:
527527
super().setup()
528-
self.make_args.env_vars = {"MAKEOBJDIRPREFIX": str(self.build_dir)}
528+
self.make_args.set_env(MAKEOBJDIRPREFIX=str(self.build_dir))
529529
# TODO? Avoid lots of nested child directories by using MAKEOBJDIR instead of MAKEOBJDIRPREFIX
530-
# self.make_args.env_vars = {"MAKEOBJDIR": str(self.build_dir)}
530+
# self.make_args.set_env(MAKEOBJDIR=str(self.build_dir))
531531

532532
if self.crossbuild:
533533
# Use the script that I added for building on Linux/MacOS:

0 commit comments

Comments
 (0)