I ported the new Hare compiler to OpenBSD
a day ago
- The author ports the Hare programming language compiler to OpenBSD after noticing it already supports Linux and FreeBSD.
- Steps include cloning the compiler, copying FreeBSD directories, renaming files, and modifying errno and syscall definitions for OpenBSD.
- Build issues encountered: mktemp function name conflict resolved by renaming to emktemp; printf format warnings fixed by following clang suggestions.
- Initial test failures due to OpenBSD's requirement for a .note.openbsd.ident section in ELF binaries, requiring assembly code additions and linker script updates.
- Further test failures resolved by adding the -nopie flag to the linker to handle position-independent execution correctly.
- After fixes, all tests pass; author submits a patch to the mailing list and plans to port the runtime and support riscv64/arm64.