Skip to content

Commit

Permalink
fix: issue with GMP not properly being linked on mac (#698)
Browse files Browse the repository at this point in the history
* fixed an issue with GMP not properly being linked

* fixed an issue with GMP not properly being linked
  • Loading branch information
QuantumExplorer authored Oct 13, 2023
1 parent 57fa229 commit aae7376
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ CGO_CXXFLAGS ?= -I$(BLS_DIR)/build/depends/relic/include \
-I$(BLS_DIR)/src/depends/relic/include \
-I$(BLS_DIR)/src/include

OS := $(shell uname)

ifeq ($(OS),Darwin) # macOS
GMP_PREFIX := $(shell brew --prefix gmp 2>/dev/null)
CGO_LDFLAGS += -L$(GMP_PREFIX)/lib
CGO_CXXFLAGS += -I$(GMP_PREFIX)/include
endif

GO := CGO_ENABLED=$(CGO_ENABLED) CGO_CXXFLAGS="$(CGO_CXXFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go

# handle ARM builds
Expand Down

0 comments on commit aae7376

Please sign in to comment.