diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-03-03 22:23:49 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-03-06 12:13:16 +0000 |
| commit | eec5c8778f4cf8961744f936bb1103e7d9b8ff4e (patch) | |
| tree | 6978a52f66b273941704f0105cd5802efc8b8331 /meta/recipes-devtools | |
| parent | c28c8e67f70f6ef17c5bb44cc59311d0a395bdb9 (diff) | |
| download | poky-eec5c8778f4cf8961744f936bb1103e7d9b8ff4e.tar.gz | |
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>
Diffstat (limited to 'meta/recipes-devtools')
| -rw-r--r-- | meta/recipes-devtools/go/go/0005-cmd-dist-separate-host-and-target-builds.patch | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/meta/recipes-devtools/go/go/0005-cmd-dist-separate-host-and-target-builds.patch b/meta/recipes-devtools/go/go/0005-cmd-dist-separate-host-and-target-builds.patch index 02269be969..364fce907a 100644 --- a/meta/recipes-devtools/go/go/0005-cmd-dist-separate-host-and-target-builds.patch +++ b/meta/recipes-devtools/go/go/0005-cmd-dist-separate-host-and-target-builds.patch | |||
| @@ -31,9 +31,10 @@ Adapted to Go 1.13 from patches originally submitted to | |||
| 31 | the meta/recipes-devtools/go tree by | 31 | the meta/recipes-devtools/go tree by |
| 32 | Matt Madison <matt@madison.systems>. | 32 | Matt Madison <matt@madison.systems>. |
| 33 | 33 | ||
| 34 | Rework the patch to avoid identation, it's more hard to read but | 34 | Rework the patch to avoid identation, it breaks formatting rules but |
| 35 | easy to rebase. | 35 | makes the changes more obvious and maintainable. |
| 36 | Jose Quaresma <jose.quaresma@foundries.io> | 36 | Jose Quaresma <jose.quaresma@foundries.io> |
| 37 | Richard Purdie <richard.purdie@linuxfoundation.org> | ||
| 37 | 38 | ||
| 38 | Upstream-Status: Inappropriate [OE specific] | 39 | Upstream-Status: Inappropriate [OE specific] |
| 39 | 40 | ||
| @@ -131,7 +132,7 @@ index 06ee4de8a9..74b7c7098f 100644 | |||
| 131 | + // For split host/target cross/cross-canadian builds, we don't | 132 | + // For split host/target cross/cross-canadian builds, we don't |
| 132 | + // want to be setting these flags until after we have compiled | 133 | + // want to be setting these flags until after we have compiled |
| 133 | + // the toolchain that runs on the build host. | 134 | + // the toolchain that runs on the build host. |
| 134 | + if !crossBuild { | 135 | +if !crossBuild { |
| 135 | gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now | 136 | gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now |
| 136 | setNoOpt() | 137 | setNoOpt() |
| 137 | goldflags = os.Getenv("GO_LDFLAGS") // we were using $BOOT_GO_LDFLAGS until now | 138 | goldflags = os.Getenv("GO_LDFLAGS") // we were using $BOOT_GO_LDFLAGS until now |
| @@ -143,11 +144,11 @@ index 06ee4de8a9..74b7c7098f 100644 | |||
| 143 | xprintf("\n") | 144 | xprintf("\n") |
| 144 | } | 145 | } |
| 145 | xprintf("Building Go toolchain2 using go_bootstrap and Go toolchain1.\n") | 146 | xprintf("Building Go toolchain2 using go_bootstrap and Go toolchain1.\n") |
| 146 | + if !crossBuild { | 147 | +if !crossBuild { |
| 147 | os.Setenv("CC", compilerEnvLookup("CC", defaultcc, goos, goarch)) | 148 | os.Setenv("CC", compilerEnvLookup("CC", defaultcc, goos, goarch)) |
| 148 | +} else { | 149 | +} else { |
| 149 | + os.Setenv("CC", defaultcc[""]) | 150 | + os.Setenv("CC", defaultcc[""]) |
| 150 | + } | 151 | +} |
| 151 | // Now that cmd/go is in charge of the build process, enable GOEXPERIMENT. | 152 | // Now that cmd/go is in charge of the build process, enable GOEXPERIMENT. |
| 152 | os.Setenv("GOEXPERIMENT", goexperiment) | 153 | os.Setenv("GOEXPERIMENT", goexperiment) |
| 153 | // No need to enable PGO for toolchain2. | 154 | // No need to enable PGO for toolchain2. |
| @@ -155,7 +156,7 @@ index 06ee4de8a9..74b7c7098f 100644 | |||
| 155 | os.Setenv("GOCACHE", oldgocache) | 156 | os.Setenv("GOCACHE", oldgocache) |
| 156 | } | 157 | } |
| 157 | 158 | ||
| 158 | + if !crossBuild { | 159 | +if !crossBuild { |
| 159 | if goos == oldgoos && goarch == oldgoarch { | 160 | if goos == oldgoos && goarch == oldgoarch { |
| 160 | // Common case - not setting up for cross-compilation. | 161 | // Common case - not setting up for cross-compilation. |
| 161 | timelog("build", "toolchain") | 162 | timelog("build", "toolchain") |
| @@ -198,7 +199,7 @@ index 06ee4de8a9..74b7c7098f 100644 | |||
| 198 | + checkNotStale(toolenv(), goBootstrap, toBuild...) | 199 | + checkNotStale(toolenv(), goBootstrap, toBuild...) |
| 199 | + // Skip cmdGo staleness checks here, since we can't run the target's cmdGo binary | 200 | + // Skip cmdGo staleness checks here, since we can't run the target's cmdGo binary |
| 200 | + } | 201 | + } |
| 201 | + } | 202 | +} |
| 202 | 203 | ||
| 203 | // Check that there are no new files in $GOROOT/bin other than | 204 | // Check that there are no new files in $GOROOT/bin other than |
| 204 | // go and gofmt and $GOOS_$GOARCH (target bin when cross-compiling). | 205 | // go and gofmt and $GOOS_$GOARCH (target bin when cross-compiling). |
| @@ -208,7 +209,7 @@ index 06ee4de8a9..74b7c7098f 100644 | |||
| 208 | 209 | ||
| 209 | + // Except that for split host/target cross-builds, we need to | 210 | + // Except that for split host/target cross-builds, we need to |
| 210 | + // keep it. | 211 | + // keep it. |
| 211 | + if !crossBuild { | 212 | +if !crossBuild { |
| 212 | // Remove go_bootstrap now that we're done. | 213 | // Remove go_bootstrap now that we're done. |
| 213 | xremove(pathf("%s/go_bootstrap"+exe, tooldir)) | 214 | xremove(pathf("%s/go_bootstrap"+exe, tooldir)) |
| 214 | +} | 215 | +} |
