From ef839080596bd9fbead5db1e91f698bebfd4024a Mon Sep 17 00:00:00 2001 From: Carlos Martín Nieto Date: Wed, 31 Dec 2014 19:43:20 +0000 Subject: Revert "Make the cgo tool do more linking work" --- script/with-static.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 script/with-static.sh (limited to 'script/with-static.sh') diff --git a/script/with-static.sh b/script/with-static.sh new file mode 100755 index 0000000..3f60e31 --- /dev/null +++ b/script/with-static.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +set -ex + +export BUILD="$PWD/vendor/libgit2/build" +export PCFILE="$BUILD/libgit2.pc" + +FLAGS=$(pkg-config --static --libs $PCFILE) || exit 1 +export CGO_LDFLAGS="$BUILD/libgit2.a -L$BUILD ${FLAGS}" +export CGO_CFLAGS="-I$PWD/vendor/libgit2/include" + +$@ -- cgit v1.2.3