File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -19,17 +19,23 @@ BUILD_PLATFORMS=(
1919 # linux/ppc64le
2020)
2121
22+ declare -A archToCC
23+ archToCC[" amd64" ]=" "
24+ archToCC[" arm64" ]=" aarch64-linux-gnu-gcc"
25+ archToCC[" ppc64le" ]=" powerpc64le-linux-gnu-gcc"
26+
27+ docker build -t runcdev .
28+
2229for platform in ${BUILD_PLATFORMS[*]} ; do
2330 os=" ${platform%/* } "
2431 arch=" ${platform#*/ } "
2532 echo " Building ${platform} "
2633 rm -rf ~ /.cache/go-build bin || :
2734 rm -rf " _output/${os} /${arch} /runc" || :
2835 mkdir -p " _output/${os} /${arch} /runc"
29- docker run --rm -v $( pwd) :/go/src/github.com/opencontainers/runc -w /go/src/github.com/opencontainers/runc golang:1.17 \
36+ docker run --rm -v $( pwd) :/go/src/github.com/opencontainers/runc -w /go/src/github.com/opencontainers/runc runcdev \
3037 /bin/bash -c "
31- apt-get update && apt-get install libseccomp-dev
32- GO111MODULE=auto GOOS=${os} GOARCH=${arch} CGO_ENABLED=1 make BUILDTAGS='${BUILDTAGS} ' runc && \
38+ GO111MODULE=auto GOOS=${os} GOARCH=${arch} CC=${archToCC[$arch]} CGO_ENABLED=1 make BUILDTAGS='${BUILDTAGS} ' runc && \
3339 mv runc _output/${os} /${arch} /runc/ || :
3440" || echo " fail ${platform} "
3541
You can’t perform that action at this time.
0 commit comments