Skip to content

Commit 32d9134

Browse files
authored
fix: use specific flags when architecture is ARM (#1)
Previously compilation of Electric would not work on osx due to some missing flag. This PR adds some specific flags that are needed when running on arm architecture.
1 parent 0ceddd0 commit 32d9134

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ CFLAGS += -I$(ERLANG_PATH)
55
LIBPG_QUERY_PATH = c_src/libpg_query
66

77
CFLAGS += -I$(LIBPG_QUERY_PATH) -fPIC
8-
LDFLAGS = -lpthread -lrt
8+
UNAME_P := $(shell uname -p)
9+
LDFLAGS = -lpthread
10+
ifneq ($(filter arm%,$(UNAME_P)),)
11+
LDFLAGS += -undefined dynamic_lookup
12+
endif
913

1014
.PHONY: all libpg_query_ex clean
1115

0 commit comments

Comments
 (0)