Commit 35d71d67 authored by Michael Hudson-Doyle's avatar Michael Hudson-Doyle

cmd/go, runtime: define GOBUILDMODE_shared rather than shared when dynamically linking

To avoid collisions with what existing code may already be doing.

Change-Id: Ice639440aafc0724714c25333d90a49954372230
Reviewed-on: https://go-review.googlesource.com/16503Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent b50b21d3
......@@ -389,7 +389,7 @@ func buildModeInit() {
} else {
switch platform {
case "linux/386", "linux/amd64", "linux/arm", "linux/arm64":
buildAsmflags = append(buildAsmflags, "-D=shared=1")
buildAsmflags = append(buildAsmflags, "-D=GOBUILDMODE_shared=1")
default:
fatalf("-buildmode=shared not supported on %s\n", platform)
}
......@@ -408,7 +408,7 @@ func buildModeInit() {
} else {
switch platform {
case "linux/386", "linux/amd64", "linux/arm", "linux/arm64":
buildAsmflags = append(buildAsmflags, "-D=shared=1")
buildAsmflags = append(buildAsmflags, "-D=GOBUILDMODE_shared=1")
default:
fatalf("-buildmode=shared not supported on %s\n", platform)
}
......
......@@ -10,7 +10,7 @@
#include "go_tls.h"
#include "textflag.h"
#ifdef shared
#ifdef GOBUILDMODE_shared
#define INVOKE_SYSINFO CALL 0x10(GS)
#else
#define INVOKE_SYSINFO CALL *runtime·_vdso(SB)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment