From c7a495584031973504e8f781543605e372f46dff Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Sat, 6 Apr 2019 11:28:43 -0400 Subject: [PATCH] Do CI compile with xgo This will hopefully fix Travis errors: /home/travis/.gimme/versions/go1.11.7.linux.amd64/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /usr/bin/ld: /tmp/go-link-810454258/000020.o: unrecognized relocation (0x2a) in section `.text' /usr/bin/ld: final link failed: Bad value --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7d0f8fc..f384cfd 100644 --- a/Makefile +++ b/Makefile @@ -13,8 +13,8 @@ TMPBIN=./tmp all : build -ci: ci-assets deps - cd cmd/writefreely; $(GOBUILD) -v -tags='sqlite' +ci: ci-assets deps $(TMPBIN)/xgo + $(TMPBIN)/xgo -v -tags='sqlite' ./cmd/writefreely build: assets deps cd cmd/writefreely; $(GOBUILD) -v -tags='sqlite' @@ -117,6 +117,9 @@ $(TMPBIN): $(TMPBIN)/go-bindata: deps $(TMPBIN) $(GOBUILD) -o $(TMPBIN)/go-bindata github.com/jteeuwen/go-bindata/go-bindata +$(TMPBIN)/xgo: deps $(TMPBIN) + $(GOBUILD) -o $(TMPBIN)/xgo github.com/karalabe/xgo + ci-assets : $(TMPBIN)/go-bindata $(TMPBIN)/go-bindata -pkg writefreely -ignore=\\.gitignore schema.sql sqlite.sql