diff options
author | Jo-Philipp Wich <jo@mein.io> | 2017-01-05 15:51:05 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2017-01-10 12:28:32 +0100 |
commit | 83b6bfc2357458f219872f97ed9c4894106131a1 (patch) | |
tree | c1a97fa91a76f33f2913f4645409954e36e96d7b /include | |
parent | fe876e9ac6ae71d1150583b4406a8f50401635da (diff) | |
download | upstream-83b6bfc2357458f219872f97ed9c4894106131a1.tar.gz upstream-83b6bfc2357458f219872f97ed9c4894106131a1.tar.bz2 upstream-83b6bfc2357458f219872f97ed9c4894106131a1.zip |
build: fix HOST_CONFIGURE_VARS placement
Instead of passing HOST_CONFIGURE_VARS as arguments to the configure script,
pass it as environment variables which brings the logic in line with the
behaviour of package-defaults.mk.
The change is needed since passing environment variables as configure
parameters only works with GNU autoconf which evaluates command line arguments
looking like variable assignments. Doing the same with non-autoconf configure
scripts is not guaranteed to work since such scripts might terminate due to
unknown argument errors.
One example case is the cmake configure script which bails out when called
as "./configure LDFLAGS=..." but not when called as "LDFLAGS=... ./configure".
Also change the SHELL override to CONFIG_SHELL in the default
HOST_CONFIGURE_VARS as the former is not properly propagated through the
various GNU configure invocations since it gets lost when configure re-
executes itself.
A prior attempt to change the variable placement had to be reverted due to
the missing SHELL -> CONFIG_SHELL change, leading to misgenerated libtool
executables in various packages.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'include')
-rw-r--r-- | include/host-build.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/host-build.mk b/include/host-build.mk index 4b4ffe4c9d..5cfbdeba51 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -53,7 +53,7 @@ HOST_CONFIGURE_VARS = \ CFLAGS="$(HOST_CFLAGS)" \ CPPFLAGS="$(HOST_CPPFLAGS)" \ LDFLAGS="$(HOST_LDFLAGS)" \ - SHELL="$(SHELL)" + CONFIG_SHELL="$(SHELL)" HOST_CONFIGURE_ARGS = \ --target=$(GNU_HOST_NAME) \ @@ -75,9 +75,9 @@ define Host/Configure/Default $(if $(HOST_CONFIGURE_PARALLEL),+)(cd $(HOST_BUILD_DIR)/$(3); \ if [ -x configure ]; then \ $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/$(3)/ && \ + $(HOST_CONFIGURE_VARS) \ $(2) \ $(HOST_CONFIGURE_CMD) \ - $(HOST_CONFIGURE_VARS) \ $(HOST_CONFIGURE_ARGS) \ $(1); \ fi \ |