Skip to content

Commit f0b4258

Browse files
authored
Merge pull request #5429 from cpuguy83/fix_libseccomp_cc
Specify seccomp target arch for CC
2 parents 4dc758d + 969ec89 commit f0b4258

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ jobs:
8989
[[ "${MARCH}" == "arm64" ]] && {
9090
echo "CGO_ENABLED=1" >> $GITHUB_ENV
9191
echo "CC=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
92+
echo "SECCOMP_ARCH=aarch64" >> $GITHUB_ENV
9293
}
9394
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
9495
@@ -173,7 +174,7 @@ jobs:
173174
RUNC_FLAVOR: runc
174175
run: |
175176
if [[ "${GOOS}" == "linux" ]]; then
176-
sudo -E PATH=$PATH script/setup/install-seccomp
177+
sudo -E PATH=$PATH -E SECCOMP_ARCH="${SECCOMP_ARCH}" script/setup/install-seccomp
177178
fi
178179
make cri-cni-release
179180
working-directory: src/github.com/containerd/containerd

script/setup/install-seccomp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ export SECCOMP_PATH=$(mktemp -d)
2727
curl -fsSL "https://github.com/seccomp/libseccomp/releases/download/v${SECCOMP_VERSION}/libseccomp-${SECCOMP_VERSION}.tar.gz" | tar -xzC "$SECCOMP_PATH" --strip-components=1
2828
(
2929
cd "$SECCOMP_PATH"
30-
./configure --prefix=/usr/local
30+
host=""
31+
if [ -v SECCOMP_ARCH ]; then
32+
host="--host=${SECCOMP_ARCH}"
33+
fi
34+
./configure --prefix=/usr/local ${host}
3135
make
3236
make install
3337
ldconfig

0 commit comments

Comments
 (0)