File gnuplot-PIE.patch of Package gnuplot.20181

Index: gnuplot-5.2.2/src/Makefile.am
===================================================================
--- gnuplot-5.2.2.orig/src/Makefile.am
+++ gnuplot-5.2.2/src/Makefile.am
@@ -59,6 +59,7 @@ template.h term_api.h term.c term.h time
 util3d.c util3d.h variable.c variable.h version.c version.h
 
 gnuplot_LDADD = $(GD_LIBS) $(TERMLIBS) $(TERMXLIBS) $(WX_LIBS) $(QT_LIBS)
+gnuplot_LDFLAGS = -pie
 
 pkglibexec_PROGRAMS = 
 
@@ -67,6 +68,7 @@ pkglibexec_PROGRAMS += gnuplot_x11
 gnuplot_x11_SOURCES = gplt_x11.c gplt_x11.h gpexecute.c gpexecute.h mousecmn.h version.c version.h
 XLIBS = @LIBRARIES_FOR_X@
 gnuplot_x11_LDADD = getcolor_x11.o $(XLIBS)
+gnuplot_x11_LDFLAGS = -pie
 endif
 
 getcolor_x11.o: getcolor.c
@@ -180,6 +182,7 @@ qtterminal/QtGnuplotApplication.cpp qtte
 qtterminal/QtGnuplotScene.cpp qtterminal/QtGnuplotItems.cpp \
 qtterminal/QtGnuplotEvent.cpp
 gnuplot_qt_LDADD = $(QT_LIBS)
+gnuplot_qt_LDFLAGS = -pie
 
 # embed example (uncomment to build it)
 #
openSUSE Build Service is sponsored by