Don't treat $(CC) as a list of compiler candidates if provided by user.
Otherwise, if a multi-word $(CC) is provided by the user, such as "gcc -m32", then we test each word as a compiler. "-m32" then gives you an error from the shell about "-3" not being a valid option.
This commit is contained in:
1 parent
842ff9d618
commit
810a7d3644
1 file changed
+7
-8
@@ -36,7 +36,13 @@ endif
|
||||
# Environment tests
|
||||
|
||||
ifeq (,$(CC))
|
||||
CC := gcc cc
|
||||
CC_CANDIDATES := gcc cc
|
||||
test_cc = $(shell $(cc) --version > /dev/null 2>&1 && echo $(cc))
|
||||
CC := $(foreach cc,$(CC_CANDIDATES), $(test_cc))
|
||||
CC := $(firstword $(CC))
|
||||
ifeq (,$(CC))
|
||||
$(error Compiler not found)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (,$(KSRC))
|
||||
@@ -95,13 +101,6 @@ ifeq (,$(wildcard $(CONFIG_FILE)))
|
||||
endif
|
||||
|
||||
|
||||
test_cc = $(shell $(cc) --version > /dev/null 2>&1 && echo $(cc))
|
||||
CC := $(foreach cc, $(CC), $(test_cc))
|
||||
CC := $(firstword $(CC))
|
||||
ifeq (,$(CC))
|
||||
$(error Compiler not found)
|
||||
endif
|
||||
|
||||
# we need to know what platform the driver is being built on
|
||||
# some additional features are only built on Intel platforms
|
||||
ifeq ($(ARCH),)
|
||||
|
||||
Reference in new issue
Block a user