Skip to content

Loading…

Issue 374 #806

Closed
wants to merge 2 commits into from

2 participants

@bmcmanus

Issue #374: Resolve compilation errors when using clang. Test for Clang and remove linking option(s).

@mattsta

Redis currently compiles under clang and gcc with no warnings, so these issues have been resolved.

@mattsta mattsta closed this
@JackieXie168 JackieXie168 pushed a commit that referenced this pull request
@AtnNn AtnNn Reql-like mini-driver replacing some uses of anaphoric macros
Review 908 by @srh and @mlucy
Issue #806
760402d
@JackieXie168 JackieXie168 pushed a commit that referenced this pull request
@AtnNn AtnNn Remove anaphoric macros
Review 1005 by @mlucy
Closes #806
73c52a9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 2, 2012
  1. @bmcmanus

    Issue #374: Resolve compilation errors when using clang. Test for Cla…

    bmcmanus committed
    …ng and remove linking option(s).
  2. @bmcmanus
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 4 deletions.
  1. +11 −4 src/Makefile
View
15 src/Makefile
@@ -45,16 +45,23 @@ endif
# Override default settings if possible
-include .make-settings
+# Test for Clang and remove linking option(s).
+ifneq (,$(findstring clang, $(shell $(CC) --version)))
+ LDFLAG_DYN=
+else
+ LDFLAG_DYN = -rdynamic
+endif
+
ifeq ($(uname_S),SunOS)
FINAL_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) -D__EXTENSIONS__ -D_XPG6
FINAL_LDFLAGS= $(LDFLAGS) $(REDIS_LDFLAGS) -g -ggdb
- FINAL_LIBS= -ldl -lnsl -lsocket -lm -lpthread
+ FINAL_LIBS= -ldl -lnsl -lsocket -lm -pthread
DEBUG= -g -ggdb
else
FINAL_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS)
- FINAL_LDFLAGS= $(LDFLAGS) $(REDIS_LDFLAGS) -g -rdynamic -ggdb
- FINAL_LIBS= -lm -pthread
- DEBUG= -g -rdynamic -ggdb
+ FINAL_LDFLAGS= $(LDFLAGS) $(REDIS_LDFLAGS) -g $(LDFLAG_DYN) -ggdb
+ FINAL_LIBS= -lm -lpthread
+ DEBUG= -g $(LDFLAG_DYN) -ggdb
endif
# Include paths to dependencies
Something went wrong with that request. Please try again.