summaryrefslogtreecommitdiffstats
path: root/plugins/go
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2016-07-06 09:09:41 (GMT)
committerTony Theodore <tonyt@logyst.com>2016-07-06 09:09:41 (GMT)
commitb57e1bc835830f89cbfd60712dbe59892229dfb0 (patch)
treea807d7476df71f3de189b045a443930b0421e691 /plugins/go
parented68885143b335bebc789fa86fb6dc381bfea9ea (diff)
downloadmxe-b57e1bc835830f89cbfd60712dbe59892229dfb0.zip
mxe-b57e1bc835830f89cbfd60712dbe59892229dfb0.tar.gz
mxe-b57e1bc835830f89cbfd60712dbe59892229dfb0.tar.bz2
go plugin: fix build on darwin
build fails with: ``` fatal error: runtime: bsdthread_register error (unset DYLD_INSERT_LIBRARIES) ``` building with `-ldflags -linkmode=external`[1] and `CGO_ENABLED=1` has no affect on `go-native`, it does let `go` bootstrap, but then fails with a similar error: ``` fatal error: runtime: bsdthread_register error ``` easiest to unset DYLD_INSERT_LIBRARIES - no need to check for `darwin` as it only exists on that platform. [1] https://github.com/golang/go/issues/8801#issuecomment-66460009
Diffstat (limited to 'plugins/go')
-rw-r--r--plugins/go/go-native.mk1
-rw-r--r--plugins/go/go.mk2
2 files changed, 3 insertions, 0 deletions
diff --git a/plugins/go/go-native.mk b/plugins/go/go-native.mk
index fb724ef..2278d2c 100644
--- a/plugins/go/go-native.mk
+++ b/plugins/go/go-native.mk
@@ -22,6 +22,7 @@ endef
define $(PKG)_BUILD
cd '$(1)/src' && \
GOROOT_FINAL='$(PREFIX)/$(TARGET)/go' \
+ DYLD_INSERT_LIBRARIES= \
./make.bash
mkdir -p '$(PREFIX)/$(TARGET)/go'
diff --git a/plugins/go/go.mk b/plugins/go/go.mk
index 3676406..a28f0ed 100644
--- a/plugins/go/go.mk
+++ b/plugins/go/go.mk
@@ -24,6 +24,7 @@ define $(PKG)_BUILD
GOROOT_FINAL='$(PREFIX)/$(TARGET)/go' \
GOOS=windows \
GOARCH='$(if $(findstring x86_64,$(TARGET)),amd64,386)' \
+ DYLD_INSERT_LIBRARIES= \
./make.bash
mkdir -p '$(PREFIX)/$(TARGET)/go'
@@ -39,6 +40,7 @@ define $(PKG)_BUILD
echo 'CGO_ENABLED=1 \'; \
echo 'GOOS=windows \'; \
echo 'GOARCH=$(if $(findstring x86_64,$(TARGET)),amd64,386) \'; \
+ echo 'DYLD_INSERT_LIBRARIES= \'; \
echo 'CC=$(PREFIX)/bin/$(TARGET)-gcc \'; \
echo 'CXX=$(PREFIX)/bin/$(TARGET)-g++ \'; \
echo 'PKG_CONFIG=$(PREFIX)/bin/$(TARGET)-pkg-config \'; \