pkg-cmake: pass <pkg>_CONF_ENV for the target configure step
PATCH 1/1 pkg-cmake: pass <pkg>_CONF_ENV for the target configure step
The Buildroot manual documents that <pkg>_CONF_ENV is passed in the environment when calling cmake during the configure step. However, the actual implementation in pkg-cmake passes HOST_<pkg>_CONF_ENV when configuring the host variant of a cmake package, but does not pass <pkg>_CONF_ENV when configuring the target variant of a cmake package.
This commit fixes that by passing <pkg>_CONF_ENV in the environment as expected. It should not cause any behavior change, because this feature is in fact not used by any package in upstream Buildroot:
$ grep CONF_ENV $(git grep -l cmake-package package/) package/pkg-cmake.mk:$(2)_CONF_ENV ?= package/pkg-cmake.mk: $$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \ package/pkg-cmake.mk: $$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \
This issue was reported by Olivier <[email protected]> as bug #9616.
--- package/pkg-cmake.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkg-cmake.mk +1 -1
@@ -109,7 +109,7 @@ define $(2)_CONFIGURE_CMDS cd $$($$(PKG)_BUILDDIR) && \ rm -f CMakeCache.txt && \ PATH=$$(BR_PATH) \ - $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \ + $$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \ -DCMAKE_INSTALL_SO_NO_EXE=0 \ -DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="BOTH" \
Signature · 1 line
2.7.4
PATCH 1/1 pkg-cmake: pass <pkg>_CONF_ENV for the target configure step
Thomas, All,
On 2017-02-26 18:42 +0100, Thomas Petazzoni spake thusly:
Quoted 27 lines
The Buildroot manual documents that <pkg>_CONF_ENV is passed in the environment when calling cmake during the configure step. However, the actual implementation in pkg-cmake passes HOST_<pkg>_CONF_ENV when configuring the host variant of a cmake package, but does not pass <pkg>_CONF_ENV when configuring the target variant of a cmake package.
This commit fixes that by passing <pkg>_CONF_ENV in the environment as expected. It should not cause any behavior change, because this feature is in fact not used by any package in upstream Buildroot:
$ grep CONF_ENV $(git grep -l cmake-package package/) package/pkg-cmake.mk:$(2)_CONF_ENV ?= package/pkg-cmake.mk: $$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \ package/pkg-cmake.mk: $$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \This issue was reported by Olivier <[email protected]> as bug #9616.
Signed-off-by Thomas Petazzoni <[email protected]>--- package/pkg-cmake.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)package/pkg-cmake.mk +0
-0
package/pkg-cmake.mk define $(2)_CONFIGURE_CMDS · line 112
Quoted 5 lines
package/pkg-cmake.mk +1
-1@@ -109,7 +109,7 @@ define $(2)_CONFIGURE_CMDS cd $$($$(PKG)_BUILDDIR) && \ rm -f CMakeCache.txt && \ PATH=$$(BR_PATH) \ - $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \ + $$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \
I would have written the extra env on its own line, like is done in e.g. pkg-autotools:
[...]
PATH=$$(BR_PATH) \
$$($$(PKG)_CONF_ENV) \
$$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \
[...]Otherwise;
Regards,
Yann E. MORIN.
Quoted 10 lines
package/pkg-cmake.mk +0
-0-DCMAKE_INSTALL_SO_NO_EXE=0 \ -DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="BOTH" \Signature · 6 lines
2.7.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 pkg-cmake: pass <pkg>_CONF_ENV for the target configure step
Hello,
Quoted 5 lines · Yann E. MORIN
Quoted 5 lines
package/pkg-cmake.mk +0
-0@@ -109,7 +109,7 @@ define $(2)_CONFIGURE_CMDS
Quoted 8 lines
package/pkg-cmake.mk define $(2)_CONFIGURE_CMDS · line 112
Quoted 5 lines
package/pkg-cmake.mk +1
-1cd $$($$(PKG)_BUILDDIR) && \ rm -f CMakeCache.txt && \ PATH=$$(BR_PATH) \ - $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \ + $$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \I would have written the extra env on its own line, like is done in e.g. pkg-autotools:
Expect that's not how it's done currently for the host variant of pkg-cmake, i.e it's done like I'm proposing in my patch. So for consistency, I prefer my option (and possibly a follow-up patch making both the host and target variant consistent with pkg-autotools.mk).
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 pkg-cmake: pass <pkg>_CONF_ENV for the target configure step
In reply to Thomas PetazzoniQuoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
The Buildroot manual documents that <pkg>_CONF_ENV is passed in the environment when calling cmake during the configure step. However, the actual implementation in pkg-cmake passes HOST_<pkg>_CONF_ENV when configuring the host variant of a cmake package, but does not pass <pkg>_CONF_ENV when configuring the target variant of a cmake package.
This commit fixes that by passing <pkg>_CONF_ENV in the environment as expected. It should not cause any behavior change, because this feature is in fact not used by any package in upstream Buildroot:
Quoted 8 lines
$ grep CONF_ENV $(git grep -l cmake-package package/) package/pkg-cmake.mk:$(2)_CONF_ENV ?= package/pkg-cmake.mk: $$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \ package/pkg-cmake.mk: $$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \This issue was reported by Olivier <[email protected]> as bug #9616.
Signed-off-by Thomas Petazzoni <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard