-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: new cgo protections mix up CFLAGS and LDFLAGS from pkg-config #23737
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
Comments
Change https://golang.org/cl/92755 mentions this issue: |
/cc @rsc |
I get a similar error with a package (LuaJIT) that does the following in order to link a *.a file: I was able to "fix" it by doing this, but it would be good if it was at least documented (also, I am wondering if there are any other cases if trying to pass non-flag parameters in CFLAGS/LDFLAGS): |
@raff yours seems like a separate issue, where this line is missing support for go/src/cmd/go/internal/work/security.go Line 91 in 104445e
I submitted a CL for that. https://golang.org/cl/92855 |
Change https://golang.org/cl/92855 mentions this issue: |
Closing in favor of a general whitelist issue in #23749. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.9.4
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?Linux
What did you do?
Tried to build with cgo, like
Within our contrived environment, we'll see,
What did you expect to see?
The linker flag
-Wl,--export-dynamic
there is rightfully rejected. It ought to be allowed with theCGO_LDFLAGS_ALLOW
environment variable.What did you see instead?
go build
returned an error,And, it may be built, but using
CGO_CFLAGS_ALLOW
, notCGO_LDFLAGS_ALLOW
I'll have a fix pushed shortly.
The text was updated successfully, but these errors were encountered: