Skip to content

Commit

Permalink
Add PKG_CONFIG_PATH to all *-linux-gnu images.
Browse files Browse the repository at this point in the history
This adds support for pkg-config to all `*-linux-gnu` images, since
`pkg-config` is already installed on these images. We export
`PKG_CONFIG_PATH` which allows packages installed from `apt` to be
automatically added to the search path when linking.
  • Loading branch information
Alexhuszagh committed May 29, 2022
1 parent c28909f commit 6d3eb77
Show file tree
Hide file tree
Showing 18 changed files with 35 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

- #727 - add `PKG_CONFIG_PATH` to all `*-linux-gnu` images.
- #725 - support `CROSS_DEBUG` and `CROSS_RUNNER` on android images.
- #722 - boolean environment variables are evaluated as truthy or falsey.
- #721 - add support for running doctests on nightly if `CROSS_UNSTABLE_ENABLE_DOCTESTS=true`.
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile.aarch64-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++ \
BINDGEN_EXTRA_CLANG_ARGS_aarch64_unknown_linux_gnu="--sysroot=/usr/aarch64-linux-gnu" \
QEMU_LD_PREFIX=/usr/aarch64-linux-gnu \
RUST_TEST_THREADS=1
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/aarch64-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}"
3 changes: 2 additions & 1 deletion docker/Dockerfile.arm-unknown-linux-gnueabi
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_LINKER=arm-linux-gnueabi-gcc \
CXX_arm_unknown_linux_gnueabi=arm-linux-gnueabi-g++ \
BINDGEN_EXTRA_CLANG_ARGS_arm_unknown_linux_gnueabi="--sysroot=/usr/arm-linux-gnueabi" \
QEMU_LD_PREFIX=/usr/arm-linux-gnueabi \
RUST_TEST_THREADS=1
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/arm-linux-gnueabi/pkgconfig/:${PKG_CONFIG_PATH}"
3 changes: 2 additions & 1 deletion docker/Dockerfile.arm-unknown-linux-gnueabihf
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
BINDGEN_EXTRA_CLANG_ARGS_arm_unknown_linux_gnueabihf="--sysroot=/usr/arm-linux-gnueabihf/arm-linux-gnueabihf/libc" \
QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf/arm-linux-gnueabihf/libc \
LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/arm-linux-gnueabihf/libc/lib:/usr/arm-linux-gnueabihf/arm-linux-gnueabihf/lib:/usr/arm-linux-gnueabihf/lib \
RUST_TEST_THREADS=1
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/usr/arm-linux-gnueabihf/pkgconfig/:${PKG_CONFIG_PATH}"
3 changes: 2 additions & 1 deletion docker/Dockerfile.armv5te-unknown-linux-gnueabi
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ ENV CARGO_TARGET_ARMV5TE_UNKNOWN_LINUX_GNUEABI_LINKER=arm-linux-gnueabi-gcc \
CXX_armv5te_unknown_linux_gnueabi=arm-linux-gnueabi-g++ \
BINDGEN_EXTRA_CLANG_ARGS_armv5te_unknown_linux_gnueabi="--sysroot=/usr/arm-linux-gnueabi" \
QEMU_LD_PREFIX=/usr/arm-linux-gnueabi \
RUST_TEST_THREADS=1
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/arm-linux-gnueabi/pkgconfig/:${PKG_CONFIG_PATH}"
3 changes: 2 additions & 1 deletion docker/Dockerfile.armv7-unknown-linux-gnueabihf
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
CXX_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-g++ \
BINDGEN_EXTRA_CLANG_ARGS_armv7_unknown_linux_gnueabihf="--sysroot=/usr/arm-linux-gnueabihf" \
QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf \
RUST_TEST_THREADS=1
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/arm-linux-gnueabihf/pkgconfig/:${PKG_CONFIG_PATH}"
2 changes: 2 additions & 0 deletions docker/Dockerfile.i586-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ RUN /xargo.sh

RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
g++-multilib

ENV PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}"
3 changes: 2 additions & 1 deletion docker/Dockerfile.i686-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ RUN /linux-image.sh i686

COPY linux-runner /

ENV CARGO_TARGET_I686_UNKNOWN_LINUX_GNU_RUNNER="/linux-runner i686"
ENV CARGO_TARGET_I686_UNKNOWN_LINUX_GNU_RUNNER="/linux-runner i686" \
PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}"
3 changes: 2 additions & 1 deletion docker/Dockerfile.mips-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ ENV CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-linux-gnu-gcc \
CXX_mips_unknown_linux_gnu=mips-linux-gnu-g++ \
BINDGEN_EXTRA_CLANG_ARGS_mips_unknown_linux_gnu="--sysroot=/usr/mips-linux-gnu" \
QEMU_LD_PREFIX=/usr/mips-linux-gnu \
RUST_TEST_THREADS=1
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/mips-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}"
3 changes: 2 additions & 1 deletion docker/Dockerfile.mips64-unknown-linux-gnuabi64
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ ENV CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_LINKER=mips64-linux-gnuabi64-gcc
CXX_mips64_unknown_linux_gnuabi64=mips64-linux-gnuabi64-g++ \
BINDGEN_EXTRA_CLANG_ARGS_mips64_unknown_linux_gnuabi64="--sysroot=/usr/mips64-linux-gnuabi64" \
QEMU_LD_PREFIX=/usr/mips64-linux-gnuabi64 \
RUST_TEST_THREADS=1
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/mips64-linux-gnuabi64/pkgconfig/:${PKG_CONFIG_PATH}"
3 changes: 2 additions & 1 deletion docker/Dockerfile.mips64el-unknown-linux-gnuabi64
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ ENV CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_GNUABI64_LINKER=mips64el-linux-gnuabi64-
CXX_mips64el_unknown_linux_gnuabi64=mips64el-linux-gnuabi64-g++ \
BINDGEN_EXTRA_CLANG_ARGS_mips64el_unknown_linux_gnuabi64="--sysroot=/usr/mips64el-linux-gnuabi64" \
QEMU_LD_PREFIX=/usr/mips64el-linux-gnuabi64 \
RUST_TEST_THREADS=1
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/mips64el-linux-gnuabi64/pkgconfig/:${PKG_CONFIG_PATH}"
3 changes: 2 additions & 1 deletion docker/Dockerfile.mipsel-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ ENV CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_GNU_LINKER=mipsel-linux-gnu-gcc \
CXX_mipsel_unknown_linux_gnu=mipsel-linux-gnu-g++ \
BINDGEN_EXTRA_CLANG_ARGS_mipsel_unknown_linux_gnu="--sysroot=/usr/mipsel-linux-gnu" \
QEMU_LD_PREFIX=/usr/mipsel-linux-gnu \
RUST_TEST_THREADS=1
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/mipsel-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}"
3 changes: 2 additions & 1 deletion docker/Dockerfile.powerpc-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ ENV CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_LINKER=powerpc-linux-gnu-gcc \
CXX_powerpc_unknown_linux_gnu=powerpc-linux-gnu-g++ \
BINDGEN_EXTRA_CLANG_ARGS_powerpc_unknown_linux_gnu="--sysroot=/usr/powerpc-linux-gnu" \
QEMU_LD_PREFIX=/usr/powerpc-linux-gnu \
RUST_TEST_THREADS=1
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/powerpc-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}"
3 changes: 2 additions & 1 deletion docker/Dockerfile.powerpc64-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ ENV CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_LINKER=powerpc64-linux-gnu-gcc \
CXX_powerpc64_unknown_linux_gnu=powerpc64-linux-gnu-g++ \
BINDGEN_EXTRA_CLANG_ARGS_powerpc64_unknown_linux_gnu="--sysroot=/usr/powerpc64-linux-gnu" \
QEMU_LD_PREFIX=/usr/powerpc64-linux-gnu \
RUST_TEST_THREADS=1
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/powerpc64-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}"
3 changes: 2 additions & 1 deletion docker/Dockerfile.powerpc64le-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ ENV CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_LINKER=powerpc64le-linux-gnu-gcc
CXX_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-g++ \
BINDGEN_EXTRA_CLANG_ARGS_powerpc64le_unknown_linux_gnu="--sysroot=/usr/powerpc64le-linux-gnu" \
QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu \
RUST_TEST_THREADS=1
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/powerpc64le-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}"
3 changes: 2 additions & 1 deletion docker/Dockerfile.riscv64gc-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ ENV CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER=riscv64-linux-gnu-gcc \
CXX_riscv64gc_unknown_linux_gnu=riscv64-linux-gnu-g++ \
BINDGEN_EXTRA_CLANG_ARGS_riscv64gc_unknown_linux_gnu="--sysroot=/usr/riscv64-linux-gnu" \
QEMU_LD_PREFIX=/usr/riscv64-linux-gnu \
RUST_TEST_THREADS=1
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/riscv64-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}"
3 changes: 2 additions & 1 deletion docker/Dockerfile.s390x-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ ENV CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_LINKER=s390x-linux-gnu-gcc \
CXX_s390x_unknown_linux_gnu=s390x-linux-gnu-g++ \
BINDGEN_EXTRA_CLANG_ARGS_s390x_unknown_linux_gnu="--sysroot=/usr/s390x-linux-gnu" \
QEMU_LD_PREFIX=/usr/s390x-linux-gnu \
RUST_TEST_THREADS=1
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/s390x-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}"
3 changes: 2 additions & 1 deletion docker/Dockerfile.sparc64-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ ENV CARGO_TARGET_SPARC64_UNKNOWN_LINUX_GNU_LINKER=sparc64-linux-gnu-gcc \
CXX_sparc64_unknown_linux_gnu=sparc64-linux-gnu-g++ \
BINDGEN_EXTRA_CLANG_ARGS_sparc64_unknown_linux_gnu="--sysroot=/usr/sparc64-linux-gnu" \
QEMU_LD_PREFIX=/usr/sparc64-linux-gnu \
RUST_TEST_THREADS=1
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/sparc64-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}"

0 comments on commit 6d3eb77

Please sign in to comment.