summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--contrib/plugins/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile
index db1bd04dfa..c26fa08441 100644
--- a/contrib/plugins/Makefile
+++ b/contrib/plugins/Makefile
@@ -37,7 +37,11 @@ all: $(SONAMES)
 	$(CC) $(CFLAGS) -c -o $@ $<
 
 lib%.so: %.o
+ifeq ($(CONFIG_DARWIN),y)
+	$(CC) -bundle -Wl,-undefined,dynamic_lookup -o $@ $^ $(LDLIBS)
+else
 	$(CC) -shared -o $@ $^ $(LDLIBS)
+endif
 
 clean:
 	rm -f *.o *.so *.d