]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go, runtime: define GOBUILDMODE_shared rather than shared when dynamically linking
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Thu, 29 Oct 2015 22:48:43 +0000 (11:48 +1300)
committerMichael Hudson-Doyle <michael.hudson@canonical.com>
Sun, 1 Nov 2015 19:52:33 +0000 (19:52 +0000)
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>
src/cmd/go/build.go
src/runtime/sys_linux_386.s

index b1c95220ccc660eb193cb6321cefc622a957cd40..3ee5b59f18aa94d9cf8ff84c78f3e75b06e4f87b 100644 (file)
@@ -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)
                        }
index f2beb184550809ebb4b2cf14a313d7c475d91036..9e0e87cafc2370149fc0536910f741024330b03d 100644 (file)
@@ -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)