diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-05-17 17:08:57 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-01 08:05:21 +0000 |
commit | c57ab1768767ca4f860ce5ca5faf54a7dba4969f (patch) | |
tree | 5d723362b0724b23154d3ba5c782ee47ed55aa57 /src/libstore/local.mk | |
parent | e8f585be70b22c11db5356f886049f432699eac3 (diff) |
Only link with libdl on Linux
Linux is (as far as I know) the only mainstream operating system that
requires linking with libdl for dlopen. On BSD, libdl doesn't exist,
so on non-FreeBSD BSDs linking will currently fail. On macOS, it's
apparently just a symlink to libSystem (macOS libc), presumably
present for compatibility with things that assume Linux.
So the right thing to do here is to only add -ldl on Linux, not to add
it for everything that isn't FreeBSD.
Diffstat (limited to 'src/libstore/local.mk')
-rw-r--r-- | src/libstore/local.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/local.mk b/src/libstore/local.mk index cf0933705..b6652984c 100644 --- a/src/libstore/local.mk +++ b/src/libstore/local.mk @@ -9,7 +9,7 @@ libstore_SOURCES := $(wildcard $(d)/*.cc $(d)/builtins/*.cc $(d)/build/*.cc) libstore_LIBS = libutil libstore_LDFLAGS = $(SQLITE3_LIBS) -lbz2 $(LIBCURL_LIBS) $(SODIUM_LIBS) -pthread -ifneq ($(OS), FreeBSD) +ifeq ($(OS), Linux) libstore_LDFLAGS += -ldl endif |