Skip to content

Commit bf28d8c

Browse files
committed
fix(Makefile): %.c duplicate fPIC CFLAG and missing fPIC in Android CFLAGS
1 parent d812683 commit bf28d8c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ else ifeq ($(PLATFORM),android)
7979
CC = $(BIN)/$(ARCH)-linux-android26-clang
8080
TARGET := $(DIST_DIR)/agent.so
8181
LDFLAGS += -shared
82+
CFLAGS += -fPIC
8283
STRIP = $(BIN)/llvm-strip --strip-unneeded $@
8384
else ifeq ($(PLATFORM),ios)
8485
TARGET := $(DIST_DIR)/agent.dylib
@@ -112,7 +113,7 @@ $(shell mkdir -p $(BUILD_DIR) $(DIST_DIR))
112113
all: extension
113114

114115
$(BUILD_DIR)/%.o: %.c
115-
$(CC) $(CFLAGS) -O3 -fPIC -c $< -o $@
116+
$(CC) $(CFLAGS) -O3 -c $< -o $@
116117

117118
$(TARGET): $(OBJ_FILES) $(DEF_FILE)
118119
$(CC) $(CFLAGS) $(SRC_DIR)/sqlite-agent.c $(LDFLAGS) -o $@

0 commit comments

Comments
 (0)