diff options
Diffstat (limited to 'src/cmd/link/elf_test.go')
-rw-r--r-- | src/cmd/link/elf_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmd/link/elf_test.go b/src/cmd/link/elf_test.go index 334f050e88..20754d09f5 100644 --- a/src/cmd/link/elf_test.go +++ b/src/cmd/link/elf_test.go @@ -226,6 +226,12 @@ func main() { func TestPIESize(t *testing.T) { testenv.MustHaveGoBuild(t) + + // We don't want to test -linkmode=external if cgo is not supported. + // On some systems -buildmode=pie implies -linkmode=external, so just + // always skip the test if cgo is not supported. + testenv.MustHaveCGO(t) + if !sys.BuildModeSupported(runtime.Compiler, "pie", runtime.GOOS, runtime.GOARCH) { t.Skip("-buildmode=pie not supported") } |