]> code.delx.au - spectrwm/commitdiff
linux: Use -fPIC instead of -fpic
authorAndrea Bolognani <eof@kiyuko.org>
Sun, 31 Jul 2016 16:51:36 +0000 (18:51 +0200)
committerAndrea Bolognani <eof@kiyuko.org>
Sun, 31 Jul 2016 17:03:38 +0000 (19:03 +0200)
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.

linux/Makefile

index 60d637ec63c28dbf656f282f1909241840777061..74f648a87ab1292ef0269b9540dbe29004e5ca5b 100644 (file)
@@ -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