package/pkg-meson.mk: fix ccache auto-detection avoidance
authorYann E. MORIN <yann.morin.1998@free.fr>
Tue, 2 Feb 2021 20:32:23 +0000 (21:32 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Tue, 2 Feb 2021 20:42:39 +0000 (21:42 +0100)
Commit f4a61d1ae23e (package/pkg-meson.mk avoid host ccache detection)
forced the host C and C++ compilers so that meson does not try to
autodetect ccache, and instead relies on what we provide.

However, this incorrectly used single-expansion of variables in a
package infra.

For traditional builds, this is OK, because the value does not change
across packages.

However, for builds with per-package directories, this value only refers
to the generic path, which ill not exist until the end of the build when
all packages are aggregated in the host-finalize step.

Fix that by postponing the variable evaluation like all the others.

Reported-by: Xogium on IRC
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/pkg-meson.mk

index de0e6e8ea3f86872179a705986809fb299b13fca..aafb441fae4442b2ff376b1a26a2981166364014 100644 (file)
@@ -82,8 +82,8 @@ define $(2)_CONFIGURE_CMDS
            package/meson/cross-compilation.conf.in \
            > $$($$(PKG)_SRCDIR)/build/cross-compilation.conf
        PATH=$$(BR_PATH) \
-       CC_FOR_BUILD="$(HOSTCC)" \
-       CXX_FOR_BUILD="$(HOSTCC)" \
+       CC_FOR_BUILD="$$(HOSTCC)" \
+       CXX_FOR_BUILD="$$(HOSTCC)" \
        $$($$(PKG)_CONF_ENV) \
        $$(MESON) \
                --prefix=/usr \