[Buildroot] [PATCH v2 3/3] python-cffi: add host variant
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Wed Feb 3 22:00:10 UTC 2016
Hello,
On Tue, 5 Jan 2016 08:17:24 +0100, yegorslists at googlemail.com wrote:
> From: Yegor Yefremov <yegorslists at googlemail.com>
>
> Host variant is needed to cross-compile CFFI based C library wrappers.
>
> Signed-off-by: Yegor Yefremov <yegorslists at googlemail.com>
> ---
> Changes:
> v2: add host-libffi dependency
>
> package/python-cffi/python-cffi.mk | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/package/python-cffi/python-cffi.mk b/package/python-cffi/python-cffi.mk
> index 70fbe02..02c969b 100644
> --- a/package/python-cffi/python-cffi.mk
> +++ b/package/python-cffi/python-cffi.mk
> @@ -11,5 +11,7 @@ PYTHON_CFFI_SETUP_TYPE = setuptools
> PYTHON_CFFI_DEPENDENCIES = host-pkgconf libffi
> PYTHON_CFFI_LICENSE = MIT
> PYTHON_CFFI_LICENSE_FILES = LICENSE
> +HOST_PYTHON_CFFI_DEPENDENCIES = host-python-pycparser host-libffi
>
> $(eval $(python-package))
> +$(eval $(host-python-package))
This wasn't building properly here, because python-cffi uses pkg-config
to get the flags to link with libffi, and by default our pkg-config
returns results that are valid to build stuff for the target, not for
the host.
So, I've fixed that by passing a bunch of pkg-config environment
variables when building the host package.
Also, you were missing the host-pkgconf dependency for the dependencies
of host variant.
Committed with those issues fixed.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
More information about the buildroot
mailing list