Skip to content

Commit 8bcc490

Browse files
committed
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 <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent f4b42f5 commit 8bcc490

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/net/cgo_unix_cgo.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
package net
88

99
/*
10+
#cgo CFLAGS: -fno-stack-protector
1011
#include <sys/types.h>
1112
#include <sys/socket.h>
1213
#include <netinet/in.h>

src/os/user/cgo_lookup_cgo.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212

1313
/*
1414
#cgo solaris CFLAGS: -D_POSIX_PTHREAD_SEMANTICS
15+
#cgo CFLAGS: -fno-stack-protector
1516
#include <unistd.h>
1617
#include <sys/types.h>
1718
#include <pwd.h>

0 commit comments

Comments
 (0)