From 945ec8c58d1a44d65de47c56e0aca7c226079d01 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Sat, 21 Sep 2024 02:45:41 +0300 Subject: [PATCH] fix: detect gmp for Go bindings test --- .github/workflows/build-binds.yml | 3 +++ go-bindings/Makefile | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-binds.yml b/.github/workflows/build-binds.yml index 92e0f04ec..07fb70f68 100644 --- a/.github/workflows/build-binds.yml +++ b/.github/workflows/build-binds.yml @@ -79,4 +79,7 @@ jobs: - name: Build Go bindings run: | cd go-bindings + export gmp_prefix=`$BREW --prefix gmp 2>/dev/null` + export GMP_CXXFLAGS="-I$gmp_prefix/include" + export GMP_LDFLAGS="-L$gmp_prefix/lib" make diff --git a/go-bindings/Makefile b/go-bindings/Makefile index c7a57e730..cba6412b5 100644 --- a/go-bindings/Makefile +++ b/go-bindings/Makefile @@ -17,13 +17,15 @@ CGO_LDFLAGS ?= "\ -L$(CURR_DIR)../build/depends/mimalloc \ -L$(CURR_DIR)../build/depends/relic/lib \ -L$(CURR_DIR)../build/src \ --ldashbls -lrelic_s -lmimalloc-secure -lgmp" +-ldashbls -lrelic_s -lmimalloc-secure -lgmp" \ +$(GMP_LDFLAGS) CGO_CXXFLAGS ?= "\ -I$(CURR_DIR)../build/depends/relic/include \ -I$(CURR_DIR)../depends/mimalloc/include \ -I$(CURR_DIR)../depends/relic/include \ --I$(CURR_DIR)../include" +-I$(CURR_DIR)../include" \ +$(GMP_CXXFLAGS) prepare: @mkdir -p ../build/src/dashbls