Browse Source

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
pull/1853/head
Richard Fuchs 1 year ago
parent
commit
d9c27af99d
2 changed files with 5 additions and 2 deletions
  1. +3
    -0
      lib/common.Makefile
  2. +2
    -2
      t/Makefile

+ 3
- 0
lib/common.Makefile View File

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


+ 2
- 2
t/Makefile View File

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