-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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/go/internal/work/security.go: invalid flag in #cgo LDFLAGS: -Wl,-rpath,.
#70924
Comments
While looking for a workaround for #40559, I faced this problem. I don't see a reason why this shouldn't be allowed. This |
Actually, any value for |
I don't see a problem with a path that is a single character. It would be fine to send a patch to change that. Thanks. |
@ianlancetaylor, should I extend the fix to other flags? Proposed fixes: - re(`-Wl,-framework,[^,@\-][^,]+`),
+ re(`-Wl,-framework,[^,@\-][^,]*`), - re(`-Wl,-R,?([^@\-,][^,@]*$)`),
+ re(`-Wl,-R,?([^@\-,][^,@]*$)`), - re(`-Wl,--just-symbols[=,]([^,@\-][^,@]+)`),
+ re(`-Wl,--just-symbols[=,]([^,@\-][^,@]*)`), - re(`-Wl,-rpath(-link)?[=,]([^,@\-][^,]+)`),
+ re(`-Wl,-rpath(-link)?[=,]([^,@\-][^,]*)`), - re(`-Wl,-sectcreate,([^,@\-][^,]+),([^,@\-][^,]+),([^,@\-][^,]+)`),
+ re(`-Wl,-sectcreate,([^,@\-][^,]*),([^,@\-][^,]*),([^,@\-][^,]*)`), - re(`-Wl,-syslibroot[=,]([^,@\-][^,]+)`),
+ re(`-Wl,-syslibroot[=,]([^,@\-][^,]*)`), - re(`-Wl,-undefined[=,]([^,@\-][^,]+)`),
+ re(`-Wl,-undefined[=,]([^,@\-][^,]*)`), |
Sure, but don't mix that change with any other changes. Thanks. |
Change https://go.dev/cl/638035 mentions this issue: |
Go version
go version go1.23.3 darwin/amd64
Output of
go env
in your module/workspace:What did you do?
Run
go build main.go
in macOS with the following program.main.go
What did you expect to see?
The text was updated successfully, but these errors were encountered: