package/pkg-meson.mk: add FOO_MESON_EXTRA_PROPERTIES
PATCH v2 1/2 package/pkg-meson.mk: add FOO_MESON_EXTRA_PROPERTIES
With autoconf packages, we often specify ac_cv_func_... cached values to avoid runtime checks during configure. With meson the equivalent is setting properties in cross-compilation.conf which we cannot do in Buildroot at the moment.
For example, libglib2 used to set ac_cv_func_printf_unix98 and ac_cv_func_vsnprintf_c99 so that the system printf could be used, but with the conversion to meson these checks fail and the gnulib fallback is used.
Add infrastructure in the same way as FOO_MESON_EXTRA_BINARIES to allow per-package modification to the cross-compilation properties.
---
v2:
- Reword documentation on the format of _MESON_EXTRA_PROPERTIES entries
- Add Peter's reviewed-by - thanks!
--- docs/manual/adding-packages-meson.txt | 9 +++++++++ package/pkg-meson.mk | 4 ++++ 2 files changed, 13 insertions(+)
docs/manual/adding-packages-meson.txt +9 -0
@@ -116,6 +116,15 @@ will therefore only use a few of them. single quotes. By default, empty. Note that Buildroot already sets the correct values for +c+, +cpp+, +ar+, +strip+, and +pkgconfig+. +* +FOO_MESON_EXTRA_PROPERTIES+, to specify a space-separated list of + properties to add to the `[properties]` section of the meson + `cross-compilation.conf` configuration file. The format is + `property-name=<value>` with no space around the +=+ sign, and with + single quotes around string values. By default, empty. Note that + Buildroot already sets values for +needs_exe_wrapper+, +c_args+, + +c_link_args+, +cpp_args+, +cpp_link_args+, +sys_root+, and + +pkg_config_libdir+. + * +FOO_NINJA_ENV+, to specify additional environment variables to pass to +ninja+, meson companion tool in charge of the build operations. By default, empty.
package/pkg-meson.mk +4 -0
@@ -80,6 +80,10 @@ define $(2)_CONFIGURE_CMDS $$(foreach x,$$($(2)_MESON_EXTRA_BINARIES), \ s:$$$$:\n$$(x): ; \ ) }" \ + -e "/^\[properties\]$$$$/ { \ + $$(foreach x,$$($(2)_MESON_EXTRA_PROPERTIES), \ + s:$$$$:\n$$(x): ; \ + ) }" \ package/meson/cross-compilation.conf.in \ > $$($$(PKG)_SRCDIR)/build/cross-compilation.conf PATH=$$(BR_PATH) $$($$(PKG)_CONF_ENV) $$(MESON) \
Signature · 1 line
2.25.1
PATCH v2 2/2 package/libglib2: restore use of system printf
Prior to commit 4102db0f7a ("package/libglib2: bump to version 2.60.3") which converted libglib2 to meson, Buildroot used to set a range of autoconf options to bypass tests that require running binaries.
The meson version of libglib2's build system has many fewer of these checks, but there are still some and these can be fed the "correct" answer by adding properties to cross-compilation.conf.
Add the necessary properties to indicate that we have C99 compliant print functions to avoid pulling in the gnulib fallback.
---
v2:
- Add Peter's reviewed-by - thanks!
--- package/libglib2/libglib2.mk | 5 +++++ 1 file changed, 5 insertions(+)
package/libglib2/libglib2.mk +5 -0
@@ -52,6 +52,11 @@ LIBGLIB2_CONF_OPTS = \ -Dinstalled_tests=false \ -Doss_fuzz=disabled +LIBGLIB2_MESON_EXTRA_PROPERTIES = \ + have_c99_vsnprintf=true \ + have_c99_snprintf=true \ + have_unix98_printf=true + ifneq ($(BR2_ENABLE_LOCALE),y) LIBGLIB2_DEPENDENCIES += libiconv endif
Signature · 1 line
2.25.1
Thomas Petazzoni
AppliedPATCH v2 2/2 package/libglib2: restore use of system printf
Quoted 11 lines · On Wed, 11 Mar 2020 11:22:56 +0000 John Keeping <[email protected]> wrote:
Prior to commit
4102db0f7a("package/libglib2: bump to version 2.60.3") which converted libglib2 to meson, Buildroot used to set a range of autoconf options to bypass tests that require running binaries.The meson version of libglib2's build system has many fewer of these checks, but there are still some and these can be fed the "correct" answer by adding properties to cross-compilation.conf.
Add the necessary properties to indicate that we have C99 compliant print functions to avoid pulling in the gnulib fallback.
Quoted 8 lines
Signed-off-by John Keeping <[email protected]>Reviewed-by Peter Seiderer <[email protected]>---
v2:
- Add Peter's reviewed-by - thanks!--- package/libglib2/libglib2.mk | 5 +++++ 1 file changed, 5 insertions(+)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 2/2 package/libglib2: restore use of system printf
Quoted 25 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Quoted 11 lines · On Wed, 11 Mar 2020 11:22:56 +0000 John Keeping <[email protected]> wrote:
Prior to commit
4102db0f7a("package/libglib2: bump to version 2.60.3") which converted libglib2 to meson, Buildroot used to set a range of autoconf options to bypass tests that require running binaries.The meson version of libglib2's build system has many fewer of these checks, but there are still some and these can be fed the "correct" answer by adding properties to cross-compilation.conf.
Add the necessary properties to indicate that we have C99 compliant print functions to avoid pulling in the gnulib fallback.
Quoted 8 lines
Signed-off-by John Keeping <[email protected]>Reviewed-by Peter Seiderer <[email protected]>---
v2:
- Add Peter's reviewed-by - thanks!
---package/libglib2/libglib2.mk| 5 +++++1 file changed, 5 insertions(+)
Quoted 1 line
Applied to master, thanks.
Committed to 2020.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 1/2 package/pkg-meson.mk: add FOO_MESON_EXTRA_PROPERTIES
In reply to John KeepingAll;
Quoted 67 lines · John Keeping
With autoconf packages, we often specify
ac_cv_func_... cached values to avoid runtime checks during configure. With meson the equivalent is setting properties in cross-compilation.conf which we cannot do in Buildroot at the moment.For example, libglib2 used to set
ac_cv_func_printf_unix98andac_cv_func_vsnprintf_c99so that the system printf could be used, but with the conversion to meson these checks fail and the gnulib fallback is used.Add infrastructure in the same way as
FOO_MESON_EXTRA_BINARIESto allow per-package modification to the cross-compilation properties.Signed-off-by John Keeping <[email protected]>Reviewed-by Peter Seiderer <[email protected]>---
v2:
- Reword documentation on the format of_MESON_EXTRA_PROPERTIESentries
- Add Peter's reviewed-by - thanks!--- docs/manual/adding-packages-meson.txt | 9 +++++++++ package/pkg-meson.mk | 4 ++++ 2 files changed, 13 insertions(+)docs/manual/adding-packages-meson.txt +9
-0@@ -116,6 +116,15 @@ will therefore only use a few of them. single quotes. By default, empty. Note that Buildroot already sets the correct values for +c+, +cpp+, +ar+, +strip+, and +pkgconfig+. +* +FOO_MESON_EXTRA_PROPERTIES+, to specify a space-separated list of + properties to add to the `[properties]` section of the meson + `cross-compilation.conf` configuration file. The format is + `property-name=<value>` with no space around the +=+ sign, and with + single quotes around string values. By default, empty. Note that + Buildroot already sets values for +needs_exe_wrapper+, +c_args+, + +c_link_args+, +cpp_args+, +cpp_link_args+, +sys_root+, and + +pkg_config_libdir+. + * +FOO_NINJA_ENV+, to specify additional environment variables to pass to +ninja+, meson companion tool in charge of the build operations. By default, empty.package/pkg-meson.mk +4
-1@@ -80,6 +80,10 @@ define $(2)_CONFIGURE_CMDS $$(foreach x,$$($(2)_MESON_EXTRA_BINARIES), \ s:$$$$:\n$$(x): ; \ ) }" \ + -e "/^\[properties\]$$$$/ { \ + $$(foreach x,$$($(2)_MESON_EXTRA_PROPERTIES), \ + s:$$$$:\n$$(x): ; \ + ) }" \ package/meson/cross-compilation.conf.in \ > $$($$(PKG)_SRCDIR)/build/cross-compilation.conf PATH=$$(BR_PATH) $$($$(PKG)_CONF_ENV) $$(MESON) \ --2.25.1
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Yann E. MORIN
AppliedPATCH v2 1/2 package/pkg-meson.mk: add FOO_MESON_EXTRA_PROPERTIES
In reply to John KeepingJohn, All,
On 2020-03-11 11:22 +0000, John Keeping spake thusly:
Quoted 10 lines
With autoconf packages, we often specify
ac_cv_func_... cached values to avoid runtime checks during configure. With meson the equivalent is setting properties in cross-compilation.conf which we cannot do in Buildroot at the moment.For example, libglib2 used to set
ac_cv_func_printf_unix98andac_cv_func_vsnprintf_c99so that the system printf could be used, but with the conversion to meson these checks fail and the gnulib fallback is used.
Quoted 5 lines
Add infrastructure in the same way as
FOO_MESON_EXTRA_BINARIESto allow per-package modification to the cross-compilation properties.Signed-off-by John Keeping <[email protected]>Reviewed-by Peter Seiderer <[email protected]>
Applied to master, after I changed the code to do a single substitution as in a1e3c7b693. Thanks!
Regards,
Yann E. MORIN.
Quoted 51 lines
---
v2:
- Reword documentation on the format of_MESON_EXTRA_PROPERTIESentries
- Add Peter's reviewed-by - thanks!--- docs/manual/adding-packages-meson.txt | 9 +++++++++ package/pkg-meson.mk | 4 ++++ 2 files changed, 13 insertions(+)docs/manual/adding-packages-meson.txt +9
-0@@ -116,6 +116,15 @@ will therefore only use a few of them. single quotes. By default, empty. Note that Buildroot already sets the correct values for +c+, +cpp+, +ar+, +strip+, and +pkgconfig+. +* +FOO_MESON_EXTRA_PROPERTIES+, to specify a space-separated list of + properties to add to the `[properties]` section of the meson + `cross-compilation.conf` configuration file. The format is + `property-name=<value>` with no space around the +=+ sign, and with + single quotes around string values. By default, empty. Note that + Buildroot already sets values for +needs_exe_wrapper+, +c_args+, + +c_link_args+, +cpp_args+, +cpp_link_args+, +sys_root+, and + +pkg_config_libdir+. + * +FOO_NINJA_ENV+, to specify additional environment variables to pass to +ninja+, meson companion tool in charge of the build operations. By default, empty.package/pkg-meson.mk +4
-0@@ -80,6 +80,10 @@ define $(2)_CONFIGURE_CMDS $$(foreach x,$$($(2)_MESON_EXTRA_BINARIES), \ s:$$$$:\n$$(x): ; \ ) }" \ + -e "/^\[properties\]$$$$/ { \ + $$(foreach x,$$($(2)_MESON_EXTRA_PROPERTIES), \ + s:$$$$:\n$$(x): ; \ + ) }" \ package/meson/cross-compilation.conf.in \ > $$($$(PKG)_SRCDIR)/build/cross-compilation.conf PATH=$$(BR_PATH) $$($$(PKG)_CONF_ENV) $$(MESON) \Signature · 6 lines
2.25.1 _______________________________________________ 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 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'