0011-build-explicitly-unexport-CONFIG_SITE.patch 1.2 KB

12345678910111213141516171819202122232425262728
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Fri, 16 Jan 2015 03:49:40 +0100
  3. Subject: build: explicitly unexport CONFIG_SITE
  4. On systems with CONFIG_SITE in the environment (e.g. OpenSUSE) make will export
  5. the CONFIG_SITE set in include/package.mk by default. This will cause host
  6. builds to get the target site configuration, leading to all kinds of weirdness
  7. (wrong pointer size, wrong endianess).
  8. Fix this by explicitly unexporting CONFIG_SITE. The explicit export for the
  9. target builds overrides the unexport, so the target builds will still correctly
  10. get the site config.
  11. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
  12. diff --git a/include/package.mk b/include/package.mk
  13. index 88ec3ef..53ca6de 100644
  14. --- a/include/package.mk
  15. +++ b/include/package.mk
  16. @@ -93,7 +93,7 @@ CONFIG_SITE:=$(INCLUDE_DIR)/site/$(REAL_GNU_TARGET_NAME)
  17. CUR_MAKEFILE:=$(filter-out Makefile,$(firstword $(MAKEFILE_LIST)))
  18. SUBMAKE:=$(NO_TRACE_MAKE) $(if $(CUR_MAKEFILE),-f $(CUR_MAKEFILE))
  19. PKG_CONFIG_PATH=$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig
  20. -unexport QUIET
  21. +unexport QUIET CONFIG_SITE
  22. ifeq ($(DUMP)$(filter prereq clean refresh update,$(MAKECMDGOALS)),)
  23. ifneq ($(if $(QUILT),,$(CONFIG_AUTOREBUILD)),)