summaryrefslogtreecommitdiff
path: root/go/Makefile
diff options
context:
space:
mode:
authorAndrew G. Morgan <morgan@kernel.org>2020-12-08 21:54:09 -0800
committerAndrew G. Morgan <morgan@kernel.org>2020-12-08 21:54:09 -0800
commit2b75e6c316d8f1a8b8549bc352858b0232f40a58 (patch)
treef96850063d51677bcc648e6eb57213b0add16ea8 /go/Makefile
parent8361f2999a41b1ff0a5c23ef225b954558dfc1dc (diff)
downloadlibcap2-2b75e6c316d8f1a8b8549bc352858b0232f40a58.tar.gz
SIGRTMAX does not play well with Go, so use SIGSYS for the psx interrupt.psx/v0.2.46-rc2
This is a workaround for: https://bugzilla.kernel.org/show_bug.cgi?id=210533 I've also adapted the test attachment from that bug to run without privilege. Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Diffstat (limited to 'go/Makefile')
-rw-r--r--go/Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/go/Makefile b/go/Makefile
index eee379e..70a8abf 100644
--- a/go/Makefile
+++ b/go/Makefile
@@ -18,7 +18,7 @@ CAPGOPACKAGE=$(PKGDIR)/cap.a
DEPS=../libcap/libcap.a ../libcap/libpsx.a
-all: $(PSXGOPACKAGE) $(CAPGOPACKAGE) web compare-cap try-launching
+all: $(PSXGOPACKAGE) $(CAPGOPACKAGE) web compare-cap try-launching psx-signals
$(DEPS):
make -C ../libcap all
@@ -70,10 +70,15 @@ ifeq ($(CGO_REQUIRED),0)
GO111MODULE=off CGO_ENABLED="1" CGO_LDFLAGS_ALLOW="$(CGO_LDFLAGS_ALLOW)" GOPATH=$(GOPATH) $(GO) build -o $@-cgo $<
endif
+# Bug reported issues:
+psx-signals: psx-signals.go $(PSXGOPACKAGE)
+ GO111MODULE=off CGO_LDFLAGS_ALLOW="$(CGO_LDFLAGS_ALLOW)" CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" GOPATH=$(GOPATH) $(GO) build $<
+
test: all
GO111MODULE=off CGO_LDFLAGS_ALLOW="$(CGO_LDFLAGS_ALLOW)" GOPATH="$(GOPATH)" $(GO) test $(IMPORTDIR)/psx
GO111MODULE=off CGO_LDFLAGS_ALLOW="$(CGO_LDFLAGS_ALLOW)" GOPATH="$(GOPATH)" $(GO) test $(IMPORTDIR)/cap
LD_LIBRARY_PATH=../libcap ./compare-cap
+ ./psx-signals
sudotest: test ../progs/tcapsh-static
./try-launching
@@ -98,4 +103,5 @@ clean:
rm -f *.o *.so *~ mknames web ok good-names.go
rm -f compare-cap try-launching try-launching-cgo
rm -f $(topdir)/cap/*~ $(topdir)/psx/*~
+ rm -f psx-signals
rm -fr pkg src