Skip to content

Commit

Permalink
hack: use PKG_CONFIG from "go env"
Browse files Browse the repository at this point in the history
Current implementation overwrites PKG_CONFIG if not defined
and set it to pkg-config. When a build is invoked using xx in
our Dockerfile, it will set PKG_CONFIG to the right value in
go environments depending on the target architecture: https://github.com/tonistiigi/xx/blob/8015613cccc2d3b689bf8189ec3604c4e4c94c34/base/xx-go#L75-L78

Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Jan 12, 2023
1 parent 4c02882 commit c4fc6c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ ARG TARGETPLATFORM
RUN --mount=type=cache,sharing=locked,id=moby-build-aptlib,target=/var/lib/apt \
--mount=type=cache,sharing=locked,id=moby-build-aptcache,target=/var/cache/apt \
xx-apt-get install --no-install-recommends -y \
dpkg-dev \
gcc \
libapparmor-dev \
libc6-dev \
Expand Down
2 changes: 1 addition & 1 deletion hack/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ set -o pipefail
export DOCKER_PKG='github.com/docker/docker'
export SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export MAKEDIR="$SCRIPTDIR/make"
export PKG_CONFIG=${PKG_CONFIG:-pkg-config}
export PKG_CONFIG=${PKG_CONFIG:-$(go env PKG_CONFIG)}

echo

Expand Down

0 comments on commit c4fc6c3

Please sign in to comment.