As many know, Go is a designed to build architecture and operating system specific binaries. These architecture and operating system specific binaries are called a target
. One can target GOARCH=ppc64le GOOS=linux go build
to build for the specific OS. There is a nice little tweak which considers the architectures version and optimizes the selection of the ASM (assembler code) uses when building the code.
To use the Power Architecture ppc64le
for a specific target, you can use GOPPC64
:
power10
– runs with Power 10 only.power9
– runs with Power 9 and Power 10.power8
(the default) and runs with 8,9,10.
For example the command is GOARCH=ppc64le GOOS=linux GOPPC64=power9 go build
This may help with some various results.