This is the gccgo version of CL 15605.
For https://gcc.gnu.org/PR114699
For #11100
For #12582
For #12873
Change-Id: I30e23130737022d772971f0bd629b57269174886
Reviewed-on: https://go-review.googlesource.com/c/go/+/582975
Reviewed-by: Than McIntosh <thanm@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
case "c-shared":
ldflags = append(ldflags, "-shared", "-nostdlib")
+ if cfg.Goos != "windows" {
+ ldflags = append(ldflags, "-Wl,-z,nodelete")
+ }
ldflags = append(ldflags, goLibBegin...)
ldflags = append(ldflags, "-lgo", "-lgcc_s", "-lgcc", "-lc", "-lgcc")