diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2020-05-22 10:05:24 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2020-05-22 10:05:24 +0100 |
commit | 18e8a7d4f5259615be5f64139c5d32bef6cfdfdf (patch) | |
tree | 409480c7ed29f147d7999cf72fabc3ec743caa86 | |
parent | 3246c9f04267b117b4f464d9eef39b7ef7a70a7f (diff) | |
download | buildsystem-18e8a7d4f5259615be5f64139c5d32bef6cfdfdf.tar.gz buildsystem-18e8a7d4f5259615be5f64139c5d32bef6cfdfdf.tar.bz2 |
makefiles: Detect NS_ENV_CC and use that if set
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
-rw-r--r-- | makefiles/Makefile.tools | 17 |
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 |