From 9b5fa246a4bf4a91893fd1ee09939267779c9413 Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Sun, 8 May 2022 09:17:06 +0100 Subject: [PATCH] Add freebsd to the local-cross build target Signed-off-by: Doug Rabson --- Makefile | 4 ++-- pkg/mount/mounter_freebsd.go | 3 +++ pkg/mount/mounter_unsupported.go | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2c1e4a1856..244576d546 100644 --- a/Makefile +++ b/Makefile @@ -59,8 +59,8 @@ binary local-binary: containers-storage local-gccgo: ## build using gccgo on the host GCCGO=$(PWD)/hack/gccgo-wrapper.sh $(GO) build $(MOD_VENDOR) -compiler gccgo $(BUILDFLAGS) -o containers-storage.gccgo ./cmd/containers-storage -local-cross: ## cross build the binaries for arm, darwin, and\nfreebsd - @for target in linux/amd64 linux/386 linux/arm linux/arm64 linux/ppc64 linux/ppc64le darwin/amd64 windows/amd64 ; do \ +local-cross: ## cross build the binaries for arm, darwin, and freebsd + @for target in linux/amd64 linux/386 linux/arm linux/arm64 linux/ppc64 linux/ppc64le darwin/amd64 windows/amd64 freebsd/amd64 freebsd/arm64 ; do \ os=`echo $${target} | cut -f1 -d/` ; \ arch=`echo $${target} | cut -f2 -d/` ; \ suffix=$${os}.$${arch} ; \ diff --git a/pkg/mount/mounter_freebsd.go b/pkg/mount/mounter_freebsd.go index 72ceec3dda..2404e331de 100644 --- a/pkg/mount/mounter_freebsd.go +++ b/pkg/mount/mounter_freebsd.go @@ -1,3 +1,6 @@ +//go:build freebsd && cgo +// +build freebsd,cgo + package mount /* diff --git a/pkg/mount/mounter_unsupported.go b/pkg/mount/mounter_unsupported.go index 9d20cfbf86..74fe666090 100644 --- a/pkg/mount/mounter_unsupported.go +++ b/pkg/mount/mounter_unsupported.go @@ -1,4 +1,6 @@ -// +build !linux,!freebsd +//go:build !linux && !(freebsd && cgo) +// +build !linux +// +build !freebsd !cgo package mount