From f5194c3579c10f112e9706fd3c1a787defc753eb Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Wed, 23 Oct 2024 23:00:13 +0000 Subject: [PATCH] openbsd.openbsdSetupHook: Fix bsd.prog.mk bsd.prog.mk makes sure libc is built before programs that use it by making all programs depend on core files. We handle this dependency by referencing libc in cc-wrapper, but that isn't sufficient to tell bsd.prog.mk that e.g. crtbegin.o exists. Clear libc-related variables to fix OpenBSD program build --- .../bsd/openbsd/pkgs/openbsdSetupHook/setup-hook.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/os-specific/bsd/openbsd/pkgs/openbsdSetupHook/setup-hook.sh b/pkgs/os-specific/bsd/openbsd/pkgs/openbsdSetupHook/setup-hook.sh index e06dbda37c40..dbd016fcb59c 100644 --- a/pkgs/os-specific/bsd/openbsd/pkgs/openbsdSetupHook/setup-hook.sh +++ b/pkgs/os-specific/bsd/openbsd/pkgs/openbsdSetupHook/setup-hook.sh @@ -1,6 +1,11 @@ addOpenBSDMakeFlags() { prependToVar makeFlags "INCSDIR=${!outputDev}/include" prependToVar makeFlags "MANDIR=${!outputMan}/share/man" + # Variables are used to declare dependencies, but we handle them with cc-wrapper + prependToVar makeFlags "CRTBEGIN=" + prependToVar makeFlags "CRTEND=" + prependToVar makeFlags "LIBCRT0=" + prependToVar makeFlags "LIBC=" } fixOpenBSDInstallDirs() {