File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,13 @@ ifeq ($(GOARCH),x86_64)
36
36
else ifeq ($(GOARCH),aarch64)
37
37
GOARCH ="arm64"
38
38
endif
39
+ ifeq ($(GOARCH ) ,riscv64)
40
+ # https://github.com/golang/go/issues/72840
41
+ CGO_OVERRIDE=CGO_ENABLED=0
42
+ endif
39
43
40
44
bin/coreos-assembler :
41
- cd cmd && go build -mod vendor -o ../$@
45
+ cd cmd && $( CGO_OVERRIDE ) go build -mod vendor -o ../$@
42
46
.PHONY : bin/coreos-assembler
43
47
44
48
.% .shellchecked : %
Original file line number Diff line number Diff line change @@ -27,6 +27,13 @@ ldflags="-X ${REPO_PATH}/version.Version=${version}"
27
27
host_build () {
28
28
local cmd=$1 ; shift
29
29
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} \
30
37
go build \
31
38
-ldflags " ${ldflags} " \
32
39
-mod vendor \
You can’t perform that action at this time.
0 commit comments