From: Andrea Bolognani Date: Sun, 31 Jul 2016 16:51:36 +0000 (+0200) Subject: linux: Use -fPIC instead of -fpic X-Git-Url: https://code.delx.au/spectrwm/commitdiff_plain/2c2034e3bf97668545bee6d29bbe01dd5353da4d linux: Use -fPIC instead of -fpic According to GCC's documentation, -fpic can have compatibility issues on some platforms. Use -fPIC instead, which generates slightly bigger objects but is generally more likely to work. Get rid of -DPIC, since the symbol is not used anywhere. --- diff --git a/linux/Makefile b/linux/Makefile index 60d637e..74f648a 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -34,10 +34,10 @@ linux.o: linux.c util.h $(CC) $(MAINT_CFLAGS) $(CFLAGS) $(MAINT_CPPFLAGS) $(BIN_CPPFLAGS) $(CPPFLAGS) -c -o $@ $< libswmhack.so.$(LIBVERSION): swm_hack.so - $(CC) $(MAINT_LDFLAGS) $(LDFLAGS) -Wl,-soname,$@ -shared -fpic -o $@ $+ $(LIB_LDLIBS) $(LDLIBS) + $(CC) $(MAINT_LDFLAGS) $(LDFLAGS) -Wl,-soname,$@ -shared -fPIC -o $@ $+ $(LIB_LDLIBS) $(LDLIBS) swm_hack.so: ../lib/swm_hack.c - $(CC) $(MAINT_CFLAGS) $(CFLAGS) $(MAINT_CPPFLAGS) $(LIB_CPPFLAGS) $(CPPFLAGS) -fpic -DPIC -c -o $@ $< + $(CC) $(MAINT_CFLAGS) $(CFLAGS) $(MAINT_CPPFLAGS) $(LIB_CPPFLAGS) $(CPPFLAGS) -fPIC -c -o $@ $< clean: rm -f spectrwm *.o libswmhack.so.* *.so