mirror of
https://github.com/redis/redis.git
synced 2026-05-27 19:52:35 -04:00
PR https://github.com/redis/redis/pull/13916 introduced a regression - by overriding the `CFLAGS` and `LDFLAGS` variables for all of the dependencies hiredis and fast_float lost some of their compiler/linker flags. This PR makes it so we can pass additional CFLAGS/LDFLAGS to hiredis, without overriding them as it contains a bit more complex Makefile. As for fast_float - passing CFLAGS/LDFLAGS from outside now doesn't break the expected behavior. The build step in the CI was changed so that the MacOS is now build with TLS to catch such errors in the future.
27 lines
583 B
Makefile
27 lines
583 B
Makefile
# Fallback to gcc/g++ when $CC or $CXX is not in $PATH.
|
|
CC ?= gcc
|
|
CXX ?= g++
|
|
|
|
WARN=-Wall
|
|
OPT=-O3
|
|
STD=-std=c++11
|
|
DEFS=-DFASTFLOAT_ALLOWS_LEADING_PLUS
|
|
|
|
FASTFLOAT_CFLAGS=$(WARN) $(OPT) $(STD) $(DEFS) $(CFLAGS)
|
|
FASTFLOAT_LDFLAGS=$(LDFLAGS)
|
|
|
|
libfast_float: fast_float_strtod.o
|
|
$(AR) -r libfast_float.a fast_float_strtod.o
|
|
|
|
32bit: FASTFLOAT_CFLAGS += -m32
|
|
32bit: FASTFLOAT_LDFLAGS += -m32
|
|
32bit: libfast_float
|
|
|
|
fast_float_strtod.o: fast_float_strtod.cpp
|
|
$(CXX) $(FASTFLOAT_CFLAGS) -c fast_float_strtod.cpp $(FASTFLOAT_LDFLAGS)
|
|
|
|
clean:
|
|
rm -f *.o
|
|
rm -f *.a
|
|
rm -f *.h.gch
|
|
rm -rf *.dSYM
|