Skip to content

Commit 773b0ea

Browse files
Attempt to use correct shared flag in Solaris
See redis#757
1 parent b484021 commit 773b0ea

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

+7-1
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,14 @@ else
8080
endif
8181

8282
ifeq ($(uname_S),SunOS)
83+
IS_SUN_CC=$(shell sh -c '$(CC) -V 2>&1 |grep -i -c -E "sun|studio"')
84+
ifeq ($(IS_SUN_CC),1)
85+
SUN_SHARED_FLAG=-G
86+
else
87+
SUN_SHARED_FLAG=-shared
88+
endif
8389
REAL_LDFLAGS+= -ldl -lnsl -lsocket
84-
DYLIB_MAKE_CMD=$(CC) -G -o $(DYLIBNAME) -h $(DYLIB_MINOR_NAME) $(LDFLAGS)
90+
DYLIB_MAKE_CMD=$(CC) $(SUN_SHARED_FLAG) -o $(DYLIBNAME) -h $(DYLIB_MINOR_NAME) $(LDFLAGS)
8591
endif
8692
ifeq ($(uname_S),Darwin)
8793
DYLIBSUFFIX=dylib

0 commit comments

Comments
 (0)