diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-09 17:29:17 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-09 17:33:36 +0200 |
commit | ebe3297c835b99429a6660c946a6c7f7f09ebec2 (patch) | |
tree | 7ba6eb1db84611c6abec60336b5a98291044a580 /app/tools/libwg-go/Makefile | |
parent | 7f6c861fd63d6aeb47a15d18d98529c99898ab42 (diff) |
libwg-go: ensure local Go instance is patched
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/tools/libwg-go/Makefile')
-rw-r--r-- | app/tools/libwg-go/Makefile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/tools/libwg-go/Makefile b/app/tools/libwg-go/Makefile index 8c97b9d0..3daad830 100644 --- a/app/tools/libwg-go/Makefile +++ b/app/tools/libwg-go/Makefile @@ -44,6 +44,7 @@ $(GOROOT)/bin/go: rm -rf "$(GOROOT)" mkdir -p "$(GOROOT)" curl "$(GOBUILDTARBALL)" | tar -C "$(GOROOT)" --strip-components=1 -xzf - || { rm -rf "$(GOROOT)"; exit 1; } + patch -p1 -f -N -r- -d"$(GOROOT)" < goruntime-boottime-over-monotonic.diff || { rm -rf "$(GOROOT)"; exit 1; } $(DESTDIR)/libwg-go.so: $(GOROOT)/bin/go endif @@ -54,6 +55,7 @@ $(DESTDIR)/libwg-go.so: $(FILES) api-android.go jni.c find . -type d -empty -delete mkdir -p $(subst ../wireguard-go/,./,$(dir $(FILES))) $(foreach FILE,$(FILES),ln -sfrt $(subst ../wireguard-go/,./,$(dir $(FILE))) $(FILE);) + patch -p1 -f -R -s --dry-run -d"$$(go env GOROOT)" < goruntime-boottime-over-monotonic.diff go get -v -d go build -v -o $(DESTDIR)/libwg-go.so -buildmode c-shared go version > .gobuildversion |