hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 686f94ddf02f46d2629b06471c4a9d8325ebe613
parent 8a6c36e901acecc4c648fa97c3c7b19d253cae59
Author: Lorenz (xha) <me@xha.li>
Date:   Sat, 25 Nov 2023 15:18:05 +0100

cmd::hare: add OpenBSD

Signed-off-by: Lorenz (xha) <me@xha.li>

Diffstat:
Mcmd/hare/build/platform.ha | 16++++++++++++++++
1 file changed, 16 insertions(+), 0 deletions(-)

diff --git a/cmd/hare/build/platform.ha b/cmd/hare/build/platform.ha @@ -18,6 +18,22 @@ const platforms: [_]platform = [ name = "FreeBSD", ... }, + platform { + name = "OpenBSD", + need_libc = true, + default_flags = [ + [], + [], + [], + [], + // IBT/BTI is a CPU feature that prevents ROP-attacks. + // Since this is enforced by default on OpenBSD but not + // implemented by QBE, we need to disable the + // enforcement. ld.lld(1) can do this for us by + // creating a custom segment. + ["-z", "nobtcfi"], + ], + }, ]; export fn get_platform(name: str) (*platform | unknown_platform) = {