Remove $(ARCH) expansion from the Makefile
Some compilation environments (such as Yocto) define the ARCH environment variable to indicate the target architecture. For such enviroments, hiredis build fails, because the expanded $(ARCH) variable in the Makefile gets erroneously interpreted as an argument to the `-ggdb' command line option during the compilation stage or as an input file name during the linking stage. This patch removes $(ARCH) expansions from the Makefile. This doesn't harm cross-compilation, the latter goes fine with the properly assigned CC environment variable. For native builds, this patch does not imply any changes. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
This commit is contained in:
parent
07d414731b
commit
3238cf4fe7
4
Makefile
4
Makefile
@ -41,8 +41,8 @@ CXX:=$(shell sh -c 'type $(CXX) >/dev/null 2>/dev/null && echo $(CXX) || echo g+
|
|||||||
OPTIMIZATION?=-O3
|
OPTIMIZATION?=-O3
|
||||||
WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings
|
WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings
|
||||||
DEBUG_FLAGS?= -g -ggdb
|
DEBUG_FLAGS?= -g -ggdb
|
||||||
REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) $(ARCH)
|
REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS)
|
||||||
REAL_LDFLAGS=$(LDFLAGS) $(ARCH)
|
REAL_LDFLAGS=$(LDFLAGS)
|
||||||
|
|
||||||
DYLIBSUFFIX=so
|
DYLIBSUFFIX=so
|
||||||
STLIBSUFFIX=a
|
STLIBSUFFIX=a
|
||||||
|
Loading…
Reference in New Issue
Block a user