From 73a21a3c0450b9a76bb7c103ad3f9b8f11e68f3e Mon Sep 17 00:00:00 2001 From: Lode Hoste Date: Thu, 15 Jan 2015 18:52:59 +0100 Subject: [PATCH 1/2] Force static linking --- build-syncthing.sh | 6 ++++-- build.gradle | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build-syncthing.sh b/build-syncthing.sh index f0d073c0..eaab2885 100755 --- a/build-syncthing.sh +++ b/build-syncthing.sh @@ -34,13 +34,15 @@ if [ -z $GOROOT ] || [[ $(go version) != go\ version\ go1.4* ]] ; then fi # Add GO compiler to PATH -export PATH=$PATH:$GOROOT/bin +export PATH=$GOROOT/bin:$PATH +# Disable CGO (no dynamic linking) +export CGO_ENABLED=0 # Check whether GOLANG is compiled with cross-compilation for 386 if [ ! -f $GOROOT/bin/linux_386/go ]; then pushd $GOROOT/src # Build GO for cross-compilation - GOOS=linux GOARCH=386 ./make.bash --no-clean + GOOS=linux GOARCH=386 GO386=387 ./make.bash --no-clean popd fi diff --git a/build.gradle b/build.gradle index 844085bb..eb6580f6 100644 --- a/build.gradle +++ b/build.gradle @@ -106,10 +106,9 @@ task copyNative(type: Copy) { def lib_dir = "libs/" new File(lib_dir).mkdirs() def st_dir = "bin/"; - from st_dir + 'syncthing-x86', st_dir + 'syncthing-armeabi', st_dir + 'syncthing-armeabi-v7a'; + from st_dir + 'syncthing-x86', st_dir + 'syncthing-armeabi'; into lib_dir rename('syncthing-x86', 'x86/libsyncthing.so') - rename('syncthing-armeabi-v7a', 'armeabi-v7a/libsyncthing.so') rename('syncthing-armeabi', 'armeabi/libsyncthing.so') } buildNative.finalizedBy copyNative From 76b1a3d0856ef5fa314dfd8185d932c905bf6a82 Mon Sep 17 00:00:00 2001 From: Lode Hoste Date: Thu, 15 Jan 2015 18:58:04 +0100 Subject: [PATCH 2/2] Fix certificate issue on travis build --- build-syncthing.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-syncthing.sh b/build-syncthing.sh index eaab2885..0fc3509e 100755 --- a/build-syncthing.sh +++ b/build-syncthing.sh @@ -15,7 +15,7 @@ if [ -z $GOROOT ] || [[ $(go version) != go\ version\ go1.4* ]] ; then tmpgo='build/go' if [ ! -f "$tmpgo/bin/go" ]; then # Download GOLANG v1.4 - wget -O go.src.tar.gz https://golang.org/dl/go1.4.src.tar.gz + wget -O go.src.tar.gz http://golang.org/dl/go1.4.src.tar.gz sha1=$(sha1sum go.src.tar.gz) if [ "$sha1" != "6a7d9bd90550ae1e164d7803b3e945dc8309252b go.src.tar.gz" ]; then echo "go.src.tar.gz SHA1 checksum does not match!"