From e8510fcf60c6b3541ae6cfb4d65098aa7b9d88c3 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Wed, 1 Nov 2023 16:42:42 +0000 Subject: [PATCH] Use -morello-bounded-memargs=caller-only as appropriate When CheriBSD uses the new function argument ABI, use it for building other things. --- pycheribuild/config/compilation_targets.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pycheribuild/config/compilation_targets.py b/pycheribuild/config/compilation_targets.py index f9dbf8980..a6d4c28f4 100644 --- a/pycheribuild/config/compilation_targets.py +++ b/pycheribuild/config/compilation_targets.py @@ -728,6 +728,9 @@ def essential_compiler_and_linker_flags_impl(cls, instance: "CheriBSDTargetInfo" if version is None or version >= 20220511: # Use new var-args ABI result.extend(["-Xclang", "-morello-vararg=new"]) + if version is None or version >= 20230804: + # Use new function call ABI + result.extend(["-Xclang", "-morello-bounded-memargs=caller-only"]) if xtarget.is_cheri_purecap([CPUArchitecture.AARCH64]) and version is not None and version < 20220511: # Use emulated TLS on older purecap result.append("-femulated-tls")