1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 12:29:55 +00:00

go: Further tweak indentation in patch

The current patch formatting is a mix of two styles which is hard to read.
Tweak it further to make changes easier to identify since we're already
breaking formatting rules.

(From OE-Core rev: ab443dc1238e6c5a542d29ce9d2ba121b81ef365)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2024-03-03 22:23:49 +00:00
parent c28c8e67f7
commit eec5c8778f
@@ -31,9 +31,10 @@ Adapted to Go 1.13 from patches originally submitted to
the meta/recipes-devtools/go tree by the meta/recipes-devtools/go tree by
Matt Madison <matt@madison.systems>. Matt Madison <matt@madison.systems>.
Rework the patch to avoid identation, it's more hard to read but Rework the patch to avoid identation, it breaks formatting rules but
easy to rebase. makes the changes more obvious and maintainable.
Jose Quaresma <jose.quaresma@foundries.io> Jose Quaresma <jose.quaresma@foundries.io>
Richard Purdie <richard.purdie@linuxfoundation.org>
Upstream-Status: Inappropriate [OE specific] Upstream-Status: Inappropriate [OE specific]
@@ -131,7 +132,7 @@ index 06ee4de8a9..74b7c7098f 100644
+ // For split host/target cross/cross-canadian builds, we don't + // For split host/target cross/cross-canadian builds, we don't
+ // want to be setting these flags until after we have compiled + // want to be setting these flags until after we have compiled
+ // the toolchain that runs on the build host. + // the toolchain that runs on the build host.
+ if !crossBuild { +if !crossBuild {
gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now
setNoOpt() setNoOpt()
goldflags = os.Getenv("GO_LDFLAGS") // we were using $BOOT_GO_LDFLAGS until now goldflags = os.Getenv("GO_LDFLAGS") // we were using $BOOT_GO_LDFLAGS until now
@@ -143,11 +144,11 @@ index 06ee4de8a9..74b7c7098f 100644
xprintf("\n") xprintf("\n")
} }
xprintf("Building Go toolchain2 using go_bootstrap and Go toolchain1.\n") xprintf("Building Go toolchain2 using go_bootstrap and Go toolchain1.\n")
+ if !crossBuild { +if !crossBuild {
os.Setenv("CC", compilerEnvLookup("CC", defaultcc, goos, goarch)) os.Setenv("CC", compilerEnvLookup("CC", defaultcc, goos, goarch))
+} else { +} else {
+ os.Setenv("CC", defaultcc[""]) + os.Setenv("CC", defaultcc[""])
+ } +}
// Now that cmd/go is in charge of the build process, enable GOEXPERIMENT. // Now that cmd/go is in charge of the build process, enable GOEXPERIMENT.
os.Setenv("GOEXPERIMENT", goexperiment) os.Setenv("GOEXPERIMENT", goexperiment)
// No need to enable PGO for toolchain2. // No need to enable PGO for toolchain2.
@@ -155,7 +156,7 @@ index 06ee4de8a9..74b7c7098f 100644
os.Setenv("GOCACHE", oldgocache) os.Setenv("GOCACHE", oldgocache)
} }
+ if !crossBuild { +if !crossBuild {
if goos == oldgoos && goarch == oldgoarch { if goos == oldgoos && goarch == oldgoarch {
// Common case - not setting up for cross-compilation. // Common case - not setting up for cross-compilation.
timelog("build", "toolchain") timelog("build", "toolchain")
@@ -198,7 +199,7 @@ index 06ee4de8a9..74b7c7098f 100644
+ checkNotStale(toolenv(), goBootstrap, toBuild...) + checkNotStale(toolenv(), goBootstrap, toBuild...)
+ // Skip cmdGo staleness checks here, since we can't run the target's cmdGo binary + // Skip cmdGo staleness checks here, since we can't run the target's cmdGo binary
+ } + }
+ } +}
// Check that there are no new files in $GOROOT/bin other than // Check that there are no new files in $GOROOT/bin other than
// go and gofmt and $GOOS_$GOARCH (target bin when cross-compiling). // go and gofmt and $GOOS_$GOARCH (target bin when cross-compiling).
@@ -208,7 +209,7 @@ index 06ee4de8a9..74b7c7098f 100644
+ // Except that for split host/target cross-builds, we need to + // Except that for split host/target cross-builds, we need to
+ // keep it. + // keep it.
+ if !crossBuild { +if !crossBuild {
// Remove go_bootstrap now that we're done. // Remove go_bootstrap now that we're done.
xremove(pathf("%s/go_bootstrap"+exe, tooldir)) xremove(pathf("%s/go_bootstrap"+exe, tooldir))
+} +}