build: stop overriding STAGING_DIR_HOST for toolchain build

This causes various issues in other places that assume that host
binaries are staged in STAGING_DIR_HOST.
Since all the right places use HOST_BUILD_PREFIX, override that instead.
This fixes some issues with quilt on toolchain dirs

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2017-05-03 15:01:03 +02:00
parent a76cbc0d7e
commit f62f4b3c5c
5 changed files with 8 additions and 14 deletions

View file

@ -27,7 +27,7 @@ BUILD_TYPES += host
HOST_STAMP_PREPARED:=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(HOST_PREPARED_DEPENDS))) HOST_STAMP_PREPARED:=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(HOST_PREPARED_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_BUILD_PREFIX:=$(if $(IS_PACKAGE_BUILD),$(STAGING_DIR_HOSTPKG),$(STAGING_DIR_HOST)) HOST_BUILD_PREFIX?=$(if $(IS_PACKAGE_BUILD),$(STAGING_DIR_HOSTPKG),$(STAGING_DIR_HOST))
HOST_STAMP_INSTALLED:=$(HOST_BUILD_PREFIX)/stamp/.$(PKG_NAME)_installed HOST_STAMP_INSTALLED:=$(HOST_BUILD_PREFIX)/stamp/.$(PKG_NAME)_installed
override MAKEFLAGS= override MAKEFLAGS=

View file

@ -8,8 +8,7 @@
override CONFIG_AUTOREBUILD= override CONFIG_AUTOREBUILD=
override CONFIG_AUTOREMOVE= override CONFIG_AUTOREMOVE=
REAL_STAGING_DIR_HOST:=$(STAGING_DIR_HOST) HOST_BUILD_PREFIX:=$(TOOLCHAIN_DIR)
STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN) BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/host-build.mk

View file

@ -34,8 +34,6 @@ HOST_BUILD_PARALLEL:=1
PATCH_DIR:=./patches/$(PKG_VERSION) PATCH_DIR:=./patches/$(PKG_VERSION)
REAL_STAGING_DIR_HOST:=$(STAGING_DIR_HOST)
include $(INCLUDE_DIR)/toolchain-build.mk include $(INCLUDE_DIR)/toolchain-build.mk
BINUTILS_CONFIGURE:= \ BINUTILS_CONFIGURE:= \
@ -96,7 +94,7 @@ define Host/Install
install install
$(call FixupLibdir,$(TOOLCHAIN_DIR)/initial) $(call FixupLibdir,$(TOOLCHAIN_DIR)/initial)
$(RM) $(TOOLCHAIN_DIR)/initial/lib/libiberty.a $(RM) $(TOOLCHAIN_DIR)/initial/lib/libiberty.a
$(CP) $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-readelf $(REAL_STAGING_DIR_HOST)/bin/readelf $(CP) $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-readelf $(HOST_BUILD_PREFIX)/bin/readelf
# ARC gcc requires extlib. # ARC gcc requires extlib.
# If extlib is not available in "initial" folder # If extlib is not available in "initial" folder
# initial gcc will fail to build libc. # initial gcc will fail to build libc.

View file

@ -66,7 +66,7 @@ endif
HOST_STAMP_PREPARED:=$(HOST_BUILD_DIR)/.prepared HOST_STAMP_PREPARED:=$(HOST_BUILD_DIR)/.prepared
HOST_STAMP_BUILT:=$(GCC_BUILD_DIR)/.built HOST_STAMP_BUILT:=$(GCC_BUILD_DIR)/.built
HOST_STAMP_CONFIGURED:=$(GCC_BUILD_DIR)/.configured HOST_STAMP_CONFIGURED:=$(GCC_BUILD_DIR)/.configured
HOST_STAMP_INSTALLED:=$(STAGING_DIR_HOST)/stamp/.gcc_$(GCC_VARIANT)_installed HOST_STAMP_INSTALLED:=$(HOST_BUILD_PREFIX)/stamp/.gcc_$(GCC_VARIANT)_installed
SEP:=, SEP:=,
TARGET_LANGUAGES:="c,c++$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)$(if $(CONFIG_INSTALL_GFORTRAN),$(SEP)fortran)$(if $(CONFIG_INSTALL_GCCGO),$(SEP)go)" TARGET_LANGUAGES:="c,c++$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)$(if $(CONFIG_INSTALL_GFORTRAN),$(SEP)fortran)$(if $(CONFIG_INSTALL_GCCGO),$(SEP)go)"
@ -86,7 +86,7 @@ ifdef CONFIG_INSTALL_GCCGO
endif endif
ifdef CONFIG_GCC_USE_GRAPHITE ifdef CONFIG_GCC_USE_GRAPHITE
GRAPHITE_CONFIGURE=--with-isl=$(REAL_STAGING_DIR_HOST) GRAPHITE_CONFIGURE=--with-isl=$(HOST_BUILD_PREFIX)
else else
GRAPHITE_CONFIGURE=--without-isl --without-cloog GRAPHITE_CONFIGURE=--without-isl --without-cloog
endif endif
@ -213,8 +213,8 @@ endef
define Host/Clean define Host/Clean
rm -rf $(if $(GCC_PREPARE),$(HOST_SOURCE_DIR)) \ rm -rf $(if $(GCC_PREPARE),$(HOST_SOURCE_DIR)) \
$(STAGING_DIR_HOST)/stamp/.gcc_* \ $(HOST_BUILD_PREFIX)/stamp/.gcc_* \
$(STAGING_DIR_HOST)/stamp/.binutils_* \ $(HOST_BUILD_PREFIX)/stamp/.binutils_* \
$(GCC_BUILD_DIR) \ $(GCC_BUILD_DIR) \
$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) \ $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) \
$(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME) \ $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME) \

View file

@ -14,10 +14,7 @@ PKG_HASH:=51216df73adc4f68c67b60356270d5073f0ff094c1b477ecd96560f49707ea2a
PKG_SOURCE_URL:=ftp://sourceware.org/pub/insight/releases PKG_SOURCE_URL:=ftp://sourceware.org/pub/insight/releases
PKG_CAT:=bzcat PKG_CAT:=bzcat
STAGING_DIR_HOST:=$(TOOLCHAIN_DIR) include $(INCLUDE_DIR)/toolchain-build.mk
BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
include $(INCLUDE_DIR)/host-build.mk
define Host/Configure define Host/Configure
(cd $(HOST_BUILD_DIR); \ (cd $(HOST_BUILD_DIR); \