mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
Fix OpenBSD build with Makefiles
OpenBSD dynamic libraries never link to libc directly.
Instead, they have undefined symbols for all libc functions they use
that ld.so resolves to the libc referred to in the main executable.
Thus, disallowing undefined symbols will always fail
(cherry picked from commit c49bff2434
)
This commit is contained in:
parent
7718688f52
commit
d6ece7e94a
2 changed files with 7 additions and 1 deletions
|
@ -86,7 +86,9 @@ define build-library
|
|||
else
|
||||
ifndef HOST_DARWIN
|
||||
ifndef HOST_WINDOWS
|
||||
$(1)_LDFLAGS += -Wl,-z,defs
|
||||
ifndef HOST_OPENBSD
|
||||
$(1)_LDFLAGS += -Wl,-z,defs
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -21,6 +21,10 @@ ifdef HOST_OS
|
|||
HOST_NETBSD = 1
|
||||
HOST_UNIX = 1
|
||||
endif
|
||||
ifeq ($(patsubst openbsd%,,$(HOST_KERNEL)),)
|
||||
HOST_OPENBSD = 1
|
||||
HOST_UNIX = 1
|
||||
endif
|
||||
ifeq ($(HOST_KERNEL), linux)
|
||||
HOST_LINUX = 1
|
||||
HOST_UNIX = 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue