Skip to content

Commit 91830a6

Browse files
Add FPIC to CFLAGS
Fixes issues with cross compiling nerves on arm systems.
1 parent 5a011d1 commit 91830a6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ STATIC = $(PREFIX)/static
2121
ERL_CFLAGS ?= -I$(ERL_EI_INCLUDE_DIR)
2222
ERL_LDFLAGS ?= -L$(ERL_EI_LIBDIR)
2323

24-
LDFLAGS += -fPIC -shared -dynamiclib
25-
CFLAGS ?= -fPIC -O2 -Wall -Wextra -Wno-unused-parameter -std=c99
24+
LDFLAGS += -shared -dynamiclib
25+
CFLAGS += -fPIC
26+
CFLAGS ?= -O2 -Wall -Wextra -Wno-unused-parameter -std=c99
2627

2728
ifeq ($(CROSSCOMPILE),)
2829
ifeq ($(shell uname),Darwin)

0 commit comments

Comments
 (0)