# Cross-compilation configuration for the `cross` tool.
#
# The `keyring` default feature pulls in `libdbus-sys`, which links against
# the target's `libdbus-1`. For each cross target we enable Debian multiarch
# inside the cross image and install the target-arch dev package before the
# build starts. `PKG_CONFIG_ALLOW_CROSS=1` is passed through so `pkg-config`
# honours the cross-compiled `.pc` files under `/usr/lib/<triple>/pkgconfig`.

[target.aarch64-unknown-linux-gnu]
pre-build = [
    "dpkg --add-architecture $CROSS_DEB_ARCH",
    "apt-get update && apt-get install --assume-yes libdbus-1-dev:$CROSS_DEB_ARCH pkg-config",
]

[target.aarch64-unknown-linux-gnu.env]
passthrough = ["PKG_CONFIG_ALLOW_CROSS"]

[target.s390x-unknown-linux-gnu]
pre-build = [
    "dpkg --add-architecture $CROSS_DEB_ARCH",
    "apt-get update && apt-get install --assume-yes libdbus-1-dev:$CROSS_DEB_ARCH pkg-config",
]

[target.s390x-unknown-linux-gnu.env]
passthrough = ["PKG_CONFIG_ALLOW_CROSS"]

[target.powerpc64le-unknown-linux-gnu]
pre-build = [
    "dpkg --add-architecture $CROSS_DEB_ARCH",
    "apt-get update && apt-get install --assume-yes libdbus-1-dev:$CROSS_DEB_ARCH pkg-config",
]

[target.powerpc64le-unknown-linux-gnu.env]
passthrough = ["PKG_CONFIG_ALLOW_CROSS"]
