mirror of
https://github.com/golang/go.git
synced 2026-02-01 16:42:04 +03:00
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 <thanm@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
package net
|
||||
|
||||
/*
|
||||
#cgo CFLAGS: -fno-stack-protector
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
|
||||
/*
|
||||
#cgo solaris CFLAGS: -D_POSIX_PTHREAD_SEMANTICS
|
||||
#cgo CFLAGS: -fno-stack-protector
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <pwd.h>
|
||||
|
||||
Reference in New Issue
Block a user