Skip to content

Add FreeBSD build to Makefile#240

Merged
markdascher merged 1 commit intomasterfrom
freebsd
Nov 19, 2021
Merged

Add FreeBSD build to Makefile#240
markdascher merged 1 commit intomasterfrom
freebsd

Conversation

@markdascher
Copy link
Contributor

VividCortex/godaemon#28 eliminates all CGO dependencies, which means we can now cross-compile for FreeBSD. Added both x86 and x64 builds to the Makefile, and tested to make sure they run.

This means we can probably close #207. I still think that branch does some things better than godaemon, but it no longer makes enough of a difference to warrant the risks.

Here's how I updated the godaemon package:

go get github.com/VividCortex/godaemon@latest
go mod tidy
go mod vendor

@markdascher markdascher self-assigned this Nov 19, 2021
include packaging/Makefile.packaging

.PHONY: depend clean test build tarball
.DEFAULT: build
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This never did anything. Whoever wrote it probably meant to set build as the default target, but that isn't what .DEFAULT does. In fact, the prerequisites of .DEFAULT are ignored except when literally running make .DEFAULT from a command-line.

There's a special .DEFAULT_GOAL variable that would set the default target, but it's more common to just list the default target first.

.PHONY: depend clean test build tarball
.DEFAULT: build

GOFLAGS="-trimpath"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding -trimpath to scrub local file paths from public release builds.

@markdascher markdascher merged commit b2d615b into master Nov 19, 2021
@markdascher markdascher deleted the freebsd branch November 19, 2021 19:38
@johlym
Copy link
Contributor

johlym commented Nov 19, 2021

Whoa. Thanks for finally tackling this!

This was referenced Nov 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants