giflib/PIE.patch

22 lines
539 B
Diff
Raw Normal View History

Index: a/Makefile
===================================================================
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@
#
OFLAGS = -O0 -g
OFLAGS = -O2
-CFLAGS = -std=gnu99 -fPIC -Wall -Wno-format-truncation $(OFLAGS)
+CFLAGS += -std=gnu99 -fPIC -Wall -Wno-format-truncation $(OFLAGS)
SHELL = /bin/sh
TAR = tar
@@ -64,6 +64,7 @@ LDLIBS=libgif.a -lm
all: libgif.so libgif.a libutil.so libutil.a $(UTILS)
$(MAKE) -C doc
+$(UTILS):: LDFLAGS += -pie
$(UTILS):: libgif.a libutil.a
libgif.so: $(OBJECTS) $(HEADERS)