From 07dcbe07bb09f4c0e642c0706597493b61c13362 Mon Sep 17 00:00:00 2001
From: vanhofen <vanhofen@gmx.de>
Date: Mon, 25 Dec 2017 23:14:22 +0100
Subject: [PATCH] - remove CROSS_BASE variable; use CROSS_DIR instead of this

---
 Makefile            |  1 -
 make/clean.mk       |  4 ++--
 make/environment.mk |  3 +--
 make/system-libs.mk | 24 ++++++++++++------------
 4 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/Makefile b/Makefile
index 70bd1329..5e7d041e 100755
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,6 @@ printenv:
 	@echo '============================================================================== '
 	@echo "Build Environment Varibles:"
 	@echo "CROSS_DIR:   $(CROSS_DIR)"
-	@echo "CROSS_BASE:  $(CROSS_BASE)"
 	@echo "TARGET:      $(TARGET)"
 	@echo "BASE_DIR:    $(BASE_DIR)"
 	@echo "BUILD:       $(BUILD)"
diff --git a/make/clean.mk b/make/clean.mk
index 9a6f2492..539d0b7e 100644
--- a/make/clean.mk
+++ b/make/clean.mk
@@ -12,9 +12,9 @@ static-clean:
 	-rm -rf $(STATIC_DIR)
 
 all-clean: rebuild-clean staging-clean static-clean
-	@echo -e "\n$(TERM_RED_BOLD)Any other key then CTRL-C will now remove CROSS_BASE and HOST_DIR$(TERM_NORMAL)"
+	@echo -e "\n$(TERM_RED_BOLD)Any other key then CTRL-C will now remove CROSS_DIR and HOST_DIR$(TERM_NORMAL)"
 	@read
-	-rm -rf $(CROSS_BASE)
+	-rm -rf $(CROSS_DIR)
 	-rm -rf $(HOST_DIR)
 
 %-clean:
diff --git a/make/environment.mk b/make/environment.mk
index 5f1d8a34..261eec62 100644
--- a/make/environment.mk
+++ b/make/environment.mk
@@ -146,8 +146,7 @@ IMAGE_DIR     = $(STAGING_DIR)/images
 UPDATE_DIR    = $(STAGING_DIR)/updates
 STATIC_DIR    = $(BASE_DIR)/static/$(BOXARCH)/$(BOXSERIES)
 HELPERS_DIR   = $(BASE_DIR)/helpers
-CROSS_BASE    = $(BASE_DIR)/cross/$(BOXARCH)/$(BOXSERIES)
-CROSS_DIR    ?= $(CROSS_BASE)
+CROSS_DIR    ?= $(BASE_DIR)/cross/$(BOXARCH)/$(BOXSERIES)
 CONFIGS       = $(BASE_DIR)/archive-configs
 PATCHES       = $(BASE_DIR)/archive-patches
 IMAGEFILES    = $(BASE_DIR)/archive-imagefiles
diff --git a/make/system-libs.mk b/make/system-libs.mk
index 0df24a95..174c6290 100644
--- a/make/system-libs.mk
+++ b/make/system-libs.mk
@@ -475,12 +475,12 @@ $(D)/openthreads: $(SOURCE_DIR)/$(NI_OPENTHREADS) | $(TARGET_DIR)
 			-DCMAKE_INSTALL_PREFIX="" \
 			-DCMAKE_C_COMPILER="$(TARGET)-gcc" \
 			-DCMAKE_CXX_COMPILER="$(TARGET)-g++" \
-			-DCMAKE_LINKER="$(CROSS_BASE)/bin/$(TARGET)-ld" \
-			-DCMAKE_RANLIB="$(CROSS_BASE)/bin/$(TARGET)-ranlib" \
-			-DCMAKE_AR="$(CROSS_BASE)/bin/$(TARGET)-ar" \
-			-DCMAKE_NM="$(CROSS_BASE)/bin/$(TARGET)-nm" \
-			-DCMAKE_OBJDUMP="$(CROSS_BASE)/bin/$(TARGET)-objdump" \
-			-DCMAKE_STRIP="$(CROSS_BASE)/bin/$(TARGET)-strip" \
+			-DCMAKE_LINKER="$(CROSS_DIR)/bin/$(TARGET)-ld" \
+			-DCMAKE_RANLIB="$(CROSS_DIR)/bin/$(TARGET)-ranlib" \
+			-DCMAKE_AR="$(CROSS_DIR)/bin/$(TARGET)-ar" \
+			-DCMAKE_NM="$(CROSS_DIR)/bin/$(TARGET)-nm" \
+			-DCMAKE_OBJDUMP="$(CROSS_DIR)/bin/$(TARGET)-objdump" \
+			-DCMAKE_STRIP="$(CROSS_DIR)/bin/$(TARGET)-strip" \
 			-DCMAKE_SUPPRESS_DEVELOPER_WARNINGS="1" \
 			-D_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS_EXITCODE="0" && \
 		$(MAKE) && \
@@ -867,12 +867,12 @@ $(D)/pugixml: $(ARCHIVE)/pugixml-$(PUGIXML_VER).tar.gz | $(TARGET_DIR)
 		-DCMAKE_SYSTEM_PROCESSOR="arm" \
 		-DCMAKE_C_COMPILER="$(TARGET)-gcc" \
 		-DCMAKE_CXX_COMPILER="$(TARGET)-g++" \
-		-DCMAKE_LINKER="$(CROSS_BASE)/bin/$(TARGET)-ld" \
-		-DCMAKE_RANLIB="$(CROSS_BASE)/bin/$(TARGET)-ranlib" \
-		-DCMAKE_AR="$(CROSS_BASE)/bin/$(TARGET)-ar" \
-		-DCMAKE_NM="$(CROSS_BASE)/bin/$(TARGET)-nm" \
-		-DCMAKE_OBJDUMP="$(CROSS_BASE)/bin/$(TARGET)-objdump" \
-		-DCMAKE_STRIP="$(CROSS_BASE)/bin/$(TARGET)-strip" \
+		-DCMAKE_LINKER="$(CROSS_DIR)/bin/$(TARGET)-ld" \
+		-DCMAKE_RANLIB="$(CROSS_DIR)/bin/$(TARGET)-ranlib" \
+		-DCMAKE_AR="$(CROSS_DIR)/bin/$(TARGET)-ar" \
+		-DCMAKE_NM="$(CROSS_DIR)/bin/$(TARGET)-nm" \
+		-DCMAKE_OBJDUMP="$(CROSS_DIR)/bin/$(TARGET)-objdump" \
+		-DCMAKE_STRIP="$(CROSS_DIR)/bin/$(TARGET)-strip" \
 		; \
 		$(MAKE); \
 		make install DESTDIR=$(TARGET_DIR)