Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/cgo: add -fno-stack-protector to CFLAGS (again)
Add -fno-stack-protector back to the default set of CFLAGS for cgo, so as to avoid problems with internal linking locating the library containing the "__stack_chk_fail_local" support function that some compilers emit (the specific archive can vary based on GOOS). Updates golang#52919. Updates golang#54313. Updates golang#57261. Updates golang#58385. Change-Id: I4591bfb15501f04b7afe1fcd50c4fb93c86db63d Reviewed-on: https://go-review.googlesource.com/c/go/+/466935 Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Than McIntosh <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
- Loading branch information
7ebafcf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why this was re-added. Just compiling the cgo runtime with
-fno-stack-protector
is not sufficient as all cgo code (i.e. not just the run-time) will need to be compiled with-fno-stack-protector
if you don't want to link against the library providing__stack_chk_fail_local
.7ebafcf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a fork of the Go compiler. This is not the right place to ask this question, I think.
7ebafcf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opps, indeed 🤦