File gnuplot-PIE.patch of Package gnuplot
Index: gnuplot-5.4.1/src/Makefile.am
===================================================================
---
gnuplot-6.0.0/src/Makefile.am | 5 +++++
1 file changed, 5 insertions(+)
--- gnuplot-6.0.0/src/Makefile.am
+++ gnuplot-6.0.0/src/Makefile.am 2024-01-08 15:22:45.413763257 +0000
@@ -67,6 +67,7 @@ voxelgrid.c voxelgrid.h vplot.c vplot.h
watch.c watch.h xdg.c xdg.h
gnuplot_LDADD = $(TERMLIBS) $(TERMXLIBS) $(WX_LIBS) $(QT_LIBS)
+gnuplot_LDFLAGS = -pie
pkglibexec_PROGRAMS =
@@ -75,6 +76,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
@@ -102,6 +104,7 @@ $(EXTRA_gnuplot_SOURCES)
if BUILD_WXWIDGETS
gnuplot_SOURCES += wxterminal/wxt_gui.cpp
gnuplot_LDADD += -lX11
+gnuplot_LDFLAGS += -pie
endif
if BUILD_GPCAIRO
@@ -189,6 +192,7 @@ qtterminal/QtGnuplotApplication.cpp qtte
qtterminal/QtGnuplotScene.cpp qtterminal/QtGnuplotItems.cpp \
qtterminal/QtGnuplotEvent.cpp
gnuplot_qt_LDADD = $(QT_LIBS)
+gnuplot_qt_LDFLAGS = -pie
#
# embedded Qt widget example program
@@ -204,6 +208,7 @@ qt_embed_example_SOURCES = qtterminal/qt
qtterminal/QtGnuplotScene.cpp qtterminal/QtGnuplotItems.cpp \
qtterminal/QtGnuplotInstance.cpp
qt_embed_example_LDADD = $(QT_LIBS)
+qt_embed_example_LDFLAGS = -pie
endif # build_qt