From a65537a672de845f3f4530050d1e7bd88d51ac67 Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Thu, 31 May 2018 02:52:45 -0500 Subject: [PATCH] Use -dynamiclib instead of -shared on macOS -dynamiclib is the correct documented flag to use to create dynamic libraries on macOS. Newer toolchains recognize -shared as a synonym of -dynamiclib but older toolchains don't. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5d7e23c..b2e45f0 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,7 @@ endif ifeq ($(uname_S),Darwin) DYLIBSUFFIX=dylib DYLIB_MINOR_NAME=$(LIBNAME).$(HIREDIS_SONAME).$(DYLIBSUFFIX) - DYLIB_MAKE_CMD=$(CC) -shared -Wl,-install_name,$(PREFIX)/$(LIBRARY_PATH)/$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(LDFLAGS) + DYLIB_MAKE_CMD=$(CC) -dynamiclib -Wl,-install_name,$(PREFIX)/$(LIBRARY_PATH)/$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(LDFLAGS) endif all: $(DYLIBNAME) $(STLIBNAME) hiredis-test $(PKGCONFNAME)