Respect $(CROSS_COMPILE) when $(CC) is the default
Commit1180ed5
told make to only respect $(CROSS_COMPILE) when $(CC) was unset. But that will never be the case, as make provides a default value for $(CC). Change this logic to respect $(CROSS_COMPILE) when $(CC) is the default. Patch originally by Helmet Grohne. Fixes:1180ed5
("Makefile: make the CC definition conditional") Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
This commit is contained in:
parent
027c099fd1
commit
aced6fc954
4
Makefile
4
Makefile
|
@ -46,7 +46,9 @@ ifdef COVERITY
|
||||||
COVERITY_FLAGS=-include coverity-gcc-hack.h
|
COVERITY_FLAGS=-include coverity-gcc-hack.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC ?= $(CROSS_COMPILE)gcc
|
ifeq ($(origin CC),default)
|
||||||
|
CC := $(CROSS_COMPILE)gcc
|
||||||
|
endif
|
||||||
CXFLAGS ?= -ggdb
|
CXFLAGS ?= -ggdb
|
||||||
CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
|
CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
|
||||||
ifdef WARN_UNUSED
|
ifdef WARN_UNUSED
|
||||||
|
|
Loading…
Reference in New Issue