diff --git a/lib/common.Makefile b/lib/common.Makefile index 187753857..b3608f3a2 100644 --- a/lib/common.Makefile +++ b/lib/common.Makefile @@ -1,5 +1,8 @@ include ../lib/lib.Makefile +CFLAGS += -fPIE +LDFLAGS += -pie + all: $(MAKE) $(TARGET) $(MANS) diff --git a/t/Makefile b/t/Makefile index 3afe915a5..fdcbb3762 100644 --- a/t/Makefile +++ b/t/Makefile @@ -254,10 +254,10 @@ PRELOAD_CFLAGS += -D_GNU_SOURCE -std=c11 PRELOAD_LIBS += -ldl tests-preload.so: tests-preload.c - $(CC) $(PRELOAD_CFLAGS) -o $@ -shared -fPIC $< $(LDFLAGS) $(PRELOAD_LIBS) + $(CC) $(PRELOAD_CFLAGS) -o $@ -shared -fPIC $< $(PRELOAD_LIBS) time-fudge-preload.so: time-fudge-preload.c - $(CC) $(PRELOAD_CFLAGS) -o $@ -shared -fPIC $< $(LDFLAGS) $(PRELOAD_LIBS) + $(CC) $(PRELOAD_CFLAGS) -o $@ -shared -fPIC $< $(PRELOAD_LIBS) spandsp_send_fax_pcm.c: spandsp_logging.h spandsp_send_fax_t38.c: spandsp_logging.h