MT#55283 add PIE build flags

Fixes:

/bin/ld: dynamic STT_GNU_IFUNC symbol `s16_mix_in.lto_priv.234' with pointer equality in `/tmp/ccDfEly2.ltrans2.ltrans.o' can not be used when making an executable; recompile with -fPIE and relink with -pie

closes #1846

Change-Id: Ic31f2e064e88bc931f3438eff7b362ad611b7d84
(cherry picked from commit d9c27af99d)
mr12.5
Richard Fuchs 1 year ago
parent a582d96a4b
commit c724e84873

@ -1,5 +1,8 @@
include ../lib/lib.Makefile
CFLAGS += -fPIE
LDFLAGS += -pie
all:
$(MAKE) $(TARGET) $(MANS)

@ -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

Loading…
Cancel
Save