From a4373a7c1b4b0653c8def8939b36df3874b7b2fb Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 1 Oct 2021 15:35:19 +0200 Subject: [PATCH] coreos-base/update_engine: Override path to glib-genmarshal Normally we use pkg-config to query flags and libraries that are needed to build things. These are specific to CHOST, and the build system usually uses pkg-config on CHOST to get those flags and libraries. But pkg-config is also used to query for the location of the tools used during the build, and for those we need to use pkg-config on CBUILD. But the build system is usually using the same pkg-config for both flags and libs, and for build tools. Which works fine for typical builds, but breaks for cross builds. One of such build tools is glib-genmarshal. Fortunately the build system allows us to override the detection results by passing GLIB_GENMARSHAL="${some_path}" to the configure script. So do that. --- .../coreos-base/update_engine/update_engine-9999.ebuild | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/update_engine/update_engine-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/update_engine/update_engine-9999.ebuild index d3b980b708..04d26683b6 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/update_engine/update_engine-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/update_engine/update_engine-9999.ebuild @@ -68,6 +68,12 @@ src_configure() { $(use_enable delta_generator) ) + if tc-is-cross-compiler; then + # Override glib-genmarshal path + local build_pkg_config="$(tc-getBUILD_PROG PKG_CONFIG pkg-config)" + myconf+=(GLIB_GENMARSHAL="$("${build_pkg_config}" --variable=glib_genmarshal glib-2.0)") + fi + econf "${myconf[@]}" }