| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| (Empty) | |
| 1 A simple android cgo program. | |
| 2 | |
| 3 First, bootstrap linux/arm with: | |
| 4 | |
| 5 CC_FOR_TARGET=path/to/ndk/gcc GOARCH=arm GOARM=7 ./make.bash | |
| 6 | |
| 7 Then, build the android specific linux/arm toolset with: | |
| 8 | |
| 9 GOOS=linux GOARCH=arm GOARM=7 CGO_ENABLED=1 /path/to/goroot/bin/go install -tags android -ldflags="-H android" -a -v std | |
| 10 | |
| 11 Finally, the android program can be built with | |
| 12 | |
| 13 CGO_ENABLED=1 GOARCH=arm GOARM=7 /path/to/goroot/bin/go build -tags android -ldf lags="-H android" test.go | |
| OLD | NEW |