mxe/plugins/go
Boris Nagaev 0c4807ff0e go: update from 1.7.4 to 1.8
Release notes of new release: https://golang.org/doc/go1.8
The patch adding support of PKG_CONFIG is not needed anymore:
it was merged to upstream: https://github.com/golang/go/commit/5dcb31b2d55
2017-02-18 02:35:14 +01:00
..
src/mxe-test add Go plugin 2016-07-05 12:25:23 +03:00
README.md README of go plugin: use make var. instead of env 2016-07-07 01:47:19 +03:00
go-native-1-fixes.patch fix build of go-native on Debian 8 Stretch 2016-11-17 04:00:49 +03:00
go-native.mk Copyright headers: point to LICENSE.md and shorten 2016-08-27 12:31:29 +03:00
go.mk go: update from 1.7.4 to 1.8 2017-02-18 02:35:14 +01:00

README.md

Go plugin for MXE

See also article cross-compile go code, including cgo by Dimitri John Ledkov.

Package go-native installs native Go 1.4. This version of Go doesn't depend on Go installation.

Package go uses native Go 1.4 as a bootstrap and installs Go 1.6 as a cross-compiler to windows/386 or windows/amd64. Versions of Go starting with 1.5 need Go installation to build.

To build Go packages for windows/386 or windows/amd64, you have to set the GOPATH environment variable and call usr/bin/$(TARGET)-go wrapper script.

Example

Building gohs, GoLang Binding of HyperScan.

$ make hyperscan go MXE_PLUGIN_DIRS=plugins/go
$ mkdir gopath
$ GOPATH=`pwd`/gopath ./usr/bin/i686-w64-mingw32.static-go get \
    github.com/flier/gohs/examples/simplegrep
$ ./gopath/bin/windows_386/simplegrep.exe root /etc/passwd
Scanning 42 bytes with Hyperscan
root:x:0:0:root:/root:/bin/bash
root:x:0:0:root:/root:/bin/bash
root:x:0:0:root:/root:/bin/bash