From 8a2852bb8633a9f2955b60bd0d19b3735a92a4f9 Mon Sep 17 00:00:00 2001 From: flederwiesel Date: Tue, 19 Nov 2019 12:19:49 +0100 Subject: [PATCH] Fix error: "-fPIC ignored for target (all code is position independent)" for Windows build. --- library/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/Makefile b/library/Makefile index 7efa893..52585b3 100644 --- a/library/Makefile +++ b/library/Makefile @@ -27,13 +27,14 @@ CC?=$(CCARCH)gcc STRIP?=$(CCARCH)strip -CFLAGS=-fPIC $(if $(DEBUG),-O0 -g,-O3) -std=gnu99 -pedantic -Wall -Wextra -Wconversion -Werror -c -fmessage-length=0 -ffunction-sections -fdata-sections +CFLAGS=$(if $(DEBUG),-O0 -g,-O3) -std=gnu99 -pedantic -Wall -Wextra -Wconversion -Werror -c -fmessage-length=0 -ffunction-sections -fdata-sections LDFLAGS=-shared ifeq ($(OS),Windows_NT) EXT=dll else EXT=so + CFLAGS += -fPIC LDFLAGS += -Wl,--hash-style=gnu endif