Skip to content

RFC Introduce cross-bin directory

Arnout Vandecappelle (Essensium/Mind) buildroot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5package/Makefile.in: add HOST_BIN_CROSSpackage/Makefile.in+4 -10 replies
2/5package/python3: install wrapper in HOST_BIN_CROSSpackage/python3/python-wrapper.in package/python3/python3.mk+38 -30 replies
3/5package/python: install wrapper in HOST_BIN_CROSSpackage/python/python-wrapper.in package/python/python.mk+24 -30 replies
4/5package/pkg-python: rely on python wrapper in HOST_BIN_CROSSpackage/pkg-python.mk+3 -190 replies
5/5package/pkg-meson: use TARGET_MAKE_ENV in configurepackage/pkg-meson.mk+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Buildroot] [PATCH 0/5] [RFC] Introduce cross-bin directory

This series is the start of a "cross-bin" directory that I've mentioned a couple of times already.

The idea is that host-tools that are meant for cross-building but don't encode the cross-target in their name can be put in this directory, and we put this directory in front of PATH for cross-compilation. For example, the pkg-config wrapper is really a cross-compilation wrapper. To be able to support building of host tools with it, we need to add environment variables to force host compilation in HOST_CONFIGURE_OPTS. By moving the pkg-config wrapper to the cross-bin directory, we can avoid that: for cross-compilation (i.e. target packages), the cross-bin dir is put in front of PATH, so the pkg-config wrapper for target is found. For native compilation (i.e. host packages), the cross-bin dir is *not* put in PATH, so the normal pkg-config configuration will be used.

This series does not do that yet for pkg-config itself. It is only done for python and python3. The idea is to start with something a little bit less far-reaching that pkg-config. Also, the python3 change is needed for meson packages that build python modules from C code (e.g. recent python-gobject). These need to have _PYTHON_SYSCONFIGDATA_NAME set in the environment, but we can't just export that unconditionally even for target packages because sometimes (e.g. in libglib2) meson builds native python modules as part of the build and those should *not* have _PYTHON_SYSCONFIGDATA_NAME set to the target name... The python3 wrapper nicely solves this.

The python2 wrapper is added as well for symmetry, and because it allows us to simplify the inner-python-package definitions.

This series is posted as an RFC, but it can actually be applied as is. It is a requirement for many packages that use the newly-added gobject-introspection (e.g. gstreamer1, python-gobject).

Arnout Vandecappelle (5):
package/Makefile.in: add HOST_BIN_CROSS package/python3: install wrapper in HOST_BIN_CROSS package/python: install wrapper in HOST_BIN_CROSS package/pkg-python: rely on python wrapper in HOST_BIN_CROSS package/pkg-meson: use TARGET_MAKE_ENV in configure

 package/Makefile.in               |  5 ++++-
 package/pkg-meson.mk              |  2 +-
 package/pkg-python.mk             | 22 +++-------------------
 package/python/python-wrapper.in  | 10 ++++++++++
 package/python/python.mk          | 17 ++++++++++++++---
 package/python3/python-wrapper.in | 24 ++++++++++++++++++++++++
 package/python3/python3.mk        | 17 ++++++++++++++---
 7 files changed, 70 insertions(+), 27 deletions(-)
 create mode 100644 package/python/python-wrapper.in
 create mode 100644 package/python3/python-wrapper.in
Signature · 1 line
2.24.1