From: Than McIntosh Date: Mon, 12 Dec 2022 15:53:17 +0000 (-0500) Subject: os/user,net: add -fno-stack-protector to CFLAGS X-Git-Tag: go1.20rc2~1^2~20 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8bcc490667d4dd44c633c536dd463bbec0a3838f;p=gostls13.git os/user,net: add -fno-stack-protector to CFLAGS Some compilers default to having -fstack-protector on, which breaks when using internal linking because the linker doesn't know how to find the support functions. Updates #52919. Updates #54313. Fixes #57261. Change-Id: Iaae731851407af4521fff2dfefc5b7e3e92cf284 Reviewed-on: https://go-review.googlesource.com/c/go/+/456855 Run-TryBot: Than McIntosh TryBot-Result: Gopher Robot Reviewed-by: Ian Lance Taylor --- diff --git a/src/net/cgo_unix_cgo.go b/src/net/cgo_unix_cgo.go index 3e7282b579..97427e695d 100644 --- a/src/net/cgo_unix_cgo.go +++ b/src/net/cgo_unix_cgo.go @@ -7,6 +7,7 @@ package net /* +#cgo CFLAGS: -fno-stack-protector #include #include #include diff --git a/src/os/user/cgo_lookup_cgo.go b/src/os/user/cgo_lookup_cgo.go index 7bb1da263e..4f78dcad23 100644 --- a/src/os/user/cgo_lookup_cgo.go +++ b/src/os/user/cgo_lookup_cgo.go @@ -12,6 +12,7 @@ import ( /* #cgo solaris CFLAGS: -D_POSIX_PTHREAD_SEMANTICS +#cgo CFLAGS: -fno-stack-protector #include #include #include