For additional compatibility this adds REDIS_CFLAGS and REDIS_LDFLAGS support to MAKEFILE (#66)
This resolves (1.viii) from https://github.com/valkey-io/valkey/issues/43 > REDIS_FLAGS will be updated to SERVER_FLAGS. Maybe we should also allow REDIS_FLAGS -> SERVER_FLAGS as well, for an extra layer of compatibility. --------- Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
This commit is contained in:
parent
3b85c1e56b
commit
924e85eac3
16
src/Makefile
16
src/Makefile
@ -1,12 +1,12 @@
|
|||||||
# Redis Makefile
|
# Valkey Makefile
|
||||||
# Copyright (C) 2009 Salvatore Sanfilippo <antirez at gmail dot com>
|
# Copyright (C) 2009 Salvatore Sanfilippo <antirez at gmail dot com>
|
||||||
# This file is released under the BSD license, see the COPYING file
|
# This file is released under the BSD license, see the COPYING file
|
||||||
#
|
#
|
||||||
# The Makefile composes the final FINAL_CFLAGS and FINAL_LDFLAGS using
|
# The Makefile composes the final FINAL_CFLAGS and FINAL_LDFLAGS using
|
||||||
# what is needed for Redis plus the standard CFLAGS and LDFLAGS passed.
|
# what is needed for Valkey plus the standard CFLAGS and LDFLAGS passed.
|
||||||
# However when building the dependencies (Jemalloc, Lua, Hiredis, ...)
|
# However when building the dependencies (Jemalloc, Lua, Hiredis, ...)
|
||||||
# CFLAGS and LDFLAGS are propagated to the dependencies, so to pass
|
# CFLAGS and LDFLAGS are propagated to the dependencies, so to pass
|
||||||
# flags only to be used when compiling / linking Redis itself SERVER_CFLAGS
|
# flags only to be used when compiling / linking Valkey itself SERVER_CFLAGS
|
||||||
# and SERVER_LDFLAGS are used instead (this is the case of 'make gcov').
|
# and SERVER_LDFLAGS are used instead (this is the case of 'make gcov').
|
||||||
#
|
#
|
||||||
# Dependencies are stored in the Makefile.dep file. To rebuild this file
|
# Dependencies are stored in the Makefile.dep file. To rebuild this file
|
||||||
@ -70,7 +70,7 @@ ifeq ($(uname_S),Linux)
|
|||||||
MALLOC=jemalloc
|
MALLOC=jemalloc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# To get ARM stack traces if Redis crashes we need a special C flag.
|
# To get ARM stack traces if Valkey crashes we need a special C flag.
|
||||||
ifneq (,$(filter aarch64 armv%,$(uname_M)))
|
ifneq (,$(filter aarch64 armv%,$(uname_M)))
|
||||||
CFLAGS+=-funwind-tables
|
CFLAGS+=-funwind-tables
|
||||||
endif
|
endif
|
||||||
@ -116,6 +116,14 @@ endif
|
|||||||
# Override default settings if possible
|
# Override default settings if possible
|
||||||
-include .make-settings
|
-include .make-settings
|
||||||
|
|
||||||
|
# For added compatibility REDIS_CFLAGS and REDIS_LDFLAGS are also supported.
|
||||||
|
ifdef REDIS_CFLAGS
|
||||||
|
SERVER_CFLAGS := $(REDIS_CFLAGS)
|
||||||
|
endif
|
||||||
|
ifdef REDIS_LDFLAGS
|
||||||
|
SERVER_LDFLAGS := $(REDIS_LDFLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(SERVER_CFLAGS)
|
FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(SERVER_CFLAGS)
|
||||||
FINAL_LDFLAGS=$(LDFLAGS) $(SERVER_LDFLAGS) $(DEBUG)
|
FINAL_LDFLAGS=$(LDFLAGS) $(SERVER_LDFLAGS) $(DEBUG)
|
||||||
FINAL_LIBS=-lm
|
FINAL_LIBS=-lm
|
||||||
|
Loading…
x
Reference in New Issue
Block a user