diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go index 6372054929e..37fc5eaae06 100644 --- a/src/cmd/dist/test.go +++ b/src/cmd/dist/test.go @@ -718,7 +718,8 @@ func (t *tester) registerTests() { name: "pie_internal", heading: "internal linking of -buildmode=pie", fn: func(dt *distTest) error { - t.addCmd(dt, "src", t.goTest(), "reflect", "-buildmode=pie", "-ldflags=-linkmode=internal", t.timeout(60)) + cmd := t.addCmd(dt, "src", t.goTest(), "reflect", "-buildmode=pie", "-ldflags=-linkmode=internal", t.timeout(60)) + setEnv(cmd, "CGO_ENABLED", "0") return nil }, })