From 2a3283643ccf77b55d67c7a3f96d40576227499c Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Fri, 2 Dec 2022 20:56:12 +0100 Subject: treewide: derive host and hostpkg path from STAGING_DIR STAGING_DIR may be provided from command line. We currently hardcoded STAGING_DIR_HOST and STAGING_DIR_HOSTPKG to the default location but we currently have some relocatable patch that derive the path from STAGING_DIR. Fix this and correctly derive STAGING_DIR_HOST and STAGING_DIR_HOSTPKG from STAGING_DIR. The intention is to fix inconsistency from the relocatable patch and the use of STAGING_DIR_HOST that is always hardcoded. This with a wrong configuration may end up in broken state with some host tools expecing a PATH from STAGING_DIR and others using library from the default staging_dir/host path. To save downstream project the original implementation is saved while fixing the inconsistency between patch and .mk. Signed-off-by: Christian Marangi --- rules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rules.mk') diff --git a/rules.mk b/rules.mk index d53f673d42..3d151338af 100644 --- a/rules.mk +++ b/rules.mk @@ -156,8 +156,8 @@ BUILD_LOG_DIR:=$(if $(call qstrip,$(CONFIG_BUILD_LOG_DIR)),$(call qstrip,$(CONFI PKG_INFO_DIR := $(STAGING_DIR)/pkginfo BUILD_DIR_HOST:=$(if $(IS_PACKAGE_BUILD),$(BUILD_DIR_BASE)/hostpkg,$(BUILD_DIR_BASE)/host) -STAGING_DIR_HOST:=$(TOPDIR)/staging_dir/host -STAGING_DIR_HOSTPKG:=$(TOPDIR)/staging_dir/hostpkg +STAGING_DIR_HOST:=$(abspath $(STAGING_DIR)/../host) +STAGING_DIR_HOSTPKG:=$(abspath $(STAGING_DIR)/../hostpkg) TARGET_PATH:=$(subst $(space),:,$(filter-out .,$(filter-out ./,$(subst :,$(space),$(PATH))))) TARGET_INIT_PATH:=$(call qstrip,$(CONFIG_TARGET_INIT_PATH)) -- cgit v1.2.1