host-build.mk: change default installation prefix of package/* host builds to staging_dir/target-*/host

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48401
This commit is contained in:
Felix Fietkau 2016-01-20 19:12:13 +00:00
parent 36502c5a6f
commit 03bc8d94f0
2 changed files with 14 additions and 12 deletions

View File

@ -30,7 +30,8 @@ BUILD_TYPES += host
HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))) HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),)))
HOST_STAMP_CONFIGURED:=$(HOST_BUILD_DIR)/.configured HOST_STAMP_CONFIGURED:=$(HOST_BUILD_DIR)/.configured
HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built
HOST_STAMP_INSTALLED:=$(STAGING_DIR_HOST)/stamp/.$(PKG_NAME)_installed HOST_BUILD_PREFIX:=$(if $(IS_PACKAGE_BUILD),$(STAGING_DIR)/host,$(STAGING_DIR_HOST))
HOST_STAMP_INSTALLED:=$(HOST_BUILD_PREFIX)/stamp/.$(PKG_NAME)_installed
override MAKEFLAGS= override MAKEFLAGS=
@ -68,11 +69,11 @@ HOST_CONFIGURE_ARGS = \
--build=$(GNU_HOST_NAME) \ --build=$(GNU_HOST_NAME) \
--program-prefix="" \ --program-prefix="" \
--program-suffix="" \ --program-suffix="" \
--prefix=$(STAGING_DIR_HOST) \ --prefix=$(HOST_BUILD_PREFIX) \
--exec-prefix=$(STAGING_DIR_HOST) \ --exec-prefix=$(HOST_BUILD_PREFIX) \
--sysconfdir=$(STAGING_DIR_HOST)/etc \ --sysconfdir=$(HOST_BUILD_PREFIX)/etc \
--localstatedir=$(STAGING_DIR_HOST)/var \ --localstatedir=$(HOST_BUILD_PREFIX)/var \
--sbindir=$(STAGING_DIR_HOST)/bin --sbindir=$(HOST_BUILD_PREFIX)/bin
HOST_MAKE_FLAGS = HOST_MAKE_FLAGS =
@ -132,11 +133,12 @@ define Download/default
endef endef
define Host/Exports/Default define Host/Exports/Default
$(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR_HOST)/share/aclocal $$(STAGING_DIR_HOST)/share/aclocal-*),-I $$(p)) $(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR_HOST)/share/aclocal $$(STAGING_DIR_HOST)/share/aclocal-* $(if $(IS_PACKAGE_BUILD),$$(STAGING_DIR_HOST)/share/aclocal $$(STAGING_DIR_HOST)/share/aclocal-*)),-I $$(p))
$(1) : export STAGING_PREFIX=$$(STAGING_DIR_HOST) $(1) : export STAGING_PREFIX=$$(HOST_BUILD_PREFIX)
$(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig $(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig:$$(HOST_BUILD_PREFIX)/lib/pkgconfig
$(1) : export PKG_CONFIG_LIBDIR=$$(STAGING_DIR_HOST)/lib/pkgconfig $(1) : export PKG_CONFIG_LIBDIR=$$(HOST_BUILD_PREFIX)/lib/pkgconfig
$(1) : export CCACHE_DIR:=$(STAGING_DIR_HOST)/ccache $(1) : export CCACHE_DIR:=$(STAGING_DIR_HOST)/ccache
$(if $(IS_PACKAGE_BUILD),$(1) : export PATH=$$(TARGET_PATH_PKG))
endef endef
Host/Exports=$(Host/Exports/Default) Host/Exports=$(Host/Exports/Default)

View File

@ -214,9 +214,9 @@ export PKG_CONFIG
HOSTCC:=gcc HOSTCC:=gcc
HOSTCXX:=g++ HOSTCXX:=g++
HOST_CPPFLAGS:=-I$(STAGING_DIR_HOST)/include -I$(STAGING_DIR_HOST)/usr/include HOST_CPPFLAGS:=-I$(STAGING_DIR_HOST)/include -I$(STAGING_DIR_HOST)/usr/include $(if $(IS_PACKAGE_BUILD),-I$(STAGING_DIR)/host/include)
HOST_CFLAGS:=-O2 $(HOST_CPPFLAGS) HOST_CFLAGS:=-O2 $(HOST_CPPFLAGS)
HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib -L$(STAGING_DIR_HOST)/usr/lib HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib -L$(STAGING_DIR_HOST)/usr/lib $(if $(IS_PACKAGE_BUILD),-L$(STAGING_DIR)/host/lib)
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
TARGET_AR:=$(TARGET_CROSS)gcc-ar TARGET_AR:=$(TARGET_CROSS)gcc-ar