summaryrefslogtreecommitdiff
path: root/makefiles/Makefile.tools
diff options
context:
space:
mode:
Diffstat (limited to 'makefiles/Makefile.tools')
-rw-r--r--makefiles/Makefile.tools17
1 files changed, 11 insertions, 6 deletions
diff --git a/makefiles/Makefile.tools b/makefiles/Makefile.tools
index c0e96d5..d998953 100644
--- a/makefiles/Makefile.tools
+++ b/makefiles/Makefile.tools
@@ -121,12 +121,17 @@ ifeq ($(BUILD),$(HOST))
else
# Cross compiling
- # Make first-stab at identity of CC
- CC__ := $(CC)
- # Improve our guess at the identity of CC
- # (only if CC was not specified by the user)
- ifeq ($(origin CC),default)
- CC__ := $(HOST)-gcc
+ ifneq ($(NS_ENV_CC),)
+ # If we have a CC specified by env.sh, start with that
+ CC__ := $(NS_ENV_CC)
+ else
+ # Make first-stab at identity of CC
+ CC__ := $(CC)
+ # Improve our guess at the identity of CC
+ # (only if CC was not specified by the user)
+ ifeq ($(origin CC),default)
+ CC__ := $(HOST)-gcc
+ endif
endif
# Search the path for the compiler