diff --git a/src/internal/platform/supported.go b/src/internal/platform/supported.go index f9706a6988..abac42d550 100644 --- a/src/internal/platform/supported.go +++ b/src/internal/platform/supported.go @@ -249,7 +253,7 @@ func DefaultPIE(goos, goarch string, isRace bool) bool { case "darwin": return true } - return false + return goarch == "@GOARCH@" && BuildModeSupported("gc", "pie", goos, goarch) } // ExecutableHasDWARF reports whether the linked executable includes DWARF