cmd/dist: baked-in settings need to be per-GOOS/GOARCH #54196
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Uh oh!
There was an error while loading. Please reload this page.
The settings CGO_ENABLED, GO_LDSO, and GO_EXTLINK_ENABLED are baked into the toolchain built by cmd/dist without reference to which GOOS/GOARCH they are appropriate for. This results in toolchains that may use inappropriate settings for cross-compiling. The same is true of CC and CXX, but there we also have CC_FOR_TARGET, CC_FOR_${GOOS}_${GOARCH}, and so on. We should probably do the same for these other settings. Doing it for CGO_ENABLED would allow building a cross-compiled toolchain that uses cgo on the target system, which is necessary (and perhaps sufficient) for #53862.
I will take a look at this. I filed a separate bug #54197 for not baking in GO_LDSO at all.
The text was updated successfully, but these errors were encountered: