File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -218,14 +218,13 @@ This library can be cross-compiled.
218
218
In some cases you are required to the ` CC ` environment variable with the cross compiler.
219
219
220
220
## Cross Compiling from MAC OSX
221
- The simplest way to cross compile from OSX is to use [ xgo ] ( https://github.com/karalabe/xgo ) .
221
+ The simplest way to cross compile from OSX is to use [ musl-cross ] ( https://github.com/FiloSottile/homebrew-musl-cross ) .
222
222
223
223
Steps:
224
- - Install [ xgo] ( https://github.com/karalabe/xgo ) (` go get github.com/karalabe/xgo ` ).
225
- - Ensure that your project is within your ` GOPATH ` .
226
- - Run ` xgo local/path/to/project ` .
224
+ - Install [ musl-cross] ( https://github.com/FiloSottile/homebrew-musl-cross ) (` brew install FiloSottile/musl-cross/musl-cross ` ).
225
+ - Run ` CC=x86_64-linux-musl-gcc CXX=x86_64-linux-musl-g++ GOARCH=amd64 GOOS=linux CGO_ENABLED=1 go build -ldflags "-linkmode external -extldflags -static" ` .
227
226
228
- Please refer to the project's [ README] ( https://github.com/karalabe/xgo/blob/master/README.md ) for further information.
227
+ Please refer to the project's [ README] ( https://github.com/FiloSottile/homebrew-musl-cross#readme ) for further information.
229
228
230
229
# Google Cloud Platform
231
230
You can’t perform that action at this time.
0 commit comments