File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,9 +36,13 @@ ifeq ($(GOARCH),x86_64)
3636else ifeq ($(GOARCH),aarch64)
3737 GOARCH ="arm64"
3838endif
39+ ifeq ($(GOARCH ) ,riscv64)
40+ # https://github.com/golang/go/issues/72840
41+ CGO_OVERRIDE=CGO_ENABLED=0
42+ endif
3943
4044bin/coreos-assembler :
41- cd cmd && go build -mod vendor -o ../$@
45+ cd cmd && $( CGO_OVERRIDE ) go build -mod vendor -o ../$@
4246.PHONY : bin/coreos-assembler
4347
4448.% .shellchecked : %
Original file line number Diff line number Diff line change @@ -27,6 +27,13 @@ ldflags="-X ${REPO_PATH}/version.Version=${version}"
2727host_build () {
2828 local cmd=$1 ; shift
2929 echo " Building $cmd "
30+
31+ # Disable CGO if on "riscv64"
32+ # https://github.com/golang/go/issues/72840
33+ local cgo_override=" ${CGO_ENABLED:- } "
34+ [ " ${ARCH} " == " riscv64" ] && cgo_override=0
35+
36+ CGO_ENABLED=${cgo_override} \
3037 go build \
3138 -ldflags " ${ldflags} " \
3239 -mod vendor \
You can’t perform that action at this time.
0 commit comments