From: James Hilliard <james.hilliard1@gmail.com>
To: buildroot@buildroot.org
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>,
Xukai Wang <kingxukai@zohomail.com>,
Julien Olivain <ju.o@free.fr>,
Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>,
Guillaume William Brs <guillaume.bressaix@gmail.com>,
James Hilliard <james.hilliard1@gmail.com>,
Woodrow Douglass <wdouglass@carnegierobotics.com>,
Jagan Teki <jagan@amarulasolutions.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Romain Naour <romain.naour@gmail.com>,
Fabrice Fontaine <fontaine.fabrice@gmail.com>
Subject: [Buildroot] [PATCH 1/5] package/pkg-meson: share Meson setup options
Date: Mon, 5 Oct 2026 16:38:07 -0600 [thread overview]
Message-ID: <20261005223811.2094796-1-james.hilliard1@gmail.com> (raw)
Move the host and target setup options into reusable variables so the
Python infrastructure can use the same defaults for meson-python.
Use -Dbuildtype instead of --buildtype to match the spelling used by
meson-python. Meson rejects both spellings in the same invocation.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
package/pkg-meson.mk | 43 +++++++++++++++++++++++++------------------
1 file changed, 25 insertions(+), 18 deletions(-)
diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
index f2efbae2eb..5f7eed9edf 100644
--- a/package/pkg-meson.mk
+++ b/package/pkg-meson.mk
@@ -90,6 +90,29 @@ else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
PKG_MESON_DEFAULT_LIBRARY=both
endif
+# Meson setup options shared with the meson-python backend.
+PKG_MESON_TARGET_OPTS = \
+ --prefix=/usr \
+ --libdir=lib \
+ --default-library=$(PKG_MESON_DEFAULT_LIBRARY) \
+ -Dbuildtype=$(if $(BR2_ENABLE_RUNTIME_DEBUG),debug,release) \
+ --cross-file=$($(PKG)_SRCDIR)/buildroot-build/cross-compilation.conf \
+ -Db_pie=false \
+ -Db_staticpic=$(if $(BR2_m68k_cf),false,true) \
+ -Dstrip=false \
+ -Dbuild.pkg_config_path=$(HOST_DIR)/lib/pkgconfig \
+ -Dbuild.cmake_prefix_path=$(HOST_DIR)/lib/cmake
+
+PKG_MESON_HOST_OPTS = \
+ --prefix=$(HOST_DIR) \
+ --libdir=lib \
+ --sysconfdir=$(HOST_DIR)/etc \
+ --localstatedir=$(HOST_DIR)/var \
+ --default-library=shared \
+ -Dbuildtype=release \
+ --wrap-mode=nodownload \
+ -Dstrip=true
+
# Generates sed patterns for patching the cross-compilation.conf template,
# since Flags might contain commas the arguments are passed indirectly by
# variable name (stripped to deal with whitespaces).
@@ -158,16 +181,7 @@ define $(2)_CONFIGURE_CMDS
CXX_FOR_BUILD="$$(HOSTCXX)" \
$$($$(PKG)_CONF_ENV) \
$$(MESON) setup \
- --prefix=/usr \
- --libdir=lib \
- --default-library=$(PKG_MESON_DEFAULT_LIBRARY) \
- --buildtype=$(if $(BR2_ENABLE_RUNTIME_DEBUG),debug,release) \
- --cross-file=$$($$(PKG)_SRCDIR)/buildroot-build/cross-compilation.conf \
- -Db_pie=false \
- -Db_staticpic=$(if $(BR2_m68k_cf),false,true) \
- -Dstrip=false \
- -Dbuild.pkg_config_path=$$(HOST_DIR)/lib/pkgconfig \
- -Dbuild.cmake_prefix_path=$$(HOST_DIR)/lib/cmake \
+ $$(PKG_MESON_TARGET_OPTS) \
$$($$(PKG)_CONF_OPTS) \
$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/buildroot-build
endef
@@ -179,14 +193,7 @@ define $(2)_CONFIGURE_CMDS
mkdir -p $$($$(PKG)_SRCDIR)/buildroot-build
$$(HOST_CONFIGURE_OPTS) \
$$($$(PKG)_CONF_ENV) $$(MESON) setup \
- --prefix=$$(HOST_DIR) \
- --libdir=lib \
- --sysconfdir=$$(HOST_DIR)/etc \
- --localstatedir=$$(HOST_DIR)/var \
- --default-library=shared \
- --buildtype=release \
- --wrap-mode=nodownload \
- -Dstrip=true \
+ $$(PKG_MESON_HOST_OPTS) \
$$($$(PKG)_CONF_OPTS) \
$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/buildroot-build
endef
--
2.53.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2026-10-05 22:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 22:38 James Hilliard [this message]
2026-10-05 22:38 ` [Buildroot] [PATCH 2/5] package/pkg-meson: share cross-file generation James Hilliard
2026-10-05 22:38 ` [Buildroot] [PATCH 3/5] package/pkg-python: add meson setup type James Hilliard
2026-10-05 22:38 ` [Buildroot] [PATCH 4/5] package/python-numpy: bump to version 2.5.3 James Hilliard
2026-10-05 22:38 ` [Buildroot] [PATCH 5/5] package/python-scipy: bump to version 1.18.1 James Hilliard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261005223811.2094796-1-james.hilliard1@gmail.com \
--to=james.hilliard1@gmail.com \
--cc=buildroot@buildroot.org \
--cc=eric.le.bihan.dev@free.fr \
--cc=fontaine.fabrice@gmail.com \
--cc=guillaume.bressaix@gmail.com \
--cc=gwenhael.goavec-merou@trabucayre.com \
--cc=jagan@amarulasolutions.com \
--cc=ju.o@free.fr \
--cc=kingxukai@zohomail.com \
--cc=romain.naour@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=wdouglass@carnegierobotics.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.