]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: default to GOARM=7 on android
authorElias Naur <elias.naur@gmail.com>
Tue, 6 Mar 2018 15:11:59 +0000 (16:11 +0100)
committerElias Naur <elias.naur@gmail.com>
Tue, 6 Mar 2018 16:08:04 +0000 (16:08 +0000)
Auto-detecting GOARM on Android makes as little sense as for nacl/arm
and darwin/arm.

Also update androidtest.sh to not require GOARM set.

Change-Id: Id409ce1573d3c668d00fa4b7e3562ad7ece6fef5
Reviewed-on: https://go-review.googlesource.com/98875
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/androidtest.bash
src/cmd/dist/util.go

index a790f95920cf8b1eeff3c0d632df984462b900e2..773509f5474f68326c1e3a350f63a92b3498ff30 100755 (executable)
@@ -23,10 +23,7 @@ if [ "$GOOS" != "android" ]; then
        exit 1
 fi
 
-if [ -z $GOARM ]; then
-       export GOARM=7
-fi
-if [ "$GOARM" != "7" ]; then
+if [ -n "$GOARM" ] && [ "$GOARM" != "7" ]; then
        echo "android only supports GOARM=7, got GOARM=$GOARM" 1>&2
        exit 1
 fi
index 7e27bbb064489d676419cadbd4d3232a7dc5ee46..808a60a28e2c1dba7e533f8ff2e7a212cdec754f 100644 (file)
@@ -387,9 +387,9 @@ func xgetgoarm() string {
                // NaCl guarantees VFPv3 and is always cross-compiled.
                return "7"
        }
-       if goos == "darwin" {
-               // Assume all darwin/arm devices are have VFPv3. This
-               // port is also mostly cross-compiled, so it makes little
+       if goos == "darwin" || goos == "android" {
+               // Assume all darwin/arm and android devices have VFPv3.
+               // These ports are also mostly cross-compiled, so it makes little
                // sense to auto-detect the setting.
                return "7"
        }