diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-09-25 11:48:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-25 11:48:32 +0800 |
commit | ca935bdbac190766f29fb73433a82ee5806bc8f9 (patch) | |
tree | 13cefccaaa52cf5aa3c62f590ed7bae7ffdd3f17 | |
parent | 01a6b236b82391adfedad1498f3497a70d4cf948 (diff) | |
download | dexon-consensus-ca935bdbac190766f29fb73433a82ee5806bc8f9.tar dexon-consensus-ca935bdbac190766f29fb73433a82ee5806bc8f9.tar.gz dexon-consensus-ca935bdbac190766f29fb73433a82ee5806bc8f9.tar.bz2 dexon-consensus-ca935bdbac190766f29fb73433a82ee5806bc8f9.tar.lz dexon-consensus-ca935bdbac190766f29fb73433a82ee5806bc8f9.tar.xz dexon-consensus-ca935bdbac190766f29fb73433a82ee5806bc8f9.tar.zst dexon-consensus-ca935bdbac190766f29fb73433a82ee5806bc8f9.zip |
Use static linking for libbls (#132)
-rw-r--r-- | GNUmakefile | 4 | ||||
-rw-r--r-- | Gopkg.lock | 9 | ||||
-rwxr-xr-x | bin/install_dkg_dep.sh | 11 | ||||
-rw-r--r-- | bin/patches/0001-common.mk-remove-hard-coded-CFLAGS-and-LDFLAGS.patch | 26 |
4 files changed, 3 insertions, 47 deletions
diff --git a/GNUmakefile b/GNUmakefile index e145df1..dd4a857 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -70,7 +70,7 @@ vet: test: @for pkg in `go list ./... | grep -v 'vendor'`; do \ - if ! env LD_LIBRARY_PATH=`pwd`/lib DYLD_LIBRARY_PATH=`pwd`/lib go test -race $$pkg; then \ + if ! go test -race $$pkg; then \ echo 'Some test failed, abort'; \ exit 1; \ fi; \ @@ -78,7 +78,7 @@ test: bench: @for pkg in `go list ./... | grep -v 'vendor'`; do \ - if ! env LD_LIBRARY_PATH=`pwd`/lib DYLD_LIBRARY_PATH=`pwd`/lib go test -bench=. -run=^$$ $$pkg; then \ + if ! go test -bench=. -run=^$$ $$pkg; then \ echo 'Some test failed, abort'; \ exit 1; \ fi; \ @@ -50,14 +50,6 @@ revision = "2e65f85255dbc3072edf28d6b5b8efc472979f5a" [[projects]] - branch = "master" - digest = "1:575eb8ef612810bdfc3787cab5583a81278e81c060ae7d68ed7486ad55d0a5a6" - name = "github.com/herumi/bls" - packages = ["ffi/go/bls"] - pruneopts = "UT" - revision = "1c36a87da5bbc1cd6dc0e9d9c0e5fbf2e4640dad" - -[[projects]] digest = "1:b56c589214f01a5601e0821387db484617392d0042f26234bf2da853a2f498a1" name = "github.com/naoina/go-stringutil" packages = ["."] @@ -123,7 +115,6 @@ input-imports = [ "github.com/Spiderpowa/bls/ffi/go/bls", "github.com/ethereum/go-ethereum/crypto", - "github.com/herumi/bls/ffi/go/bls", "github.com/naoina/toml", "github.com/stretchr/testify/suite", "github.com/syndtr/goleveldb/leveldb", diff --git a/bin/install_dkg_dep.sh b/bin/install_dkg_dep.sh index af5e83e..56ac6b3 100755 --- a/bin/install_dkg_dep.sh +++ b/bin/install_dkg_dep.sh @@ -13,17 +13,8 @@ if [ ! -d .dep/dkg ]; then git clone --depth 1 --single-branch -b dev git://github.com/Spiderpowa/bls.git & git clone --depth 1 git://github.com/herumi/mcl.git & wait - if [ "$(uname -o)" = "Darwin" ] && [ "$(brew --prefix)" != "/usr/local" ]; then - cd mcl - git am ../../../bin/patches/0001-common.mk-remove-hard-coded-CFLAGS-and-LDFLAGS.patch - cd .. - fi cd bls make test_go -j cd ../../../ fi -cp -r .dep/dkg/* \ - vendor/github.com/Spiderpowa -mkdir -p lib -cd lib -ln -sf ../vendor/github.com/Spiderpowa/bls/lib/* . +cp -r .dep/dkg/* vendor/github.com/Spiderpowa diff --git a/bin/patches/0001-common.mk-remove-hard-coded-CFLAGS-and-LDFLAGS.patch b/bin/patches/0001-common.mk-remove-hard-coded-CFLAGS-and-LDFLAGS.patch deleted file mode 100644 index a76daa7..0000000 --- a/bin/patches/0001-common.mk-remove-hard-coded-CFLAGS-and-LDFLAGS.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 8fbe73cbbf524cfa6955a10a6617f02161ffa33b Mon Sep 17 00:00:00 2001 -From: Wei-Ning Huang <w@cobinhood.com> -Date: Fri, 21 Sep 2018 18:12:20 +0800 -Subject: [PATCH] common.mk: remove hard coded CFLAGS and LDFLAGS - ---- - common.mk | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/common.mk b/common.mk -index 3a82835..9b42060 100644 ---- a/common.mk -+++ b/common.mk -@@ -14,9 +14,6 @@ ifeq ($(UNAME_S),Darwin) - OS=mac - ARCH=x86_64 - LIB_SUF=dylib -- OPENSSL_DIR?=/usr/local/opt/openssl -- CFLAGS+=-I$(OPENSSL_DIR)/include -- LDFLAGS+=-L$(OPENSSL_DIR)/lib - else - LIB_SUF=so - endif --- -2.17.1 (Apple Git-112) - |