Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/link: new darwin linker warning on -pagezero_size and -no_pie deprecation #55112

Closed
cherrymui opened this issue Sep 16, 2022 · 7 comments
Closed
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Darwin
Milestone

Comments

@cherrymui
Copy link
Member

Split off from #54482, which contains multiple issues, to make it clearer for backporting.

The new darwin linker emits warnings about deprecation of the -pagezero_size and -no_pie flags. The build still succeeds, but the warning confuses users and affects tests that checks for output.

CL https://golang.org/cl/430936 removes the -pagezero_size flag.
CL https://golang.org/cl/430937 suppresses the warning of -no_pie.

In Go 1.20 we will switch to building PIE by default, without using -no_pie. But that is a bit too much for backporting. So for backporting I think we suppress the warning instead. It is unlikely that during the lifetime of Go 1.18 and 1.19 -no_pie will cause actual failure.

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Sep 16, 2022
@cherrymui
Copy link
Member Author

This is fixed by the CLs above. Filing this issue for backporting.

@cherrymui
Copy link
Member Author

@gopherbot please backport this to previous releases. Thanks.

@gopherbot
Copy link

Backport issue(s) opened: #55113 (for 1.18), #55114 (for 1.19).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

@gopherbot
Copy link

Change https://go.dev/cl/431515 mentions this issue: [release-branch.go1.19] cmd/link: stop passing -pagezero_size to darwin linker

@gopherbot
Copy link

Change https://go.dev/cl/431516 mentions this issue: [release-branch.go1.18] cmd/link: stop passing -pagezero_size to darwin linker

@gopherbot
Copy link

Change https://go.dev/cl/431517 mentions this issue: [release-branch.go1.19] cmd/link: suppress -no_pie deprecation warning on darwin

@gopherbot
Copy link

Change https://go.dev/cl/431518 mentions this issue: [release-branch.go1.18] cmd/link: suppress -no_pie deprecation warning on darwin

gopherbot pushed a commit that referenced this issue Sep 21, 2022
…in linker

We added -pagezero_size in CL 72730, where it was intented for iOS.
The current code passes it only on macOS/AMD64 instead. It is not
really necessary there. Also, the new darwin linker starts to emit
a warning about deprecation of the flag. Stop passing it.

For #55113
Updates #54482, #55112.

Change-Id: If9db7a1645c37d4284e48f075856912df8d8c1a0
Reviewed-on: https://go-review.googlesource.com/c/go/+/430936
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
(cherry picked from commit 5231ba2)
Reviewed-on: https://go-review.googlesource.com/c/go/+/431516
Reviewed-by: Austin Clements <austin@google.com>
gopherbot pushed a commit that referenced this issue Sep 21, 2022
…in linker

We added -pagezero_size in CL 72730, where it was intented for iOS.
The current code passes it only on macOS/AMD64 instead. It is not
really necessary there. Also, the new darwin linker starts to emit
a warning about deprecation of the flag. Stop passing it.

For #55114.
Updates #55112, #54482.

Change-Id: If9db7a1645c37d4284e48f075856912df8d8c1a0
Reviewed-on: https://go-review.googlesource.com/c/go/+/430936
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
(cherry picked from commit 5231ba2)
Reviewed-on: https://go-review.googlesource.com/c/go/+/431515
Reviewed-by: Austin Clements <austin@google.com>
gopherbot pushed a commit that referenced this issue Sep 21, 2022
…g on darwin

Apparently the new darwin linker starts to emit a warning about
-no_pie deprecation. Maybe we want to switch to PIE by default.
For now, suppress the warning. This also makes it easier for
backporting to previous releases.

Fixes #55114.
Updates #55112, #54482.

Change-Id: I1a3b74c237a9d00ec3b030fc3a9940a31e5cd37e
Reviewed-on: https://go-review.googlesource.com/c/go/+/430937
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit 706d84f)
Reviewed-on: https://go-review.googlesource.com/c/go/+/431517
gopherbot pushed a commit that referenced this issue Sep 21, 2022
…g on darwin

Apparently the new darwin linker starts to emit a warning about
-no_pie deprecation. Maybe we want to switch to PIE by default.
For now, suppress the warning. This also makes it easier for
backporting to previous releases.

Fixes #55113.
Updates #55112, #54482.

Change-Id: I1a3b74c237a9d00ec3b030fc3a9940a31e5cd37e
Reviewed-on: https://go-review.googlesource.com/c/go/+/430937
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit 706d84f)
Reviewed-on: https://go-review.googlesource.com/c/go/+/431518
Reviewed-by: Austin Clements <austin@google.com>
@dmitshur dmitshur added the NeedsFix The path to resolution is known, but the work has not been done. label Sep 26, 2022
@dmitshur dmitshur added this to the Go1.20 milestone Sep 26, 2022
bradfitz pushed a commit to tailscale/go that referenced this issue Oct 5, 2022
…in linker

We added -pagezero_size in CL 72730, where it was intented for iOS.
The current code passes it only on macOS/AMD64 instead. It is not
really necessary there. Also, the new darwin linker starts to emit
a warning about deprecation of the flag. Stop passing it.

For golang#55114.
Updates golang#55112, golang#54482.

Change-Id: If9db7a1645c37d4284e48f075856912df8d8c1a0
Reviewed-on: https://go-review.googlesource.com/c/go/+/430936
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
(cherry picked from commit 5231ba2)
Reviewed-on: https://go-review.googlesource.com/c/go/+/431515
Reviewed-by: Austin Clements <austin@google.com>
bradfitz pushed a commit to tailscale/go that referenced this issue Oct 5, 2022
…g on darwin

Apparently the new darwin linker starts to emit a warning about
-no_pie deprecation. Maybe we want to switch to PIE by default.
For now, suppress the warning. This also makes it easier for
backporting to previous releases.

Fixes golang#55114.
Updates golang#55112, golang#54482.

Change-Id: I1a3b74c237a9d00ec3b030fc3a9940a31e5cd37e
Reviewed-on: https://go-review.googlesource.com/c/go/+/430937
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit 706d84f)
Reviewed-on: https://go-review.googlesource.com/c/go/+/431517
bradfitz pushed a commit to tailscale/go that referenced this issue Oct 5, 2022
…in linker

We added -pagezero_size in CL 72730, where it was intented for iOS.
The current code passes it only on macOS/AMD64 instead. It is not
really necessary there. Also, the new darwin linker starts to emit
a warning about deprecation of the flag. Stop passing it.

For golang#55114.
Updates golang#55112, golang#54482.

Change-Id: If9db7a1645c37d4284e48f075856912df8d8c1a0
Reviewed-on: https://go-review.googlesource.com/c/go/+/430936
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
(cherry picked from commit 5231ba2)
Reviewed-on: https://go-review.googlesource.com/c/go/+/431515
Reviewed-by: Austin Clements <austin@google.com>
bradfitz pushed a commit to tailscale/go that referenced this issue Oct 5, 2022
…g on darwin

Apparently the new darwin linker starts to emit a warning about
-no_pie deprecation. Maybe we want to switch to PIE by default.
For now, suppress the warning. This also makes it easier for
backporting to previous releases.

Fixes golang#55114.
Updates golang#55112, golang#54482.

Change-Id: I1a3b74c237a9d00ec3b030fc3a9940a31e5cd37e
Reviewed-on: https://go-review.googlesource.com/c/go/+/430937
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit 706d84f)
Reviewed-on: https://go-review.googlesource.com/c/go/+/431517
bradfitz pushed a commit to tailscale/go that referenced this issue Oct 5, 2022
…in linker

We added -pagezero_size in CL 72730, where it was intented for iOS.
The current code passes it only on macOS/AMD64 instead. It is not
really necessary there. Also, the new darwin linker starts to emit
a warning about deprecation of the flag. Stop passing it.

For golang#55114.
Updates golang#55112, golang#54482.

Change-Id: If9db7a1645c37d4284e48f075856912df8d8c1a0
Reviewed-on: https://go-review.googlesource.com/c/go/+/430936
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
(cherry picked from commit 5231ba2)
Reviewed-on: https://go-review.googlesource.com/c/go/+/431515
Reviewed-by: Austin Clements <austin@google.com>
bradfitz pushed a commit to tailscale/go that referenced this issue Oct 5, 2022
…g on darwin

Apparently the new darwin linker starts to emit a warning about
-no_pie deprecation. Maybe we want to switch to PIE by default.
For now, suppress the warning. This also makes it easier for
backporting to previous releases.

Fixes golang#55114.
Updates golang#55112, golang#54482.

Change-Id: I1a3b74c237a9d00ec3b030fc3a9940a31e5cd37e
Reviewed-on: https://go-review.googlesource.com/c/go/+/430937
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit 706d84f)
Reviewed-on: https://go-review.googlesource.com/c/go/+/431517
@golang golang locked and limited conversation to collaborators Sep 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Darwin
Projects
None yet
Development

No branches or pull requests

3 participants