diff --git a/pycheribuild/projects/cross/cheribsd.py b/pycheribuild/projects/cross/cheribsd.py index f1756b9d3..4b00a0ccc 100644 --- a/pycheribuild/projects/cross/cheribsd.py +++ b/pycheribuild/projects/cross/cheribsd.py @@ -1930,6 +1930,10 @@ def setup_config_options(cls, kernel_only_target=False, install_directory_help=N def can_build_with_csa(cls) -> bool: return True + @classproperty + def extra_scan_build_args(self) -> list[str]: + return ["-disable-checker", "alpha.core.PointerSub"] + def __init__(self, *args, **kwargs) -> None: super().__init__(*args, **kwargs) self.extra_kernels_with_mfs: "list[str]" = [] diff --git a/pycheribuild/projects/project.py b/pycheribuild/projects/project.py index a163a6f1d..dd6fd3b0c 100644 --- a/pycheribuild/projects/project.py +++ b/pycheribuild/projects/project.py @@ -508,6 +508,10 @@ def can_build_with_cfi(self) -> bool: def can_build_with_csa(self) -> bool: return False + @classproperty + def extra_scan_build_args(self) -> list[str]: + return [] + @classproperty def can_build_with_ccache(self) -> bool: return False @@ -1227,6 +1231,8 @@ def _get_scan_build_args(self) -> list[str]: "--use-cc", commandline_to_str([self.CC]), "--use-c++", commandline_to_str([self.CXX]), ] + if self.extra_scan_build_args: + scan_build_args = scan_build_args + self.extra_scan_build_args return scan_build_args def _get_make_commandline(