From: Apaczer <94932128+Apaczer@users.noreply.github.com> Date: Wed, 26 Mar 2025 21:14:57 +0000 (+0100) Subject: configure: unset `PIC` cflag for plugins if not used X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a28b8a4b402121e28a38f6f169159ff7ee8632df;p=pcsx_rearmed.git configure: unset `PIC` cflag for plugins if not used also don't redefine PIC in Makefiles --- diff --git a/configure b/configure index b4ab4a2a..ee6f0c06 100755 --- a/configure +++ b/configure @@ -355,6 +355,8 @@ fi # supposedly we can avoid -fPIC on armv5 for slightly better performace? if [ "$ARCH" != "arm" -o "$have_armv6" = "yes" ]; then PLUGIN_CFLAGS="$PLUGIN_CFLAGS -fPIC" +else + PLUGIN_CFLAGS="$PLUGIN_CFLAGS -fno-PIC" fi case "$platform" in diff --git a/plugins/gpu-gles/Makefile b/plugins/gpu-gles/Makefile index e9147646..6e10e189 100644 --- a/plugins/gpu-gles/Makefile +++ b/plugins/gpu-gles/Makefile @@ -1,4 +1,4 @@ -CFLAGS += -ggdb -fPIC -O2 # -Wall +CFLAGS += -ggdb -O2 # -Wall include ../../config.mak diff --git a/plugins/spunull/Makefile b/plugins/spunull/Makefile index fcfec80e..d4351a6d 100644 --- a/plugins/spunull/Makefile +++ b/plugins/spunull/Makefile @@ -6,8 +6,10 @@ PLUGINDIR = $(shell basename $(WD)) all: ../../config.mak $(TARGET) +CFLAGS += $(PLUGIN_CFLAGS) + $(TARGET): spunull.c - $(CC) $(CFLAGS) -shared -fPIC -ggdb -O2 -o $@ $^ + $(CC) $(CFLAGS) -shared -ggdb -O2 -o $@ $^ ln -fs $(PLUGINDIR)/$(TARGET) ../ clean: