package/pkg-meson.mk: fix generation of pkg_config_static prop
PATCH 1/3 package/pkg-meson.mk: fix generation of pkg_config_static prop
fixes following in the generated cross-complation.conf file:pkg_config_static = '$(if $(BR2_STATIC_LIBS),true,false)'
--- package/pkg-meson.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkg-meson.mk +1 -1
@@ -195,7 +195,7 @@ define PKG_MESON_INSTALL_CROSS_CONF -e "s%@TARGET_CXXFLAGS@%$(call make-sq-comma-list,$(TARGET_CXXFLAGS))@PKG_TARGET_CFLAGS@%g" \ -e 's%@HOST_DIR@%$(HOST_DIR)%g' \ -e 's%@STAGING_DIR@%$(STAGING_DIR)%g' \ - -e 's%@STATIC@%$$(if $$(BR2_STATIC_LIBS),true,false)%g' \ + -e 's%@STATIC@%$$(if $(BR2_STATIC_LIBS),true,false)%g' \ $(HOST_MESON_PKGDIR)/cross-compilation.conf.in \ > $(HOST_DIR)/etc/meson/cross-compilation.conf.in sed -e 's%@PKG_TARGET_CFLAGS@%%g' \
Signature · 1 line
2.28.0
PATCH 2/3 package/meson: use specific BR variables for cross-compilation.conf
dont depend on specific names of compiler tools, but use existing Buildroot variables.
--- package/meson/cross-compilation.conf.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
package/meson/cross-compilation.conf.in +5 -5
@@ -4,11 +4,11 @@ # - Buildroot's 'target' is Meson's 'host' [binaries] -c = '@TARGET_CROSS at gcc' -cpp = '@TARGET_CROSS at g++' -ar = '@TARGET_CROSS at ar' -strip = '@TARGET_CROSS at strip' -pkgconfig = '@HOST_DIR@/bin/pkgconf' +c = '@TARGET_CC@' +cpp = '@TARGET_CXX@' +ar = '@TARGET_AR@' +strip = '@TARGET_STRIP@' +pkgconfig = '@PKG_CONFIG_HOST_BINARY@' g-ir-compiler = '@STAGING_DIR@/usr/bin/g-ir-compiler' g-ir-scanner = '@STAGING_DIR@/usr/bin/g-ir-scanner'
Signature · 1 line
2.28.0
PATCH 3/3 package/pkg-meson: move crosscompilation support out of package
In reply to Norbert Langeinstall the cross-compilation.conf file when setting up the toolchain, not as part of host-meson.
This allows external usage of the buildroot toolchain through meson, whether the host-meson package is built or not (similar to other build systems).
Removed a few variables, as they were only used to communicate between meson package and pkg-meson and are needed anymore.
---
package/meson/meson.mk | 32 -------
package/pkg-meson.mk | 90 ++++++++++++-------
.../misc}/cross-compilation.conf.in | 0
3 files changed, 60 insertions(+), 62 deletions(-)
rename {package/meson => support/misc}/cross-compilation.conf.in (100%)package/meson/meson.mk +0 -32
@@ -13,38 +13,6 @@ MESON_SETUP_TYPE = setuptools HOST_MESON_DEPENDENCIES = host-ninja HOST_MESON_NEEDS_HOST_PYTHON = python3 -HOST_MESON_TARGET_ENDIAN = $(call qstrip,$(call LOWERCASE,$(BR2_ENDIAN))) -HOST_MESON_TARGET_CPU = $(GCC_TARGET_CPU) - -# https://mesonbuild.com/Reference-tables.html#cpu-families -ifeq ($(BR2_arcle)$(BR2_arceb),y) -HOST_MESON_TARGET_CPU_FAMILY = arc -else ifeq ($(BR2_arm)$(BR2_armeb),y) -HOST_MESON_TARGET_CPU_FAMILY = arm -else ifeq ($(BR2_aarch64)$(BR2_aarch64_be),y) -HOST_MESON_TARGET_CPU_FAMILY = aarch64 -else ifeq ($(BR2_i386),y) -HOST_MESON_TARGET_CPU_FAMILY = x86 -else ifeq ($(BR2_mips)$(BR2_mipsel),y) -HOST_MESON_TARGET_CPU_FAMILY = mips -else ifeq ($(BR2_mips64)$(BR2_mips64el),y) -HOST_MESON_TARGET_CPU_FAMILY = mips64 -else ifeq ($(BR2_powerpc),y) -HOST_MESON_TARGET_CPU_FAMILY = ppc -else ifeq ($(BR2_powerpc64)$(BR2_powerpc64le),y) -HOST_MESON_TARGET_CPU_FAMILY = ppc64 -else ifeq ($(BR2_riscv),y) -HOST_MESON_TARGET_CPU_FAMILY = riscv64 -else ifeq ($(BR2_sparc),y) -HOST_MESON_TARGET_CPU_FAMILY = sparc -else ifeq ($(BR2_sparc64),y) -HOST_MESON_TARGET_CPU_FAMILY = sparc64 -else ifeq ($(BR2_x86_64),y) -HOST_MESON_TARGET_CPU_FAMILY = x86_64 -else -HOST_MESON_TARGET_CPU_FAMILY = $(ARCH) -endif - # Avoid interpreter shebang longer than 128 chars define HOST_MESON_SET_INTERPRETER $(SED) '1s:.*:#!/usr/bin/env python3:' $(HOST_DIR)/bin/meson
package/pkg-meson.mk +60 -30
119 lines not on this page · raw message
support/misc/cross-compilation.conf.in renamed from package/meson/cross-compilation.conf.in +0 -0
Signature · 1 line
2.28.0