SHA256
1
0
forked from pool/foma
foma/foma-harden-build.patch
Fridrich Strba 59e415666b Accepting request 904148 from home:jengelh:dev
- Update to version 0.9.18+git20210604.180b6fe:[..]

- Needed by HFST to get rid of hfst's bundled copy of foma

OBS-URL: https://build.opensuse.org/request/show/904148
OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/foma?expand=0&rev=15
2021-08-15 06:23:45 +00:00

35 lines
1.2 KiB
Diff

---
Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: foma/Makefile
===================================================================
--- a/foma.orig/Makefile
+++ a/foma/Makefile
@@ -23,13 +23,13 @@ LIBOBJS = int_stack.o define.o determini
all: libfoma foma flookup cgflookup
foma: $(FOMAOBJS) $(LIBOBJS)
- $(CC) $(CFLAGS) $(FOMAOBJS) $(LIBOBJS) $(LDFLAGS) -o $@
+ $(CC) $(CFLAGS) -pie -Wl,-z,now $(FOMAOBJS) $(LIBOBJS) $(LDFLAGS) -o $@
flookup: flookup.o libfoma
- $(CC) $(CFLAGS) flookup.o $(FLOOKUPLDFLAGS) -o $@
+ $(CC) $(CFLAGS) -pie -Wl,-z,now flookup.o $(FLOOKUPLDFLAGS) -o $@
cgflookup: cgflookup.o libfoma
- $(CC) $(CFLAGS) cgflookup.o $(FLOOKUPLDFLAGS) -o $@
+ $(CC) $(CFLAGS) -pie -Wl,-z,now cgflookup.o $(FLOOKUPLDFLAGS) -o $@
STATICLIB = libfoma.a
@@ -72,7 +72,7 @@ libfoma: $(SHAREDLIBV)
$(SHAREDLIBV): $(LIBOBJS)
$(AR) $(ARFLAGS) $(STATICLIB) $(LIBOBJS)
$(RANLIB) $(STATICLIB)
- $(CC) $(CFLAGS) -shared -Wl,$(DFLAG),$(SHAREDLIBM) -o $(SHAREDLIBV) $(LIBOBJS) $(LDFLAGS)
+ $(CC) $(CFLAGS) -shared -Wl,-z,now,$(DFLAG),$(SHAREDLIBM) -o $(SHAREDLIBV) $(LIBOBJS) $(LDFLAGS)
install: foma libfoma libfoma.pc
-@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi