Hi, I'd like to start a discussion about implementing support for Go language projects in ptxdist. https://golang.org
The nice thing about the recent Go versions is that cross compilation is possible without recompiling Go for the target architecture. You can use the Go version from your host and cross compile to the supported target architectures and operating system. Go binaries are statically compiled, so we would only need Go on the host system. To cross-compile an ARMv7 binary, you just call: env GOOS=linux GOARCH=arm GOARM=7 go build helloworld.go Tested with Go 1.7.1 on ArchLinux and cross-compiled binary is running successfully on an i.MX6Q. If you are wondering about my use case: I am implementing a Webapp backend with Revel (github.com/revel/revel) for the admin interface to our embedded product and Go is a fine language for writing server software. -- What are your thoughts about this? -- Maybe: Having a new FOO_CONF_TOOL value "go" similar to "python3" and adding additional case statements to scripts/lib/ptxd_make_world_*.sh and building the Go files there, either via go build or using go install. We probably need a static mapping from supported toolchain ABIs to GOARCH (and GOARM) values: aarch64-v8a-linux-gnu -> GOARCH=arm64 arm-1136jfs-linux-gnueabi -> GOARCH=arm GOARM=5 arm-1136jfs-linux-gnueabihf -> GOARCH=arm GOARM=6 arm-cortexa8-linux-gnueabi -> GOARCH=arm GOARM=5 arm-cortexa8-linux-gnueabihf-> GOARCH=arm GOARM=7 arm-v5te-linux-gnueabi -> GOARCH=arm GOARM=5 arm-v7a-linux-gnueabi -> GOARCH=arm GOARM=5 arm-v7a-linux-gnueabihf -> GOARCH=arm GOARM=7 i586-unknown-linux-gnu -> GOARCH=386 i686-atom-linux-gnu -> GOARCH=386 x86_64-unknown-linux-gnu -> GOARCH=amd64 Go supports >=ARMv6 builds with hardfloat only, so I'd fall back to building ARMv5 binaries for ARMv6/7 softfloat configurations. The mininum size of the generated binaries is still rather large, but this will improve in Go 1.8: https://blog.golang.org/go1.7-binary-size (At the moment, my hello world example is 927KB if stripped, as it includes the statically linked runtime) I probably would not use it for small little tools running only for short time periods, but for long-running server software, it's fine. Regards, Clemens _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de