2025-10-09 How to change the options in a freebsd port
If you are into using the FreeBSD ports system, at some point you will have stumbled across a port that uses options. This lets you set specific options when the port is built (example use specific CPU architecture features) to enable extra capabilities. Something that comes up once in awhile is how do you check (and set) the options for a port. Read on!
How do I check?
Use make showconfig to show what options a port has. Below is an example from the Go port.
$ pwd
/usr/ports/lang/go125
$ make showconfig
===> The following configuration options are available for go125-1.25.2:
====> Options available for the single GOAMD64: you have to select exactly one of them
V1=off: Use baseline x86-64 instruction set
V2=on: V1 instructions plus CMPXCHG16B, LAHF, SAHF, POPCNT, SSE*
V3=off: V2 instructions plus AVX*, BMI*, F16C, FMA, LZCNT, MOVBE, OSXSAVE
V4=off: V3 instructions plus AVX512*
===> Use 'make config' to modify these settings
How do I set?
If you checked the above example, the make target is config so use make config to (re)set the options.
$ pwd
/usr/ports/lang/go125
$ make config