Skip to content

Commit

Permalink
Fix freebsd build
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdurham committed Jul 2, 2021
1 parent 7426669 commit 8f1fc64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ platform:
arch: amd64

steps:
- name: test-ubuntu
- name: distribute
image: rfratto/seego
commands:
- apt-get update && apt-get install -y rubygems rpm nsis
Expand All @@ -30,7 +30,7 @@ steps:
- tar -C /usr/local -xzf go1.16.5.linux-amd64.tar.gz
- rm go1.16.5.linux-amd64.tar.gz
- export PATH=$PATH:/usr/local/go/bin
- make BUILD_IN_CONTAINER=false RELEASE_TAG=v0.0.0 dist/agent-freebsd-amd64
- make BUILD_IN_CONTAINER=false RELEASE_TAG=v0.0.0 dist
---
kind: pipeline
type: docker
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ dist/agent-windows-installer.exe: dist/agent-windows-amd64.exe
cp dist/agent-windows-amd64.exe ./packaging/windows
cp LICENSE ./packaging/windows
makensis -V4 -DVERSION=${RELEASE_TAG} -DOUT="../../dist/grafana-agent-installer.exe" ./packaging/windows/install_script.nsis
dist/agent-freebsd-amd64:
export CGO_ENABLED=1 GOOS=freebsd GOARCH=amd64 CC=clang CCX=clang++ CGO_CFLAGS='-target x86_64-pc-freebsd11 --sysroot=/usr/freebsd/x86_64-pc-freebsd11' ; go build $(CGO_FLAGS) -o $@ ./cmd/agent
dist/agent-freebsd-amd64:
export CGO_ENABLED=1 GOOS=freebsd GOARCH=amd64 CC=clang CCX=clang++ CGO_CFLAGS="-target x86_64-pc-freebsd11 --sysroot=/usr/freebsd/x86_64-pc-freebsd11" CGO_CXX_CFLAGS="-target x86_64-pc-freebsd11 --sysroot=/usr/freebsd/x86_64-pc-freebsd11" CGO_LDFLAGS="-target x86_64-pc-freebsd11 --sysroot=/usr/freebsd/x86_64-pc-freebsd11" ; go build $(CGO_FLAGS) -o $@ ./cmd/agent

dist-agentctl: dist/agentctl-linux-amd64 dist/agentctl-linux-arm64 dist/agentctl-linux-armv6 dist/agentctl-linux-armv7 dist/agentctl-darwin-amd64 dist/agentctl-darwin-arm64 dist/agentctl-windows-amd64.exe dist/agentctl-freebsd-amd64
dist/agentctl-linux-amd64:
Expand All @@ -229,7 +229,7 @@ dist/agentctl-darwin-arm64:
dist/agentctl-windows-amd64.exe:
export CGO_ENABLED=1 GOOS=windows GOARCH=amd64 GOARCH=amd64 CC=x86_64-w64-mingw32-gcc CCX=x86_64-w64-mingw32-g++; go build $(CGO_FLAGS) -o $@ ./cmd/agentctl
dist/agentctl-freebsd-amd64:
export CGO_ENABLED=1 GOOS=freebsd GOARCH=amd64 CC=clang CCX=clang++ CGO_CFLAGS="-target x86_64-pc-freebsd11 --sysroot=/usr/freebsd/x86_64-pc-freebsd11"; go build $(CGO_FLAGS) -o $@ ./cmd/agentctl
export CGO_ENABLED=1 GOOS=freebsd GOARCH=amd64 CC=clang CCX=clang++ CGO_CFLAGS="-target x86_64-pc-freebsd11 --sysroot=/usr/freebsd/x86_64-pc-freebsd11" CGO_CXX_CFLAGS="-target x86_64-pc-freebsd11 --sysroot=/usr/freebsd/x86_64-pc-freebsd11" CGO_LDFLAGS="-target x86_64-pc-freebsd11 --sysroot=/usr/freebsd/x86_64-pc-freebsd11" ; go build $(CGO_FLAGS) -o $@ ./cmd/agentctl


build-image/.uptodate: build-image/Dockerfile
Expand Down

0 comments on commit 8f1fc64

Please sign in to comment.