]> Cypherpunks repositories - gostls13.git/commitdiff
build: skip cgo -pie tests on freebsd-amd64.
authorRahul Chaudhry <rahulchaudhry@chromium.org>
Mon, 2 Mar 2015 20:58:02 +0000 (12:58 -0800)
committerMinux Ma <minux@golang.org>
Mon, 2 Mar 2015 22:00:16 +0000 (22:00 +0000)
This is a followup to http://golang.org/cl/6280.
clang -pie fails to link misc/cgo/test on freebsd-amd64.

Change-Id: I6f9575d6bb579f4d38d70707fb9c92e303e30e6f
Reviewed-on: https://go-review.googlesource.com/6520
Run-TryBot: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
src/run.bash

index 90afaaa4e609161612f567974ff221e791172b4f..15184fd87517bd4184038c97dc330215447d3b6f 100755 (executable)
@@ -158,13 +158,18 @@ android-arm | dragonfly-386 | dragonfly-amd64 | freebsd-386 | freebsd-amd64 | fr
                        go test -ldflags '-linkmode=external' ../nocgo || exit 1
                        go test -ldflags '-linkmode=external -extldflags "-static -pthread"' ../nocgo || exit 1
                fi
-               if ! $CC -xc -o /dev/null -pie - 2>/dev/null <<<'int main() {}' ; then
-                       echo "No support for -pie found, skip cgo PIE test."
-               else
-                       go test -ldflags '-linkmode=external -extldflags "-pie"' || exit 1
-                       go test -ldflags '-linkmode=external -extldflags "-pie"' ../testtls || exit 1
-                       go test -ldflags '-linkmode=external -extldflags "-pie"' ../nocgo || exit 1
-               fi
+               case "$GOHOSTOS-$GOARCH" in
+               freebsd-amd64) ;; # clang -pie fails to link misc/cgo/test
+               *)
+                       if ! $CC -xc -o /dev/null -pie - 2>/dev/null <<<'int main() {}' ; then
+                               echo "No support for -pie found, skip cgo PIE test."
+                       else
+                               go test -ldflags '-linkmode=external -extldflags "-pie"' || exit 1
+                               go test -ldflags '-linkmode=external -extldflags "-pie"' ../testtls || exit 1
+                               go test -ldflags '-linkmode=external -extldflags "-pie"' ../nocgo || exit 1
+                       fi
+                       ;;
+               esac
                ;;
        esac
        ;;