mirror of https://github.com/golang/go.git
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/16503 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
b50b21d3e1
commit
35d71d6727
|
|
@ -389,7 +389,7 @@ func buildModeInit() {
|
||||||
} else {
|
} else {
|
||||||
switch platform {
|
switch platform {
|
||||||
case "linux/386", "linux/amd64", "linux/arm", "linux/arm64":
|
case "linux/386", "linux/amd64", "linux/arm", "linux/arm64":
|
||||||
buildAsmflags = append(buildAsmflags, "-D=shared=1")
|
buildAsmflags = append(buildAsmflags, "-D=GOBUILDMODE_shared=1")
|
||||||
default:
|
default:
|
||||||
fatalf("-buildmode=shared not supported on %s\n", platform)
|
fatalf("-buildmode=shared not supported on %s\n", platform)
|
||||||
}
|
}
|
||||||
|
|
@ -408,7 +408,7 @@ func buildModeInit() {
|
||||||
} else {
|
} else {
|
||||||
switch platform {
|
switch platform {
|
||||||
case "linux/386", "linux/amd64", "linux/arm", "linux/arm64":
|
case "linux/386", "linux/amd64", "linux/arm", "linux/arm64":
|
||||||
buildAsmflags = append(buildAsmflags, "-D=shared=1")
|
buildAsmflags = append(buildAsmflags, "-D=GOBUILDMODE_shared=1")
|
||||||
default:
|
default:
|
||||||
fatalf("-buildmode=shared not supported on %s\n", platform)
|
fatalf("-buildmode=shared not supported on %s\n", platform)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
#include "go_tls.h"
|
#include "go_tls.h"
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
#ifdef shared
|
#ifdef GOBUILDMODE_shared
|
||||||
#define INVOKE_SYSINFO CALL 0x10(GS)
|
#define INVOKE_SYSINFO CALL 0x10(GS)
|
||||||
#else
|
#else
|
||||||
#define INVOKE_SYSINFO CALL *runtime·_vdso(SB)
|
#define INVOKE_SYSINFO CALL *runtime·_vdso(SB)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue